cygwin bugs in unistd

2009-12-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Now that cygwin 1.7.1 has been released as a stable version, I'm pushing this (the problem has already been fixed in CVS, so cygwin 1.7.2 will not need it). I verified that my pending patches for signature_check fail as follows without this patch: gc

Re: btwowc(EOF) hang with gcc 4.4.2

2009-12-23 Thread Karl Berry
> correctly, then if your gcc supports -fgnu89-inline, you can work around the > issue by specifying CFLAGS='-fgnu89-inline' at configure time. Thanks. By the way, I don't have it 100% nailed down yet, but it seems likely that the fixed wchar.h was not installed (it did get built) becau

Re: ASSERT and SIGNATURE_CHECK macros

2009-12-23 Thread Eric Blake
Bruno Haible clisp.org> writes: > So, how to resolve this contradicting requirements? > > Possibility 1: Put the SIGNATURE_CHECK into a file tests/signature.h, and put > ASSERT, SIZEOF and a few others into tests/macros.h. A test looks like this: > >#include > >#include > >#incl

Re: ASSERT and SIGNATURE_CHECK macros

2009-12-23 Thread Bruno Haible
Hi Eric, > that also means that test/macros.h must NOT include any system headers (so > that > SIGNATURE_CHECK can be invoked after config.h, macros.h, and exactly one > system > header has been included). Thanks for stating this so clearly. Because on the other hand, I would like tests/macros

Re: _GL_UNUSED macro

2009-12-23 Thread Bruno Haible
Eric Blake wrote: > I'd rather see _GL_UNUSED_PARAMETER than > _GL_UNUSED_PARAMETER_, given that we have _GL_ARG_NONNULL without a trailing > underscore. Indeed. The motivation for the trailing underscore was purely "aesthetic" (or "obscure", depending on your point of view). I'll omit it. Brun

Re: ASSERT macro

2009-12-23 Thread Bruno Haible
Eric Blake wrote: > > It does not require a modification of gnulib-tool. tests/macros.h is not > > different in principle than tests/nan.h; it's only used in more places. > > But that means listing tests/macros.h in more than 100 modules/*-tests files. > > There comes a point where a file is so

Re: ASSERT and _GL_UNUSED macros

2009-12-23 Thread Eric Blake
Bruno Haible clisp.org> writes: > > OK, then I'll work on making gnulib-tool always distribute tests/macros.h > > along with any test, and move ASSERT into that file (but as separate > > steps, to make the reviews easier). > > It does not require a modification of gnulib-tool. tests/macros.h is

Re: ASSERT and _GL_UNUSED macros

2009-12-23 Thread Bruno Haible
Hi Eric, > > Since it's a utility macro only for the tests, I would much prefer to have > > it > > in a file such as tests/macros.h, rather than polluting config.h with stuff > > that exists only for the tests. This file tests/macros.h could also contain > > the ubiquitous ASSERT macro. (I try to

localename and thread locale

2009-12-23 Thread Bruno Haible
Hi, It has been reported [1][2] that the gl_locale_name function in gnulib is not aware of the locale that may have been set in a thread using the 'uselocale' API (on glibc and MacOS X systems). This fixes it. [1] http://savannah.gnu.org/bugs/?27520 [2] http://lists.gnu.org/archive/html/bug-libun

va-args (was: GL_LINK_WARNING)

2009-12-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 12/15/2009 12:29 PM: >> 3. Like 2, but also check in the new va-args module (others might have a use >> for it, even though it would be unused in gnulib at this point) > I didn't see any reason to discard this patch, even

Re: stdlib tweak

2009-12-23 Thread Jim Meyering
Bruno Haible wrote: >> Considering that this will appear in nearly every .c file in gnulib/lib, > > You mean, in gnulib/tests/, I guess? Yes. >> Then, each use would be more concise: >> >> GL_SIG_CHECK (atexit, int, (void (*) (void))); > > I like the idea: it provides an abstraction over this

Re: stdlib tweak

2009-12-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 12/23/2009 5:22 AM: >> Considering that this will appear in nearly every .c file in gnulib/lib, > > You mean, in gnulib/tests/, I guess? My use of the signature check was only in gnulib/tests. > >> Then, each use would

fewer test warnings

2009-12-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm applying this, noticed during 'make check' on coreutils: - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcas

Re: stdlib tweak

2009-12-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 12/23/2009 3:32 AM: >> I went with signature_check. > > I like it. And yes, we need to make it non-'static', like so many other stuff > in unit tests that we don't want gcc to warn about. I can go either way on static vs.

Re: stdlib tweak

2009-12-23 Thread Bruno Haible
Hi Jim, >> > +static int (* _UNUSED_PARAMETER_ signature_check) (void (*) (void)) = >> > atexit; > > Considering that this will appear in nearly every .c file in gnulib/lib, You mean, in gnulib/tests/, I guess? > Then, each use would be more concise: > > GL_SIG_CHECK (atexit, int, (void (

Re: stdlib tweak

2009-12-23 Thread Jim Meyering
Eric Blake wrote: > Jim Meyering meyering.net> writes: > >> > +int (*signature_check) (void (*) (void)) = atexit; >> >> I haven't looked carefully at each or tested, but... >> please use the "static" attribute on all of those, >> as in your example above. > > I thought about that, but with: > > +s

Re: stdlib tweak

2009-12-23 Thread Bruno Haible
Hi Eric, > > > in order to validate that a function is correctly declared when the user > > > includes just the one header named in the standards. We can then fix the > > > fallout by making the *.in.h headers pull in the necessary pre-requisites > > > for > > > functions that declared in the wr

Re: stdlib tweak

2009-12-23 Thread Bruno Haible
Hi Eric, > --- a/lib/unistd.in.h > +++ b/lib/unistd.in.h > @@ -346,9 +346,6 @@ extern int ftruncate (int fd, off_t length); > > > #if @GNULIB_GETCWD@ > -/* Include the headers that might declare getcwd so that they will not > - cause confusion if included after this file. */ > -# include >