Re: getting EBADF on MSVC

2011-09-18 Thread Paul Eggert
On 09/18/11 01:36, Bruno Haible wrote: This patch protects the dup2() calls in gnulib. This change has some problems with GNU Emacs, and I suspect there will be similar problems with printf, close, etc. so let's try to get see if we can fix these problems with dup2 first. Emacs has a separate

[PATCH] stat: use pathmax.h only if needed

2011-09-18 Thread Paul Eggert
* lib/stat.c: Include pathmax.h only if REPLACE_FUNC_STAT_DIR. This is better for Emacs, which does not have a mingw port and therefore can avoid the pathmax module. --- ChangeLog |5 + lib/stat.c | 11 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLo

[PATCH] utimens: remove dependency on dup2

2011-09-18 Thread Paul Eggert
* lib/utimens.c (fdutimens): Don't invoke dup2; it's not needed to work around the Linux kernel bug. * modules/utimens (Depends-on): Remove dup2. --- ChangeLog |7 +++ lib/utimens.c | 13 - modules/utimens |1 - 3 files changed, 11 insertions(+), 10 deletions(-)

Re: getting EBADF on MSVC

2011-09-18 Thread Bruno Haible
> The newer runtime libraries of MSVC no longer return error codes from > functions like printf(), close(), dup2(), _get_osfhandle(), when you pass > an invalid format string or invalid file descriptor.[1][2] > > No, they invoke a so-called "invalid parameter handler" which exists once per > proce

inet_pton on Solaris 7

2011-09-18 Thread Bruno Haible
On Solaris 7, I'm getting a link error cc -O -g -o test-connect test-connect.o libtests.a ../gllib/libgnu.a libtests.a -lsocket ild: (undefined symbol) inet_pton -- referenced in the text segment of test-connect.o *** Error code 5 because inet_pton is declared in the system's but gnulib

socket functions linking on Solaris

2011-09-18 Thread Bruno Haible
After I've written some test programs for the socket functions accept(), ..., shutdown(), these programs get link errors on Solaris 10: cc -O -g -o test-accept test-accept.o libtests.a ../gllib/libgnu.a libtests.a Undefined first referenced symbol

posix_spawn_file_actions_add*: fix dependencies

2011-09-18 Thread Bruno Haible
The modules posix_spawn_file_actions_addclose etc. can produce link errors regarding the function gl_posix_spawn_file_actions_realloc, which is defined in lib/spawn_faction_init.c. 2011-09-18 Bruno Haible posix_spawn_file_actions_add*: Fix module dependencies. * modules/posix_

test-rename, test-renameat failures on FreeBSD

2011-09-18 Thread Bruno Haible
I've just stumbled again across these failures on FreeBSD 6.4. > FreeBSD 6.4: > > test-rename.h:342: assertion failed > Abort trap (core dumped) > FAIL: test-rename > > test-rename.h:342: assertion failed > Abort trap (core dumped) > FAIL: test-renameat Jim, you've usually OKed added other errn

Re: a Linux select() bug

2011-09-18 Thread Bruno Haible
Pádraig Brady wrote: > for the performance tweak to work, select() would have > to effectively use MIN (nfds, FDSize)? Possibly. It's bizarre that I observe the same bug and also the same dependency upon whether 'make' occurs among the ancestor processes _also_on_MacOS_X_. Here, on MacOS X 10.5.

Re: one other coreutils test failure

2011-09-18 Thread Paul Eggert
On 09/18/11 12:11, Jim Meyering wrote: > Since kFreeBSD also lacks /proc/self/fd support, this has the > drawback of making getcwd non-thread-safe, and making it possible > that getcwd will exit under some unusual conditions. But neither > of those matter to coreutils, I doubt whether the

Re: one other coreutils test failure

2011-09-18 Thread Jim Meyering
Jim Meyering wrote: > Michael Stone wrote: >> On Fri, Sep 16, 2011 at 06:54:32PM +0200, Jim Meyering wrote: >>>Michael Stone wrote: This one was actually in gnulib; what's the best way to pursue it? FAIL: test-getcwd (exit: 16) >>> >>>Hi Michael, >>>

Re: [PATCH] date: accept 'hence' as opposite of 'ago'

2011-09-18 Thread Jim Meyering
Eric Blake wrote: > + date: accept 'hence' as opposite of 'ago' > + * lib/parse-datetime.y (relative_time_table): Add 'hence'. > + * tests/test-parse-datetime.c (main): Enhance test. > + Suggested by Jesse Wilson. ... > diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y > inde

Re: a Linux select() bug

2011-09-18 Thread Pádraig Brady
On 09/18/2011 05:47 PM, Pádraig Brady wrote: > On 09/18/2011 03:58 PM, Bruno Haible wrote: >> Hi Jim, Pádraig, >> >> To whom best to report this Linux kernel bug? >> >> bug.c >> >> /* A POSIX compliance bug in select() (and

Re: a Linux select() bug

2011-09-18 Thread Pádraig Brady
On 09/18/2011 03:58 PM, Bruno Haible wrote: > Hi Jim, Pádraig, > > To whom best to report this Linux kernel bug? > > bug.c > > /* A POSIX compliance bug in select() (and pselect() also). >

fflush, EBADF, POSIX

2011-09-18 Thread Bruno Haible
Hi Eric, According to POSIX:2008 , fflush() must fail with EBADF if the file descriptor is invalid. This test program foo.c #include #include #include

a Linux select() bug

2011-09-18 Thread Bruno Haible
Hi Jim, Pádraig, To whom best to report this Linux kernel bug? bug.c /* A POSIX compliance bug in select() (and pselect() also). says: "pse

Re: bug#9537: errors running test suite

2011-09-18 Thread Jim Meyering
Montosh Bisht wrote: > Few errors were reported in the test. Hope this helps. > > uname -a > Linux devhost 2.6.40.4-5.fc15.x86_64 #1 SMP Tue Aug 30 14:38:32 UTC > 2011 x86_64 x86_64 x86_64 GNU/Linux > Fedora 15 > gcc --version > gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9) > > export CFLAGS='-pipe -

Re: getting EBADF on MSVC

2011-09-18 Thread Bruno Haible
> The newer runtime libraries of MSVC no longer return error codes from > functions like printf(), close(), dup2(), _get_osfhandle(), when you pass > an invalid format string or invalid file descriptor.[1][2] This patch protects the dup2() calls in gnulib. 2011-09-18 Bruno Haible dup

getting EBADF on MSVC

2011-09-18 Thread Bruno Haible
The newer runtime libraries of MSVC no longer return error codes from functions like printf(), close(), dup2(), _get_osfhandle(), when you pass an invalid format string or invalid file descriptor.[1][2] No, they invoke a so-called "invalid parameter handler" which exists once per process (i.e. it'