From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: BSD gettext |
Date: | 2001-05-24 12:31:37 |
Message-ID: | 29525.990707497@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> This is a compilation of the BSD-licensed gettext tools from NetBSD plus
> some of my own code, put into a (hopefully) portable package, intended to
> be evaluated for possible use in PostgreSQL. Give it a try if you're
> interested.
On HPUX 10.20:
make[2]: Entering directory `/home/tgl/pgsql/bsd-gettext-0.0/libintl'
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c gettext.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c gettext.c -o gettext.o
gettext.c: In function `mapit':
gettext.c:313: `MAP_FAILED' undeclared (first use in this function)
gettext.c:313: (Each undeclared identifier is reported only once
gettext.c:313: for each function it appears in.)
gettext.c: In function `unmapit':
gettext.c:442: `MAP_FAILED' undeclared (first use in this function)
make[2]: *** [gettext.lo] Error 1
The HPUX man page for mmap documents its failure return value as "-1",
so I hacked around this with
#ifndef MAP_FAILED
#define MAP_FAILED ((void *) (-1))
#endif
whereupon it built and passed the simple self-test you suggested.
However, I think it's pretty foolish to depend on mmap for such
little reason as this code does. I suggest ripping out the mmap
usage and just reading the file with good old read(2).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-05-24 12:37:09 | Re: Smaller access privilege changes |
Previous Message | Tom Lane | 2001-05-24 12:03:30 | Re: Bug#98565: postgresql logs notices with GMT timestamps in syslog (fwd) |