Re: BSD gettext
От | Tom Lane |
---|---|
Тема | Re: BSD gettext |
Дата | |
Msg-id | 29525.990707497@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BSD gettext (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: BSD gettext
Re: BSD gettext |
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.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
В списке pgsql-hackers по дате отправления: