Re: [bug-gawk] Problem detecting libsigsegv on gawk 4.0.0 on Solaris 9 Sparc w/Sun Studio 12

2011-07-07 Thread Aharon Robbins
Hi All. > The compilation seems to work cleanly on Solaris 9/10 Sparc and Solaris 10 > i386 with > -Xc -D_XPG4_2 > as the headers have been modified in Solaris 10. It sounds like the right thing for me to do is to update the Solaris specific README file in the gawk dist. Thanks, Arnold

Re: [PATCH 03/10] pthread_sigmask: new module

2011-07-07 Thread Bruno Haible
With these fixes, it is now possible to check the signature of pthread_sigmask in C++ mode: 2011-07-07 Bruno Haible signal-c++-tests: Check declaration of pthread_sigmask. * tests/test-signal-c++.cc: Check declaration of pthread_sigmask. * modules/signal-c++-tests (Mak

Re: [PATCH 03/10] pthread_sigmask: new module

2011-07-07 Thread Bruno Haible
Paul Eggert wrote: > + m4_ifdef([gl_THREADLIB], [ > +AC_REQUIRE([gl_THREADLIB]) > +if test "$gl_threads_api" = posix; then > + gl_save_LIBS="$LIBS" > + LIBS="$LIBS $LIBMULTITHREAD" > + AC_CHECK_FUNCS([pthread_sigmask]) > + LIBS="$gl_save_LIBS" > +fi > + ], [ > +

Re: [PATCH 03/10] pthread_sigmask: new module

2011-07-07 Thread Bruno Haible
On FreeBSD 6.4, in a unit test that checks the signature of pthread_sigmask(), I get a compilation error: test-pthread_sigmask1.c:24: error: `pthread_sigmask' undeclared here (not in a function) *** Error code 1 Similarly on a couple of other platforms. The reason is that the system declares it

Re: [PATCH 03/10] pthread_sigmask: new module

2011-07-07 Thread Bruno Haible
Paul Eggert wrote: > --- a/doc/posix-functions/pthread_sigmask.texi > +++ b/doc/posix-functions/pthread_sigmask.texi > @@ -8,11 +8,14 @@ Gnulib module: --- >   >  Portability problems fixed by Gnulib: >  @itemize > +@item > +This function is missing on some platforms: > +Solaris 2.4, mingw, BeOS. >

Re: [PATCH 03/10] pthread_sigmask: new module

2011-07-07 Thread Bruno Haible
Paul Eggert wrote: > +AC_DEFUN([gl_PTHREAD_SIGMASK], By convention, for modules that provide a single function, the m4 macro starts with gl_FUNC_. Gratuitous differences in naming conventions make maintenance harder. 2011-07-07 Bruno Haible pthread_sigmask: Follow gnulib conventions.

Re: [PATCH 03/10] pthread_sigmask: new module

2011-07-07 Thread Bruno Haible
Paul Eggert wrote: > +#if @GNULIB_PTHREAD_SIGMASK@ > +# if @REPLACE_PTHREAD_SIGMASK@ > +# undef pthread_sigmask > +# define pthread_sigmask sigprocmask > +# endif > +#elif defined GNULIB_POSIXCHECK When I add a signature check to the unit test *** tests/test-signal-c++.cc.orig Thu Jul 7

Re: [PATCH 03/10] pthread_sigmask: new module

2011-07-07 Thread Bruno Haible
Paul Eggert wrote: > 2011-07-05 Paul Eggert > > + pthread_sigmask: new module > + * MODULES.html.sh (Support for systems lacking POSIX:2008): Add it. > + * doc/posix-functions/pthread_sigmask.texi: Document new module. > + * lib/signal.in.h (pthread_sigmask): Arrange for repla

Re: Problem detecting libsigsegv on gawk 4.0.0 on Solaris 9 Sparc w/Sun Studio 12

2011-07-07 Thread Bruno Haible
Dagobert Michelsen wrote: > The problem exists only on Solaris 9 i386 As noted in the problem exists also on Solaris 9 SPARC. > I am inclined to think the header file for Solaris 9 i386 is buggy as gawk > compiles > cleanly wit

[PATCH] getopt: more portable argv creation

2011-07-07 Thread Eric Blake
* m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Rather than casting away const, use char arrays rather than strings. Suggested by Paul Eggert. Signed-off-by: Eric Blake --- ChangeLog|7 m4/getopt.m4 | 96 -- 2 files changed, 60 inse

Re: [PATCH] getopt: avoid compiler warning during configure

2011-07-07 Thread Paul Eggert
On 07/07/11 14:30, Eric Blake wrote: > Sure; do you want to tackle that, or shall I? Please go ahead; thanks.

Re: [PATCH] getopt: avoid compiler warning during configure

2011-07-07 Thread Paul Eggert
On 07/07/11 10:10, Eric Blake wrote: > - if (getopt (3, argv, "W;") != 'W') > + if (getopt (3, (char **) argv, "W;") != 'W') I dunno, adding those casts doesn't seem like much of an improvement. What if some other compiler starts complaining about them? How about this

Re: [PATCH] fts: introduce FTS_NOATIME

2011-07-07 Thread Paul Eggert
On 07/07/11 10:41, Eric Blake wrote: > This gives clients the option to try a non-invasive traversal, Thanks for doing that; a couple of minor comments: > -int fd = open (".", O_SEARCH); > +int fd = open (".", > + O_SEARCH | (ISSET (FTS_NOATIME) ?

Re: [PATCH] getopt: avoid compiler warning during configure

2011-07-07 Thread Eric Blake
On 07/07/2011 03:26 PM, Paul Eggert wrote: > >char *argv[3] = { "program", "-ab", NULL }; > > with stuff like this: > >static char program[] = "program"; >static char x_ab[] = "-ab"; >char *argv[3] = { program, x_ab, NULL }; > > This will pacify the compiler. It's a bit awkward

Re: Problem detecting libsigsegv on gawk 4.0.0 on Solaris 9 Sparc w/Sun Studio 12

2011-07-07 Thread Dagobert Michelsen
Hi Bruno, Am 07.07.2011 um 19:40 schrieb Bruno Haible: > Dagobert Michelsen wrote: >> Maybe the test in awk.h is too strict and should be something like this? > > Do you mean that 'cc' on Solaris cannot be put into a mode where it > 1) Accepts C99 syntax (declarations after statements and the li

Re: [PATCH] fts: introduce FTS_NOATIME

2011-07-07 Thread Eric Blake
On 07/07/2011 03:02 PM, Paul Eggert wrote: > On 07/07/11 10:41, Eric Blake wrote: >> This gives clients the option to try a non-invasive traversal, > > Thanks for doing that; a couple of minor comments: > >> -int fd = open (".", O_SEARCH); >> +int fd = open (".", >> +

Re: [bug-gawk] Problem detecting libsigsegv on gawk 4.0.0 on Solaris 9 Sparc w/Sun Studio 12

2011-07-07 Thread Aharon Robbins
Hi Dagobert. > > -#if !defined(__STDC__) || __STDC__ < 1 > > +#if (!defined(__STDC__) || __STDC__ < 1) && !defined(__EXTENSIONS__) I can understand your frustration but I'm sorry, but this looks to be very specific to the Sun compiler. If you want to extend this so that it's clear it's for the S

[PATCH] fts: introduce FTS_NOATIME

2011-07-07 Thread Eric Blake
This gives clients the option to try a non-invasive traversal, where merely visiting a directory does not update its timestamp, where such is supported by the kernel. Note that whiteout support and O_NOATIME support are orthogonal: there is no way to get O_NOATIME behavior when using __opendir2 to

unit tests for sigprocmask

2011-07-07 Thread Bruno Haible
Our 'sigprocmask' module has no unit tests! Time to change that. If someone knows how to send a signal to a process in a native Win32 environment, feel free to enhance the test. 2011-07-07 Bruno Haible Tests for module 'sigprocmask'. * modules/sigprocmask-tests: New file.

Re: Problem detecting libsigsegv on gawk 4.0.0 on Solaris 9 Sparc w/Sun Studio 12

2011-07-07 Thread Bruno Haible
Dagobert Michelsen wrote: > Maybe the test in awk.h is too strict and should be something like this? Do you mean that 'cc' on Solaris cannot be put into a mode where it 1) Accepts C99 syntax (declarations after statements and the like), 2) Defines __STDC__ to 1, and 3) Has a working file?

[PATCH] getopt: avoid compiler warning during configure

2011-07-07 Thread Eric Blake
Some compilers (or warning settings within a compiler) rightfully complain about assigning a string literal to a char *, since this can lead to undefined behavior if those characters are modified. Use the same casts as in the test file to avoid a spurious rejection of a system getopt merely because

[PATCH] getopt-gnu: avoid crash in glibc getopt

2011-07-07 Thread Eric Blake
Use of "W;" in an option string may be rare, but we might as well avoid crashing on it. * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Detect the problem. * tests/test-getopt.h (test_getopt): Enhance test. * tests/test-getopt_long.h (test_getopt_long): Likewise. * doc/posix-functions/getopt.texi (getopt

Re: Problem detecting libsigsegv on gawk 4.0.0 on Solaris 9 Sparc w/Sun Studio 12

2011-07-07 Thread Dagobert Michelsen
Hi Bruno, Am 02.07.2011 um 13:56 schrieb Bruno Haible: > Conclusion: The use of option -Xc effectively removes from the > set of available header files. This is expected because in -Xc mode, only ISO > C > headers should be available. > > But relies on , for the definition of some types; > do

Re: fts and O_NOATIME

2011-07-07 Thread Jim Meyering
Eric Blake wrote: > http://savannah.gnu.org/bugs/?33724 raised the issue that findutils is > updating directory atime as part of traversing a hierarchy (and, > according to POSIX, this behavior is the correct default). However, it > would be nice to support the use of fts in a mode where O_NOATIME

[PATCH] getopt: handle W; without long options in getopt

2011-07-07 Thread Eric Blake
This reverts commit cbf381169705782b144b2733798a62c11aa473a5, in favor of the upstream glibc fix (commit 01636b214) plus a C89 fix. [BZ #12922] * lib/getopt.c (_getopt_internal_r): When "W;" is in short options but no long options are defined, just return 'W'. Signed-off-by: Eric Blake --- Chan

Re: [bug #33724] Find command is changing the access time of directory

2011-07-07 Thread James Youngman
I think that would also need a change to ftw(). That's in gnulib. On Thu, Jul 7, 2011 at 2:10 PM, Eric Blake wrote: > Follow-up Comment #1, bug #33724 (project findutils): > > POSIX requires this behavior.  However, Linux provides the O_NOATIME flag to > open() to work around this behavior - so

fts and O_NOATIME

2011-07-07 Thread Eric Blake
http://savannah.gnu.org/bugs/?33724 raised the issue that findutils is updating directory atime as part of traversing a hierarchy (and, according to POSIX, this behavior is the correct default). However, it would be nice to support the use of fts in a mode where O_NOATIME is used, so that director

Re: ‘iconv’ fails to build on NetBSD 5.1

2011-07-07 Thread Ludovic Courtès
Hi Bruno, Bruno Haible skribis: >> The ‘iconv’ modules fails to build on NetBSD 5.1 (see gcc70 of the GCC >> Compile Farm): > > Can you show the gnulib-tool invocations that you used when builting > the tarball of your package? In particular, which of the modules > 'iconv', 'iconv-h', 'iconv_ope

Re: [PATCH] maint: indent with spaces, not TABs, and add a rule to check this

2011-07-07 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> > tab=`printf '\t'` >> > >> > appears to work. Is it portable? >> >> Yes, that is what I would use. > > OK, with that, I've removed all tabs from m4/po.m4: Thanks. Accordingly, I've done this: >From 066e4a8d5e927bebebb6dcdea3bdf52ad48a388a Mon Sep 17 0

Re: [PATCH] maint: indent with spaces, not TABs, and add a rule to check this

2011-07-07 Thread Bruno Haible
Jim Meyering wrote: > > tab=`printf '\t'` > > > > appears to work. Is it portable? > > Yes, that is what I would use. OK, with that, I've removed all tabs from m4/po.m4: 2011-07-07 Bruno Haible Avoid literal tabs. * m4/po,m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Use a

Re: [PATCH] snprintf: guarantee %1$d, for libintl

2011-07-07 Thread Bruno Haible
Hi Eric, Eric Blake wrote: > I added this comment in the .m4 files: > > dnl Libintl 0.17 will replace snprintf ... > ... > Libintl specifically favors _snprintf, with broken return value, > even when compiled on mingw with a fixed snprintf, because the > only behavior which it wants to fix is %1$

Re: [PATCH 06/10] * modules/pselect: Add select, LIBSOCKET.

2011-07-07 Thread Stefano Lattarini
On Wednesday 06 July 2011, Paul Eggert wrote: > On 07/06/11 11:48, Stefano Lattarini wrote: > > If you've noticed a blunder in your > > ChangeLog *before* pushing, why haven't you amended the commit the > > blunder occurred into, instead of adding the fix in the following > > commit? > > Well, par