Re: PostgreSQL 8.0.0beta1 and diet libc

From: Andreas Krennmair <netnews(at)synflood(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL 8.0.0beta1 and diet libc
Date: 2004-08-16 08:08:11
Message-ID: slrnci0qri.88e.netnews@synflood.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [gmane.comp.db.postgresql.devel.general]:
> Andreas Krennmair <netnews(at)synflood(dot)at> writes:
> > creating template1 database in data/base/1 ... FATAL: XX000: failed to
> > initialize lc_monetary to "C"
> > LOCATION: InitializeGUCOptions, guc.c:2337
> > child process exited with exit code 1
>
> > As an important note you have to know that diet libc's support for all
> > the NLS and i18n/l10n-related stuff is largely incomplete and works so
> > far that common software compiles and runs
>
> [ shrug ] If it returns an error when someone tries to set the locale
> to "C", that is *not* a good-enough implementation of the ANSI/ISO C
> standard. Fix the library.

[x] Done. :-)

I did some research and submitted a patch to diet libc, the only other
issue that I had with PostgreSQL was a minor one, which I fixed with a
small patch to PostgreSQL:

http://synflood.at/patches/pgsql-diet.diff

The first fix is that PostgreSQL relies on that, when reading the output
of postgres -V, all the output can be read with a single read call (or
whatever call is used, it comes down to read(2) in the end) when called
from initdb. This is not the case with diet libc, as the puts
implementation in diet libc does two write calls, with the second write
call happening with a closed pipe. Changing the puts to printf removes
this problem, optionally you could change the format string to "%s\n" to
get the original output (although the patch doesn't break PostgreSQL
w/o diet libc, AFAICS).

The other modifications in src/timezone/data/europe are a quick fix
because I got the error message "line too long" when trying to do a make
install.

Regards,
Andreas Krennmair

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim GUNDUZ 2004-08-16 11:16:47 Re: Turkish downcasting in PL/pgSQL
Previous Message Karel Zak 2004-08-16 07:45:43 Re: to_char() and negative intervals