avoid vasnprintf warnings

2009-12-31 Thread Bruno Haible
On Solaris 8, I'm seeing these warnings: "./vasnprintf.c", line 2385: warning: argument #3 is incompatible with prototype: "./vasnprintf.c", line 2430: warning: argument #3 is incompatible with prototype: "./vasnprintf.c", line 2479: warning: argument #3 is incompatible with prototype: "./vasnp

iconv.m4: recognize Solaris bug

2009-12-31 Thread Bruno Haible
The test-striconveh.c test was extended on 2009-09-05 to test also the conversion from ASCII to ISO-8859-1 with invalid input. This test fails on Solaris 8, 9, 10 with the native (non-GNU) Solaris iconv because it is not able to report invalid input at least in this case. This fixes it by undefini

Re: copyright question on recent autoupdate

2009-12-31 Thread Karl Berry
I just noticed that with the recent autoupdate, config.sub now has a copyright of 2010 but a timestamp of 2009-12-30 two lines later. It looks rather awkward. Is there any legal issue with listing a copyright year too soon? It seems suboptimal, but I can't imagine that it's a sub

Re: link-warning usage improvements

2009-12-31 Thread Eric Blake
Eric Blake byu.net> writes: > > Reducing two invocations of AC_CHECK_HEADERS_ONCE to a single one will > > IMO not bring large benefits. > > Then how about a patch in the converse direction, that ensures > AC_CHECK_HEADERS_ONCE is called prior to any use of ac_cv_header_xxx_h, rather > than t

Re: link-warning usage improvements

2009-12-31 Thread Eric Blake
Bruno Haible clisp.org> writes: > > gl_CHECK_NEXT_HEADERS invokes AC_CHECK_HEADERS under the hood. > > Well, it does, but it's not documented. It's an abstraction violation to > exploit this knowledge (even though we do in some places). > > > That means several other .m4 file can probably be si

warn-on-use preview

2009-12-31 Thread Eric Blake
I've learned my lesson from this morning - I won't push this until it's had a bit longer for reviews. At any rate, this introduces warn-on-use, then demonstrates three distinct ways to use it. I am still working on the global change of all remaining uses of GL_LINK_WARNING over to _GL_WARN_ON_

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > gl_CHECK_NEXT_HEADERS invokes AC_CHECK_HEADERS under the hood. Well, it does, but it's not documented. It's an abstraction violation to exploit this knowledge (even though we do in some places). > That means several other .m4 file can probably be simplified: Reducing two invo

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > But your fix is also incomplete. For example: > > > --- 306,315 > >__THROW _GL_ARG_NONNULL ((1, 2)); > > # endif > > #elif defined GNULIB_POSIXCHECK > > ! # undef posix_spawnattr_getflags > > ! # define posix_spawnattr_getflags(a, b) \

Re: several cleanups

2009-12-31 Thread Eric Blake
Eric Blake byu.net> writes: > I noticed these while working towards improving link-warning over to > compile warnings. And one more: From: Eric Blake Date: Thu, 31 Dec 2009 13:43:28 -0700 Subject: [PATCH 1/2] test-dup2: avoid compiler warning A warning cropped up from the 2009-12-28 change,

doc: cygwin getopt

2009-12-31 Thread Eric Blake
I've added this to my queue. From: Eric Blake Date: Thu, 31 Dec 2009 08:48:16 -0700 Subject: [PATCH] doc: correct availability of cygwin 1.5.x getopt * doc/posix-functions/optarg.texi (optarg): Cygwin supplies getopt variables. * doc/posix-functions/opterr.texi (opterr): Likewise. * doc/posix-f

Re: link-warning usage improvements

2009-12-31 Thread Eric Blake
Eric Blake byu.net> writes: > Huh. gl_CHECK_NEXT_HEADERS invokes AC_CHECK_HEADERS under the hood. That > means several other .m4 file can probably be simplified: > Here's what I came up with: From: Eric Blake Date: Thu, 31 Dec 2009 14:35:32 -0700 Subject: [PATCH 1/2] spawn: yet more fixes

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > +   * modules/arpa_inet (Makefile.am): Always build replacement > +   header. > +   * modules/ctype (Makefile.am): Likewise. > +   * modules/dirent (Makefile.am): Likewise. > +   * modules/inttypes (Makefile.am): Likewise. > +   * modules/langinfo (Makefi

Re: link-warning usage improvements

2009-12-31 Thread Eric Blake
Bruno Haible clisp.org> writes: > Some further updates of the gl_REPLACE_*_H macros and comments. I think > these gl_REPLACE_*_H macros should be kept; we don't know how the idioms > will evolve in the future. Nice. In writing my patch, I had noticed that some shell variables (like WCHAR_H) we

Re: link-warning usage improvements

2009-12-31 Thread Eric Blake
Bruno Haible clisp.org> writes: > > Eric Blake wrote: > > +   * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. > > Your patch reordered the statements in such a way that ac_cv_header_sys_select_h > can be tested before it is computed. This fixes it. Thanks for catching that. Huh.

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > +   * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET) > +   (gl_ARPA_INET_H_DEFAULTS): Drop unneeded variable. > +   * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise. > +   * m4/isblank.m4 (gl_FUNC_ISBLANK): Likewise. > +   * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H, gl_DIRE

Re: link-warning usage improvements

2009-12-31 Thread Eric Blake
Bruno Haible clisp.org> writes: > Looks like some part of this patch was misapplied: posix_spawnattr_getsigdefault > gets a link warning twice, and some others under the wrong #elif. I'm applying > this fix: But your fix is also incomplete. For example: > --- 306,315 >__THROW _GL

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > +   * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. Your patch reordered the statements in such a way that ac_cv_header_sys_select_h can be tested before it is computed. This fixes it. 2009-12-31 Bruno Haible * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT):

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > +   * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H) > +   (gl_SYS_UTSNAME_H_DEFAULTS): Likewise. The patch you committed lacked the modification corresponding to the second ChangeLog line. I'm adding it: 2009-12-31 Bruno Haible * m4/sys_utsname_h.m4 (gl_SYS_UTSNA

Re: link-warning usage improvements

2009-12-31 Thread Eric Blake
Bruno Haible clisp.org> writes: > Eric Blake wrote: > > +   * tests/test-signal.c (main): Enhance test. > > One part of this does not look right. OK to remove this? Yes - I spotted that earlier this morning, and it was already in my queue (one too many copy-n-paste). But if you push befor

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > +   * tests/test-signal.c (main): Enhance test. One part of this does not look right. OK to remove this? *** tests/test-signal.c.origThu Dec 31 22:18:46 2009 --- tests/test-signal.c Thu Dec 31 22:18:31 2009 *** *** 110,118 #ifdef SIGXFSZ case

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > * lib/spawn.in.h (posix_spawn, posix_spawnp, posix_spawnattr_init) > (posix_spawnattr_destroy, posix_spawnattr_getsigdefault) > (posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask) > (posix_spawnattr_setsigmask, posix_spawnattr_getflags) > (posix_spawnattr_setflags, posix

Re: link-warning usage improvements

2009-12-31 Thread Bruno Haible
Eric Blake wrote: >  2009-12-31  Eric Blake   > > +   sys_times, sys_utsname: use include_next > +   * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Support wrapping an existing > +   header. > +   (gl_SYS_TIMES_H_DEFAULTS): Add another variable. > +   * m4/sys_utsname_h.m4 (gl_SYS_UTSNA

Re: utimens: new shadowing warning

2009-12-31 Thread Eric Blake
Eric Blake byu.net> writes: > I just spotted a larger logic problem - on Linux kernels between 2.6.19 and > 2.6.22 (when utimensat existed, but rejected AT_SYMLINK_NOFOLLOW)(, we are now > calling lstat twice when only once is necessary. Therefore, I think the best > course of action is to r

Re: [PATCH] maint.mk: don't require explicit gpg_key_ID in cfg.mk

2009-12-31 Thread Eric Blake
Jim Meyering meyering.net> writes: > > git config user.signingkey > > I'd rather not, since there's no guarantee that > it won't have changed between the tagging operation > and whenever someone runs the announcement-generating rule. On the other hand, we should probably kill the (unused) VC-ta

Re: utimens: new shadowing warning

2009-12-31 Thread Eric Blake
Jim Meyering meyering.net> writes: > utimens.c: In function 'lutimens': > utimens.c:425: error: declaration of 'st' shadows a previous local [- Wshadow] > utimens.c:404: error: shadowed declaration is here [-Wshadow] > > This patch is nearly minimal, but perhaps not ideal. Thanks for the

utimens: new shadowing warning

2009-12-31 Thread Jim Meyering
Hi Eric, Without this patch, coreutils no longer builds when configured with --enable-gcc-warnings: utimens.c: In function 'lutimens': utimens.c:425: error: declaration of 'st' shadows a previous local [-Wshadow] utimens.c:404: error: shadowed declaration is here [-Wshadow] This patch is n

Re: inline cleanup, part 3

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > the proposed patch is okay with me, as long as you verify that none of > your changes to gl_PREREQ_* blocks cause problems. Verified by inspection. Jim Meyering wrote: > Fine by me. Thanks! Committed and pushed. Bruno

Re: inline cleanup, part 3

2009-12-31 Thread Jim Meyering
Bruno Haible wrote: > I'm applying the first patch below and proposing the additional 3 patches at > the end. Jim, Eric, ok to apply? ... > 2009-12-31 Bruno Haible > > Use AC_C_INLINE where necessary. > * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Require AC_C_INLINE. > > Use AC_

Re: [PATCH] maint.mk: don't require explicit gpg_key_ID in cfg.mk

2009-12-31 Thread Jim Meyering
Eric Blake wrote: > Jim Meyering meyering.net> writes: > >> I've long wanted to avoid hard-coding my GPG key ID >> in each project's cfg.mk file. The stumbling block was >> how to derive the key ID from the tag signature. >> I wanted to avoid relying on the content of gpgv's (gpg --verify's) >> d

Re: inline cleanup, part 3

2009-12-31 Thread Bruno Haible
Hi Eric, > if gl_PREREQ_whatever is changed to have no output (as you just did > here, by changing : to AC_REQUIRE), then you created a syntax error. Oops, you're right. I propose to use the patch below instead. > In general, I've been starting to steer away from trivial gl_PREREQ blocks > (th

copyright question on recent autoupdate

2009-12-31 Thread Eric Blake
I just noticed that with the recent autoupdate, config.sub now has a copyright of 2010 but a timestamp of 2009-12-30 two lines later. It looks rather awkward. Is there any legal issue with listing a copyright year too soon? -- Eric Blake

Re: inline cleanup, part 3

2009-12-31 Thread Eric Blake
Bruno Haible clisp.org> writes: > AC_DEFUN([gl_PREREQ_CHDIR_LONG], > [ > - : > + AC_REQUIRE([AC_C_INLINE]) > ]) In general, this is dangerous. The idiom has often been: if condition; then gl_PREREQ_whatever fi which means if gl_PREREQ_whatever is changed to have no output (as you just

Re: [PATCH] maint.mk: don't require explicit gpg_key_ID in cfg.mk

2009-12-31 Thread Eric Blake
Jim Meyering meyering.net> writes: > I've long wanted to avoid hard-coding my GPG key ID > in each project's cfg.mk file. The stumbling block was > how to derive the key ID from the tag signature. > I wanted to avoid relying on the content of gpgv's (gpg --verify's) > diagnostic, but it seems ot

[PATCH] maint.mk: don't require explicit gpg_key_ID in cfg.mk

2009-12-31 Thread Jim Meyering
I've long wanted to avoid hard-coding my GPG key ID in each project's cfg.mk file. The stumbling block was how to derive the key ID from the tag signature. I wanted to avoid relying on the content of gpgv's (gpg --verify's) diagnostic, but it seems other tools (at least one perl module) do precise

inline cleanup, part 3

2009-12-31 Thread Bruno Haible
The following files use 'inline' but don't require AC_C_INLINE. lib/chdir-long.c lib/fatal-signal.c lib/fts.c lib/mbchar.h lib/mbfile.h lib/mbiter.h lib/mbuiter.h lib/regcomp.c lib/regexec.c lib/regex_internal.c lib/regex_internal.h lib/stat.c lib/u64.h lib/wait-process

Re: inline cleanup, part 2

2009-12-31 Thread Jim Meyering
Bruno Haible wrote: > Eric Blake wrote: >> But yes, it is sufficient to use the >> lighter-weight AC_C_INLINE, rather than the full-blown 'inline' module. >> Thanks for catching that. > > This overkill also occurs in a number of other places. I'm applying the first > patch below. > > Jim, is the se

[PATCH] maint.mk: create announcement template in ~/, not in /tmp

2009-12-31 Thread Jim Meyering
FYI, >From acb9c9fcc70a0f65855e9939eb1b632b3a510d8f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 31 Dec 2009 15:59:29 +0100 Subject: [PATCH] maint.mk: create announcement template in ~/, not in /tmp * top/maint.mk (emit_upload_commands): Adjust. (release-prep): Emit into ~/announce-...

Re: inline cleanup, part 2

2009-12-31 Thread Eric Blake
Bruno Haible clisp.org> writes: > Jim, is the second patch (at the end) below also OK to apply? > > 2009-12-31 Bruno Haible clisp.org> > > Use AC_C_INLINE instead of module 'inline' where possible. > * m4/openat.m4 (gl_PREREQ_OPENAT): Require AC_C_INLINE. > * modules/openat

inline cleanup, part 2

2009-12-31 Thread Bruno Haible
Eric Blake wrote: > But yes, it is sufficient to use the > lighter-weight AC_C_INLINE, rather than the full-blown 'inline' module. > Thanks for catching that. This overkill also occurs in a number of other places. I'm applying the first patch below. Jim, is the second patch (at the end) below als

inline cleanup, part 1

2009-12-31 Thread Bruno Haible
Reviewing the uses of 'inline', 'HAVE_INLINE', AC_C_INLINE against each other, there are a couple of mismatches. Part 1: Uses of AC_C_INLINE that are not necessary. I'm applying this: 2009-12-31 Bruno Haible Remove unnecessary AC_C_INLINE invocation. * m4/popen.m4 (gl_PREREQ_

Re: several cleanups

2009-12-31 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 12/31/2009 1:23 AM: > Eric Blake wrote: >> 2009-12-30 Eric Blake >> >> + fdutimensat: remove bogus dependency >> + * modules/fdutimensat (Depends-on): Drop inline. >> > > There is still a use of 'inline' in

Re: test-localename crash

2009-12-31 Thread Simon Josefsson
Bruno Haible writes: > Hi Simon, > > Simon Josefsson wrote: >> The test-localename test crashes for me: >> #0 strcmp () at ../sysdeps/i386/i686/strcmp.S:39 >> #1 0x08049840 in test_locale_name_thread () at test-localename.c:421 >> Debugging it shows that the variables passed to strcmp are NULL.

Re: test-localename mingw failure?

2009-12-31 Thread Simon Josefsson
Bruno Haible writes: > It would be nice to be able to support uselocale and newlocale on all > platforms, but it is unrealistic: The support code would be huge, because it > would have to override every function that is locale dependent in some sense. > > Therefore, on platforms where the system

Re: several cleanups

2009-12-31 Thread Bruno Haible
Eric Blake wrote: >  2009-12-30  Eric Blake   > > +   fdutimensat: remove bogus dependency > +   * modules/fdutimensat (Depends-on): Drop inline. > There is still a use of 'inline' in lib/utimens.h. Isn't this needed? 2009-12-31 Bruno Haible * modules/fdutimensat (configure