Re: sys_stat.in.h should include direct.h rather than io.h

2010-04-10 Thread Bruno Haible
Hello Roman, > sys_stat.in.h includes in order to get the _mkdir function > declaration. This works in MinGW, but MinGW-w64's io.h [1] doesn't declare > _mkdir, direct.h [2] does. OTOH, MinGW's direct.h [3] includes io.h [4], > where _mkdir is declared, so including will work there as well

Re: [PATCH] fprintftime: avoid a warning about ignored fwrite return value

2010-04-10 Thread James Youngman
I think strftime also needs to depend on ignore-value, since ignore-value.h is included in strftime.c. See the attached patch which I forgot to send at the time. From 5a84f1d36bbfbd1bcc1adc7c90819b82cb201768 Mon Sep 17 00:00:00 2001 From: James Youngman Date: Sun, 8 Nov 2009 20:17:09 + Subjec

Re: [PATCH 00/15] Add libunistring-optional module

2010-04-10 Thread Paolo Bonzini
On 04/10/2010 10:50 PM, Pádraig Brady wrote: I had assumed that only the utils needing a built-in libunistring would actually link it in, but thanks for confirming that. I still was only considering a shared lib as there are now 100 coreutils and at least 10 would need libunistring. Though in say

Re: [PATCH 00/15] Add libunistring-optional module

2010-04-10 Thread Pádraig Brady
On 10/04/10 19:43, Paolo Bonzini wrote: > On 04/10/2010 05:43 PM, Pádraig Brady wrote: >> Thanks Paolo. >> That's a nice feature to have. >> I.E. statically link the lib when not present on the system. >> It would be useful when one wanted to build a standalone sed >> for example on older or non li

Re: [PATCH] maint: new syntax-check rule: prohibit empty lines at EOF

2010-04-10 Thread Jim Meyering
Jim Meyering wrote: > Jim Meyering wrote: >> Pádraig Brady wrote: >>> On 10/04/10 13:53, Jim Meyering wrote: Here's a rule I'm adding to coreutils' cfg.mk. However, I would like to use it several other projects, so rather than duplicating it in each, I'm thinking of putting it

Re: [PATCH] Fix handling of restrict keyword for newer Sun Studio C++.

2010-04-10 Thread Bruno Haible
Joel E. Denny wrote: > That works for me. Please push. Thanks. Thanks for the confirmation. It's pushed. Bruno

[PATCH] maint.mk: correct a diagnostic

2010-04-10 Thread Jim Meyering
FYI, this rule was still using the old $re variable. Now it's spelled $prohibit. >From 67c7b8eea211efe86c9dbadfa4879cb8961e095c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 10 Apr 2010 22:30:46 +0200 Subject: [PATCH] maint.mk: correct a diagnostic * top/maint.mk (sc_prohibit_HAVE_MBRTO

Re: gnulib bugs on OSX & C++

2010-04-10 Thread Bruno Haible
Jim, > > > > Is it ok to apply it? > > Yes, please. > I'll correct the formatting afterward. I've applied and pushed this now. Bruno

Re: gnulib bugs on OSX & C++

2010-04-10 Thread Bruno Haible
> There were two bugs in this area: > 1) an abort() in a valid use case, > 2) an endless loop that allocates more and more memory, without bounds. This fixes the second bug. 2010-04-10 Bruno Haible vasnprintf: Correct handling of unconvertible wide string arguments. * lib

Re: gnulib bugs on OSX & C++

2010-04-10 Thread Bruno Haible
Jarno Rajahalme wrote: > - I also had the program crash on malloc error when I accidentally had the > fprintf format string containing "%S" (apparently expecting wide character > input, while not getting it) instead of "%s". I can reproduce it, with your test program (modified to use %S instead

vasnprintf on mingw

2010-04-10 Thread Bruno Haible
On mingw, I got these test failures: > test-snprintf-posix.h:2979: assertion failed > > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > FAIL: test-snprintf-posix.exe > > test-sprintf-posix.h:296

[PATCH 2/2] getopt: match recent glibc fixes and posix ruling

2010-04-10 Thread Eric Blake
The POSIX folks admitted that codifying the behavior of GNU getopt on a leading '+' in optstring is worthwhile, for writing programs such as env(1) even when POSIXLY_CORRECT is not defined. http://austingroupbugs.net/view.php?id=191 Although it technically isn't part of POSIX 2008, there are enoug

[PATCH 1/2] getopt: merge bug fixes from glibc

2010-04-10 Thread Eric Blake
* lib/getopt.c (_getopt_internal_r): Use correct message for 'W;' diagnostics. Honor '+:' correctly. Reject ';'. Signed-off-by: Eric Blake --- I'm still testing this on a few more machines, so it will probably be Monday or Tuesday before I push. ChangeLog|6 ++ lib/getopt.c | 3

one more C++ test error

2010-04-10 Thread Bruno Haible
On mingw, without the 'sigpipe' module, I'm seeing this error: g++-3 -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/local/mingw/include -Wall -MT test-unistd-c++.o -MD -MP -MF .deps/test-unistd-c++.Tpo -c -o test-unistd-c++.o test-unistd-c++.cc In file

Re: [PATCH 00/15] Add libunistring-optional module

2010-04-10 Thread Paolo Bonzini
On 04/10/2010 05:43 PM, Pádraig Brady wrote: Thanks Paolo. That's a nice feature to have. I.E. statically link the lib when not present on the system. It would be useful when one wanted to build a standalone sed for example on older or non linux systems, with the caveat that the binary would be a

Re: [PATCH] maint: new syntax-check rule: prohibit empty lines at EOF

2010-04-10 Thread Jim Meyering
Jim Meyering wrote: > Pádraig Brady wrote: >> On 10/04/10 13:53, Jim Meyering wrote: >>> Here's a rule I'm adding to coreutils' cfg.mk. >>> However, I would like to use it several other projects, >>> so rather than duplicating it in each, I'm thinking of >>> putting it in gnulib's maint.mk. >>> >>>

sys_stat.in.h should include direct.h rather than io.h

2010-04-10 Thread Роман Донченко
Hello, sys_stat.in.h includes in order to get the _mkdir function declaration. This works in MinGW, but MinGW-w64's io.h [1] doesn't declare _mkdir, direct.h [2] does. OTOH, MinGW's direct.h [3] includes io.h [4], where _mkdir is declared, so including will work there as well. Microsoft

Re: [PATCH] maint: new syntax-check rule: prohibit empty lines at EOF

2010-04-10 Thread Jim Meyering
Pádraig Brady wrote: > On 10/04/10 13:53, Jim Meyering wrote: >> Here's a rule I'm adding to coreutils' cfg.mk. >> However, I would like to use it several other projects, >> so rather than duplicating it in each, I'm thinking of >> putting it in gnulib's maint.mk. >> >> Opinions? >> >> I know that

Re: [PATCH] maint: new syntax-check rule: prohibit empty lines at EOF

2010-04-10 Thread Pádraig Brady
On 10/04/10 13:53, Jim Meyering wrote: > Here's a rule I'm adding to coreutils' cfg.mk. > However, I would like to use it several other projects, > so rather than duplicating it in each, I'm thinking of > putting it in gnulib's maint.mk. > > Opinions? > > I know that at least Bruno likes to retai

Re: [PATCH] Fix handling of restrict keyword for newer Sun Studio C++.

2010-04-10 Thread Bruno Haible
Joel E. Denny wrote: > Ok to apply this patch? The change that you are importing from autoconf 2009-01-28 Eric Blake Fix AC_C_RESTRICT for Sun Studio 12 C++. * lib/autoconf/c.m4 (AC_C_RESTRICT): Newer Sun Studio C provides __restrict__ rather than _Restrict, which stil

Re: [PATCH 00/15] Add libunistring-optional module

2010-04-10 Thread Pádraig Brady
On 10/04/10 12:24, Paolo Bonzini wrote: > This series adds a libunistring-optional module. The purpose of the > module is to allow using a system libunistring whenever present, while > leaving the source code in the package too for the case when it is absent. Thanks Paolo. That's a nice feature t

[PATCH] Fix handling of restrict keyword for newer Sun Studio C++.

2010-04-10 Thread Joel E. Denny
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok to apply this patch? >From 44e7c72451c66c1a429bfd24afeabe5b9a9cca64 Mon Sep 17 00:00:00 2001 From: Joel E. Denny Date: Sat, 10 Apr 2010 02:10:51 -0400 Subject: [PATCH] Fix handling of restrict keyword for newer Sun Studio C++. * m4/gnulib-common.

[PATCH] maint: new syntax-check rule: prohibit empty lines at EOF

2010-04-10 Thread Jim Meyering
Here's a rule I'm adding to coreutils' cfg.mk. However, I would like to use it several other projects, so rather than duplicating it in each, I'm thinking of putting it in gnulib's maint.mk. Opinions? I know that at least Bruno likes to retain trailing empty lines in modules/ files. But for a cl

[PATCH 13/15] unistr: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/unistr.h: Rename to... * lib/unistr.in.h: ... this. * modules/unistr/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/unistr/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{unistr.h => unistr.in.h}|0 modules/unistr/base |4 +++- modules/unistr/u16-check |2 +-

[PATCH 04/15] libunistring-optional: infrastructure

2010-04-10 Thread Paolo Bonzini
* m4/libunistring-optional.m4: New. * modules/libunistring-optional: New. --- m4/libunistring-optional.m4 | 22 ++ modules/libunistring-optional | 26 ++ 2 files changed, 48 insertions(+), 0 deletions(-) create mode 100644 m4/libunistring-optional

[PATCH 00/15] Add libunistring-optional module

2010-04-10 Thread Paolo Bonzini
This series adds a libunistring-optional module. The purpose of the module is to allow using a system libunistring whenever present, while leaving the source code in the package too for the case when it is absent. The obvious step would be to make this the default. Unfortunately, this is hard be

[PATCH 09/15] unilbrk: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/unilbrk.h: Rename to... * lib/unilbrk.in.h: ... this. * modules/unilbrk/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/unilbrk/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{unilbrk.h => unilbrk.in.h} |0 modules/unilbrk/base|4 +++- modules/unilbrk/tables

[PATCH 12/15] unistdio: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/unistdio.h: Rename to... * lib/unistdio.in.h: ... this. * modules/unistdio/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/unistdio/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{unistdio.h => unistdio.in.h} |0 modules/unistdio/base |4 +++- modules/unistdio/u-printf-ar

[PATCH 05/15] unitypes: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/unitypes.h: Rename to... * lib/unitypes.in.h: ... this. * modules/unitypes: Adjust, use gl_LIBUNISTRING_HEADER. --- lib/{unitypes.h => unitypes.in.h} |0 modules/unitypes |3 ++- 2 files changed, 2 insertions(+), 1 deletions(-) rename lib/{unitypes.h => unitypes.in.

[PATCH 02/15] havelib: allow expansions in $5

2010-04-10 Thread Paolo Bonzini
* m4/lib-link.m4 (m4_default_quoted): New, for older autoconfs. (AC_LIB_HAVE_LINKFLAGS): Double-quote missing message. Use m4_default_quoted. --- m4/lib-link.m4 |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index 90e1ac9..c2118e9 1006

[PATCH 06/15] unicase: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/unicase.h: Rename to... * lib/unicase.in.h: ... this. * modules/unicase/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/unicase/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{unicase.h => unicase.in.h} |0 modules/unicase/base |4 +++- modules/unicase/cased

[PATCH 07/15] uniconv: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/uniconv.h: Rename to... * lib/uniconv.in.h: ... this. * modules/uniconv/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/uniconv/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{uniconv.h => uniconv.in.h} |0 modules/uniconv/base|4 +++- modules/uniconv/u16-conv

[PATCH 10/15] uniname: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/uniname.h: Rename to... * lib/uniname.in.h: ... this. * modules/uniname/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/uniname/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{uniname.h => uniname.in.h} |0 modules/uniname/base|4 +++- modules/uniname/uniname |4 +

[PATCH 14/15] uniwbrk: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/uniwbrk.h: Rename to... * lib/uniwbrk.in.h: ... this. * modules/uniwbrk/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/uniwbrk/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{uniwbrk.h => uniwbrk.in.h}|0 modules/uniwbrk/base |4 +++- modules/uniwbrk/table

[PATCH 03/15] libunistring: improve diagnostics

2010-04-10 Thread Paolo Bonzini
* m4/libunistring.m4: Do not repeat twice "no, consider installing GNU libunistring". Also add a missing-message parameter like the one of AM_LIB_HAVE_LINKFLAGS. --- m4/libunistring.m4 | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/m4/libunistring.m4 b/m4/l

[PATCH 11/15] uninorm: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/uninorm.h: Rename to... * lib/uninorm.in.h: ... this. * modules/uninorm/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/uninorm/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{uninorm.h => uninorm.in.h} |0 modules/uninorm/base|4 +++- modules/uninorm/canonica

[PATCH 15/15] uniwidth: support libunistring-optional

2010-04-10 Thread Paolo Bonzini
* lib/uniwidth.h: Rename to... * lib/uniwidth.in.h: ... this. * modules/uniwidth/base: Adjust, use gl_LIBUNISTRING_HEADER. * modules/uniwidth/*: Use gl_LIBUNISTRING_LIBOBJ. --- lib/{uniwidth.h => uniwidth.in.h} |0 modules/uniwidth/base |4 +++- modules/uniwidth/u16-strwidth

[PATCH 01/15] gnulib-tool: let macros access gnulib-tool parameters

2010-04-10 Thread Paolo Bonzini
* gnulib-tool: Wrap contents of gnulib-tool.m4 within a gl_CONFIG macro. Require it. * m4/gnulib-tool.m4: Define gl_GNULIB_* macros according to contents of gnulib-cache.m4. --- gnulib-tool |3 +++ m4/gnulib-tool.m4 | 33 + 2 files changed, 20 insertions

Re: test results on MacOS X 10.5

2010-04-10 Thread Jim Meyering
Bruno Haible wrote: > Just one test fails: > > 0101.00 mismatch (-: actual; +:expected) > --62167132800 > +-62167219200 > FAIL: test-posixtm > > Jim, what does this mean? Hi Bruno, I suspect that is due to a bug in their mktime function. I presume that test is using the system version of

Re: gnulib bugs on OSX & C++

2010-04-10 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim, > > Jarno Rajahalme wrote: >> Here is a simple program to demonstrate two problems with current gnulib: >> >> file main.cc: >> >> // config.h defines GNULIB_NAMESPACE as gnulib >> #include >> #include >> #include >> #include >> >> int main() >> { >> char * dir =

Re: gnulib bugs on OSX & C++

2010-04-10 Thread Bruno Haible
Jarno Rajahalme wrote: > main.cc:9: warning: call to 'strndup' declared with attribute warning: The > symbol ::strndup refers to the system function. Use gnulib::strndup instead. > main.cc:12: warning: call to 'close' declared with attribute warning: The > symbol ::close refers to the system func

Re: strnlen on OSX & C++

2010-04-10 Thread Bruno Haible
Jarno Rajahalme wrote: > main.cc:9: warning: call to 'rpl_strnlen' declared with attribute warning: > The symbol ::rpl_strnlen refers to the system function. Use > gnulib::rpl_strnlen instead. The problem here is that gnulib's handling of strnlen is using an ancient idiom. In string.in.h it uses

Re: gnulib bugs on OSX & C++

2010-04-10 Thread Bruno Haible
Hi Jim, Jarno Rajahalme wrote: > Here is a simple program to demonstrate two problems with current gnulib: > > file main.cc: > > // config.h defines GNULIB_NAMESPACE as gnulib > #include > #include > #include > #include > > int main() > { > char * dir = gnulib::strndup(gnulib::getcwd(NULL

test results on MacOS X 10.5

2010-04-10 Thread Bruno Haible
Just one test fails: 0101.00 mismatch (-: actual; +:expected) --62167132800 +-62167219200 FAIL: test-posixtm Jim, what does this mean? Bruno

Re: test-fprintf-posix2.sh & test-fprintf-posix3.sh skipped/fail

2010-04-10 Thread Bruno Haible
Hi Jarno, Rajahalme wrote: > OS: Darwin 10.3.0 > > While make check I get: > > Skipping test: getrlimit and setrlimit don't work > SKIP: test-fprintf-posix2.sh > Skipping test: getrlimit and setrlimit don't work > SKIP: test-fprintf-posix3.sh > > with set -x: > > tests$ ./test-fprintf-posix2.