Re: declare getloadavg in stdlib.h

2008-10-18 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Hi Jim, > > We have been adopting the approach to declare functions provided by glibc > (but not specified by POSIX) in the same header file as glibc does. This > makes sense because most development takes place on glibc systems today. > > The ones that no

Re: Warnings to be fixed

2008-10-18 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> +2008-10-16 Jim Meyering <[EMAIL PROTECTED]> >> + >> +openat-die.c: avoid 'no previous prototype' warning >> +* lib/openat-die.c: Include "openat.h". >> +Reported by Reuben Thomas <[EMAIL PROTECTED]>. > > Thanks to this

declare lchmod in sys/stat.h

2008-10-18 Thread Bruno Haible
glibc and the BSD systems declare lchmod() in . Therefore gnulib should do the same. Here's a proposed patch to that effect. 2008-10-18 Bruno Haible <[EMAIL PROTECTED]> * lib/dirchownmod.c: Don't include lchmod.h. * lib/lchmod.h: Remove file. * lib/sys_stat.in.h: Add p

declare getdomainname in unistd.h

2008-10-18 Thread Bruno Haible
glibc declares getdomainname in . gnulib should do the same. I'm applying this patch, to this effect. 2008-10-18 Bruno Haible <[EMAIL PROTECTED]> * lib/xgetdomainname.c: Include instead of getdomainname.h. Move the getdomainname() declaration to . * lib/getdomainname.

declare dirfd() in dirent.h

2008-10-18 Thread Bruno Haible
glibc declares the dirfd() function in . Here's a proposed patch to do the same in gnulib. 2008-10-18 Bruno Haible <[EMAIL PROTECTED]> * lib/dirfd.h: Remove file. * lib/dirent.in.h: Add placeholder for GL_LINK_WARNING. (dirfd): New declaration. * lib/dirfd.c: Inc

Re: Warnings to be fixed

2008-10-18 Thread Bruno Haible
Jim Meyering wrote: > +2008-10-16 Jim Meyering <[EMAIL PROTECTED]> > + > + openat-die.c: avoid 'no previous prototype' warning > + * lib/openat-die.c: Include "openat.h". > + Reported by Reuben Thomas <[EMAIL PROTECTED]>. Thanks to this change, I now get a compilation error when comp

new module 'dirent'

2008-10-18 Thread Bruno Haible
As a preparation for next patches, it's useful to separate the 'dirent.h' header file module from the 'fchdir' function's module. I'm committing this: 2008-10-18 Bruno Haible <[EMAIL PROTECTED]> * modules/dirent: New file. * m4/dirent_h.m4: New file. * m4/fchdir.m4 (gl_

declare euidaccess in unistd.h

2008-10-18 Thread Bruno Haible
The header file in which glibc declares euidaccess() is . Here's a proposed patch for gnulib to do the same. The patch also contains a simplification: No need to check whether euidaccess is declared. According to doc/glibc-functions/euidaccess.texi, glibc is the only platform so far that has this

declare getusershell in unistd.h

2008-10-18 Thread Bruno Haible
glibc declares get/set/endusershell() in . Here is a proposed patch for gnulib to do the same. 2008-10-18 Bruno Haible <[EMAIL PROTECTED]> * lib/unistd.in.h (getusershell, setusershell, endusershell): New declarations. * lib/getusershell.c: Include unistd.h. * m

declare getloadavg in stdlib.h

2008-10-18 Thread Bruno Haible
Hi Jim, We have been adopting the approach to declare functions provided by glibc (but not specified by POSIX) in the same header file as glibc does. This makes sense because most development takes place on glibc systems today. The ones that not yet follow this idiom: - getloadavg, getusershell

Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c

2008-10-18 Thread Bruno Haible
Hi Eric, > When used in a library, the gnulib fatal-signal module must assume that > the rest of the program can use SIGPOLL and SIGALRM for its own purposes. > But when used in a stand-alone app, such as csplit, where it is known in > advance that these signals are not used, it would be nice to i

Re: abort() on Windows 2008 Server

2008-10-18 Thread Bruno Haible
Hi Eric, Thanks for the forward. Ramiro Polla wrote: > > The loop at sigprocmask.c:197 tests signal() on all signals up to NSIG > > for SIG_ERR. On some version of Windows (I haven't checked which one, > > but it affects Windows 2008 Server), a new signal has been added. It > > is the SIGABRT_COM

Re: "unused parameter" warnings

2008-10-18 Thread Bruno Haible
Jim Meyering wrote: > This is a good change. So I applied it, > Whether to replace all existing __attribute__ ((__attribute__)) > uses with _UNUSED_PARAMETER_ is a harder call. There's no immediate need to do so. Bruno

Re: minus_zero-related tests fail to compile on ppc with recent gcc

2008-10-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [adding bug-gnulib, as this is more useful to the group than just me] According to Nelson H. F. Beebe on 10/18/2008 11:47 AM: >>> does the concept in this patch fix the issue you had with m4 1.4.12? >>> http://lists.gnu.org/archive/html/bug-gnulib/200

Re: minus_zero-related tests fail to compile on ppc with recent gcc

2008-10-18 Thread Bruno Haible
Nelson H. F. Beebe wrote: > >> While Nelson Beebe's report says "Apple Mac OS X 10.x PowerPC", I > >> could not reproduce any problem on MacOS X 10.3.9.) > >> ... > I have a later O/S release, and newer compilers: > > % sw_vers > ProductName:Mac OS X > ProductVersion: 10.4.11 I see; this expl

Re: "unused parameter" warnings

2008-10-18 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> However, it would be good to accept patches (at least for gnulib's .h >> files) that mark each unused parameter with __attribute__ ((__unused__)). >> Then, a project that requires use of -Wunused-parameter can use gnulib's >> headers

Re: "unused parameter" warnings

2008-10-18 Thread Bruno Haible
Jim Meyering wrote: > However, it would be good to accept patches (at least for gnulib's .h > files) that mark each unused parameter with __attribute__ ((__unused__)). > Then, a project that requires use of -Wunused-parameter can use gnulib's > headers without having to relax their standards. I ag

Re: abort() on Windows 2008 Server

2008-10-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ramiro Polla on 10/18/2008 10:55 AM: Hello Ramiro, and thanks for the report. > Hello, > > GNU m4 1.4.12 abort()s running on Windows 2008 Server. It doesn't go > further than setting the signal handlers, so any call to m4.exe will > fai

Re: minus_zero-related tests fail to compile on ppc with recent gcc

2008-10-18 Thread Nelson H. F. Beebe
Bruno Haible <[EMAIL PROTECTED]> asks about my problem report of compiling the expression -LDBL_MIN * LDBL_MIN on Mac OS X PowerPC systems: >> ... >> While Nelson Beebe's report says "Apple Mac OS X 10.x PowerPC", I >> could not reproduce any problem on MacOS X 10.3.9.) >> ... The problem definit

Re: "unused parameter" warnings

2008-10-18 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Reuben Thomas wrote: >> gl_anylinked_list2.h: In function ‘gl_linked_node_value’: >> gl_anylinked_list2.h:124: warning: unused parameter ‘list’ >> gl_anylinked_list2.h: In function ‘gl_linked_node_set_value’: >> gl_anylinked_list2.h:130: warning: unused par

Re: "unused parameter" warnings

2008-10-18 Thread Bruno Haible
Reuben Thomas wrote: > gl_anylinked_list2.h: In function ‘gl_linked_node_value’: > gl_anylinked_list2.h:124: warning: unused parameter ‘list’ > gl_anylinked_list2.h: In function ‘gl_linked_node_set_value’: > gl_anylinked_list2.h:130: warning: unused parameter ‘list’ > gl_anylinked_list2.h: In funct

Re: Warnings to be fixed

2008-10-18 Thread Bruno Haible
Reuben Thomas wrote: > gl_anylinked_list2.h: In function ‘gl_linked_iterator’: > gl_anylinked_list2.h:818: warning: ‘result.j’ is used uninitialised in this > function > gl_anylinked_list2.h:818: warning: ‘result.i’ is used uninitialised in this > function > gl_anylinked_list2.h:818: warning: ‘re

Re: Warnings to be fixed

2008-10-18 Thread Bruno Haible
Reuben Thomas wrote: > In general, I reiterate the principle I implied with my request that > #include_next warnings be suppressed some time ago: gnulib (and source > libraries in general) should not generate warnings. As explained in [1]: We cannot guarantee no warning. If you find warnings obt

Re: memchr.c breaks with some warnings turned on

2008-10-18 Thread Bruno Haible
Hi, Monty Taylor wrote: > memchr.c doesn't compile if -Wunused-macros -Werror is turned on. gnulib does not support building with -Werror in general. See [1]. When you report warnings that point to real problems, we will fix the problems, of course. When you report warnings that you got with rea

Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c

2008-10-18 Thread Bruno Haible
Eric Blake wrote: > > 3. switch to the gnulib execute module, which makes this code portable to > > mingw (the current fork/exec sequence excludes mingw, which lacks fork), Jim Meyering wrote: > #3 sounds like it's worth a try, at least. Note that we have now posix_spawn() portable to all Unix pl

Re: asymmetry

2008-10-18 Thread Bruno Haible
Simon Josefsson wrote: > Thinking about this, there is some asymmetry between structures and > functions in gnulib: to get a function from a header file, you need to > pull in a module for that function. To get a structure from a header > file, whether you need it or not, you pull in a module for

Re: Warnings to be fixed

2008-10-18 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Paul Eggert <[EMAIL PROTECTED]> wrote: >> Jim Meyering <[EMAIL PROTECTED]> writes: >> >>> mode = (sizeof (mode_t) < sizeof (int) >>> ? va_arg (ap, int) >>> : va_arg (ap, mode_t));<<< line 43 >>> >>> IMHO, adding cas

Re: FreeBSD GCC warnings

2008-10-18 Thread Ralf Wildenhues
Hi Bruno, * Bruno Haible wrote on Sat, Oct 18, 2008 at 12:59:30PM CEST: > >Maybe it is time to publish AM_SUBST_NOTMAKE which is like AC_SUBST > > Of course! Currently, in projects which use automake, AC_SUBST with multiline > values will only work if all lines except possibly the first one start

document existing glibc function replacements

2008-10-18 Thread Bruno Haible
A couple of glibc functions have replacements in gnulib, but the documentation does not point to them. This fixes it: 2008-10-18 Bruno Haible <[EMAIL PROTECTED]> * doc/glibc-functions/dirfd.texi: Mention the module 'dirfd'. * doc/glibc-functions/error.texi: Mention the module 'e

Re: minus_zero-related tests fail to compile on ppc with recent gcc

2008-10-18 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> Markus Armbruster <[EMAIL PROTECTED]> wrote: >> > With the appended patch, koji ate it up: >> > http://koji.fedoraproject.org/koji/taskinfo?taskID=886652 >> >> Great! Thanks a lot, Markus. >> >> Bruno, FYI, Markus discovered that >>

Re: 'long double' support on MacOS X and BSD platforms

2008-10-18 Thread Bruno Haible
Hello Nelson, > > Builds of m4-1.4.12 fail on Apple Mac OS X 10.x PowerPC systems > > with this error: > > > > gcc -std=gnu99 -I. -I../lib -I. -I. -I.. -I./.. -I../lib -I./../lib > > -I/usr/local/include -g -O2 > > -MT test-frexpl.o -MD -MP -MF .deps/test-frexpl.Tpo -c -o test-frexpl.o

Re: FreeBSD GCC warnings

2008-10-18 Thread Bruno Haible
Hello Ralf, > > Oops, that did not work. autoconf >= 2.60 supports multiline replacements > > in AC_SUBST, but 'automake' and 'make' don't. > > Well. There is no mapping that will automatically make multiline values > be correctly escaped for makefiles. Maybe it is time to publish > AM_SUBST_NO