[bug-gnulib] Re: New getlogin_r module

2005-05-27 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > Section 7.1.4 of the C89 spec states, "The value of errno ... is never > set to zero by any library function." I am assuming that getlogin_r and > probably most other GNULIB functions should act like library functions > when possible? It sounds reasonabl

Re: [bug-gnulib] Re: comparison_fn_t

2005-05-27 Thread Paul Eggert
"Oskar Liljeblad" <[EMAIL PROTECTED]> writes: > Sure, but assume you're passing strcmp for the comparison function, > wouldn't you want to cast it to avoid the warning? I should warn you that the C Standard does not allow that sort of cast. This is for portability to hosts that use different rep

Re: [bug-gnulib] ullong_max vs. stdint.h/inttypes.h

2005-05-27 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > Right now, only the fts module depends on ULLONG_MAX in the ullong_max > module Hmm, but that wasn't in modules/fts -- I guess this was a bug? And I think it's also a bug that modules/fts and modules/fts-lgpl disagree about the gettext dependencies. > Sho

Re: [bug-gnulib] references to POSIX

2005-05-27 Thread Yoann Vandoorselaere
On Fri, 2005-05-27 at 14:47 +0200, Bruno Haible wrote: > Hi, > > For those modules which implement some functionality specified by POSIX, > I propose to add a reference to the POSIX spec as an URL. This is a handy > reference. > > See attached patch. Files affected: > getaddrinfo.h (Simon Jose

[bug-gnulib] Re: stat and lstat should define their replacements

2005-05-27 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > The crucial trick here is the ability to compile lstat.c so that it uses > the original lstat function (be it #defined to lstat64 or not). This idea looks good to me. But: > ! static int > ! rpl_lstat (const char *file, struct stat *sbuf) Surely the "

Re: [bug-gnulib] Re: references to POSIX

2005-05-27 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > Besides, isn't it worth a tiny sacrifice to avoid > systematically including meaningless (and long) strings > like onlinepubs/009695399/ in our code and documentation? I'm reluctant to put URLs like that in the code or documentation, since they mutate to

[bug-gnulib] Re: stat and lstat should define their replacements

2005-05-27 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Haible wrote: >! #include This is no longer necessary. Regards, Derek -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCl4U4LD1OTBfyMaQRAtHxAKCfWXjmMflLt

[bug-gnulib] Re: stat and lstat should define their replacements

2005-05-27 Thread Bruno Haible
Jim Meyering wrote: > We should try hard not to let the bugs of a few broken systems > push us into polluting our interfaces with the work-arounds. ... > ... > BTW, I suspect that testing for the HAVE_LSTAT_EMPTY_STRING_BUG > code isn't useful anymore. It works around bugs in SunOS4.1.4 > and vint

Re: [bug-gnulib] stat and lstat should define their replacements

2005-05-27 Thread Derek Price
Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > > > >>+/* Get the system versions when something else was defined by config.h. */ >>+#undef lstat >>+#undef stat >> >> > >A big worry here is hosts that use something like "#define stat >stat64" when compiled in large-file mode.

[bug-gnulib] Re: references to POSIX

2005-05-27 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: ... >> use shortened URLs. E.g., this >> http://www.opengroup.org/susv3xsh/gai_strerror.html >> redirects to this: >> http://www.opengroup.org/onlinepubs/009695399/functions/gai_strerror.html ... > Interesting :-) > > However, some

[bug-gnulib] Re: references to POSIX

2005-05-27 Thread Bruno Haible
Jim Meyering wrote: > My only reservation was with the long URLs, so asked, > and just learned (thanks to Andrew Josey) that we can > use shortened URLs. E.g., this > > http://www.opengroup.org/susv3xsh/gai_strerror.html > > redirects to this: > > http://www.opengroup.org/onlinepubs/009695399/

[bug-gnulib] Re: references to POSIX

2005-05-27 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > For those modules which implement some functionality specified by POSIX, > I propose to add a reference to the POSIX spec as an URL. This is a handy > reference. > > See attached patch. Files affected: > getaddrinfo.h (Simon Josefsson) > getcwd.h

[bug-gnulib] Re: references to POSIX

2005-05-27 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > Hi, > > For those modules which implement some functionality specified by POSIX, > I propose to add a reference to the POSIX spec as an URL. This is a handy > reference. > > See attached patch. Files affected: > getaddrinfo.h (Simon Josefsson) > getc

[bug-gnulib] ullong_max vs. stdint.h/inttypes.h

2005-05-27 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Right now, only the fts module depends on ULLONG_MAX in the ullong_max module, and uses it only to generate its own PRIuMAX macro if didn't. But stdint.h (and gnulib stdint_.h) defines UINTMAX_MAX, which does the same thing as ULLONG_MAX is trying to

[bug-gnulib] references to POSIX

2005-05-27 Thread Bruno Haible
Hi, For those modules which implement some functionality specified by POSIX, I propose to add a reference to the POSIX spec as an URL. This is a handy reference. See attached patch. Files affected: getaddrinfo.h (Simon Josefsson) getcwd.h (all) inet_ntop.h(Yoann Vandoorselaere)

[bug-gnulib] Re: comparison_fn_t

2005-05-27 Thread Bruno Haible
Oskar Liljeblad wrote: > > extern void my_sort (void *, size_t, size_t, > >int (*) (const void *, const void *)); > > Sure, but assume you're passing strcmp for the comparison function, > wouldn't you want to cast it to avoid the warning? Yes, and there's nothing wrong wi

[bug-gnulib] Re: comparison_fn_t

2005-05-27 Thread Oskar Liljeblad
On Friday, May 27, 2005 at 13:26, Bruno Haible wrote: > > GNU libc defines comparison_fn_t in stdlib.h if _GNU_SOURCE is defined. > > The type is defined like this: > > > > typedef int (*comparison_fn_t) (const void *, const void *); > > > > I tend to use this type a little everywhere, so I would

[bug-gnulib] Re: comparison_fn_t

2005-05-27 Thread Bruno Haible
Oskar Liljeblad wrote: > GNU libc defines comparison_fn_t in stdlib.h if _GNU_SOURCE is defined. > The type is defined like this: > > typedef int (*comparison_fn_t) (const void *, const void *); > > I tend to use this type a little everywhere, so I would like to make > a module for this definitio

[bug-gnulib] Re: config.charset of localcharset

2005-05-27 Thread Oskar Liljeblad
On Friday, May 27, 2005 at 13:25, Bruno Haible wrote: > > Shouldn't config.charset of the localcharset module be in build-aux > > rather than lib? > > Why? config.charset is not used by 'configure'. > > It's used by lib/Makefile, to create a file 'charset.alias' that is later > installed. If you

[bug-gnulib] Re: config.charset of localcharset

2005-05-27 Thread Bruno Haible
Oskar Liljeblad wrote: > Shouldn't config.charset of the localcharset module be in build-aux > rather than lib? Why? config.charset is not used by 'configure'. It's used by lib/Makefile, to create a file 'charset.alias' that is later installed. If you were to put config.charset under build-aux/,

[bug-gnulib] comparison_fn_t

2005-05-27 Thread Oskar Liljeblad
GNU libc defines comparison_fn_t in stdlib.h if _GNU_SOURCE is defined. The type is defined like this: typedef int (*comparison_fn_t) (const void *, const void *); I tend to use this type a little everywhere, so I would like to make a module for this definition. But what should the the header f