mkfifoat tests on mingw

2011-09-21 Thread Bruno Haible
Hi Eric, On native Windows, mkfifoat and mknodat can only be implemented as dummies which fail with errno = ENOSYS (since FIFOs and other devices are not present in the file system). The test-mkfifoat test thus fails. Here's a proposed patch. It fixes the failure for me. 2011-09-21 Bruno Haibl

use of PATH_MAX in *.m4 files

2011-09-21 Thread Bruno Haible
Hi Jim, Here's another prososed patch On MSVC, I got a link error because save-cwd.c was compiled to invoke the chdir_long() function, but lib/chdir-long.c was not compiled. The reason is that while save-cwd.c uses pathmax.h to define PATH_MAX when it makes sense and bases its decisions on the '

modernize ftruncate module

2011-09-21 Thread Bruno Haible
Hi Jim, Here's a proposal to modernize the 'ftruncate' module. It's triggered by link errors that I got on MSVC 9, because the 'ftruncate' module, while present in gnulib, is marked as 'obsolete' and therefore not included by default. This classification was based on the knowledge that all modern

Re: dirent.h on MSVC

2011-09-21 Thread Bruno Haible
> 2011-09-17 Bruno Haible > > Add dependencies to new dirent related modules. > This patch was incomplete, leading to link errors on MSVC. I'm adding this patch: 2011-09-21 Bruno Haible Add dependencies to new dirent related modules. * modules/opendir (Depends-on

Re: dirent.h on MSVC

2011-09-21 Thread Bruno Haible
I did on 2011-09-12: > * lib/opendir.c: New file. This doesn't compile on mingw, because of NULL. Trivial fix: 2011-09-21 Bruno Haible opendir: Avoid compilation error on mingw. * lib/opendir.c: Include always. Include as well. * modules/opendir (Depends-on):

Re: [PATCH] version-etc: undefined reference to _version_etc_copyright

2011-09-21 Thread Andrew Schulman
Oh, hi Eric. Fancy meeting you here. > The idea here is that you should use version-etc-fsf if you want FSF > copyrights, and if you don't want FSF copyrights, then use version-etc > and provide your own version_etc_copyright() function that uses your > copyrights. OK, thanks for the explanat

renameat test failure on mingw

2011-09-21 Thread Bruno Haible
Hi Eric, Also, the renameat test is failing on mingw: test-renameat.c:162: assertion failed FAIL: test-renameat.exe What's happening? errno = 0; ASSERT (renameat (dfd, BASE "17", dfd, BASE "sub1") == -1); ASSERT (errno == EISDIR); <= HERE errno is ENOENT errno =

Re: [PATCH] version-etc: undefined reference to _version_etc_copyright

2011-09-21 Thread Eric Blake
On 09/21/2011 02:24 PM, Andrew Schulman wrote: In the current gnulib, when I extract and try to build argp and argp-version-etc, the build fails with .libs/version-etc.o: In function `version_etc_arn': /home/admin/dev/cygwin/libargp/libargp-20110921/gllib/version-etc.c:84: undefined refe

[PATCH] version-etc: undefined reference to _version_etc_copyright

2011-09-21 Thread Andrew Schulman
In the current gnulib, when I extract and try to build argp and argp-version-etc, the build fails with .libs/version-etc.o: In function `version_etc_arn': /home/admin/dev/cygwin/libargp/libargp-20110921/gllib/version-etc.c:84: undefined reference to `_version_etc_copyright' The only m

linkat test failure on mingw

2011-09-21 Thread Bruno Haible
Hi Eric, Jim, On mingw, I see this test failure: skipping test: symlinks not supported on this file system test-linkat.c:184: assertion failed FAIL: test-linkat.exe When it fails, the following files and directories are left over: test-linkat.too test-linkat.tsub1/ test-linkat.t32 test-linkat.t

Re: [PATCH] test-fsync: yet another enhancement

2011-09-21 Thread Bruno Haible
Hi Eric, > + /* For a read-only regular file input file descriptor, fsync should > + succeed (since at least atime changes can be synchronized). */ > + fd = open (file, O_RDONLY); > + ASSERT (0 <= fd); > + { > +char buf[1]; > +ASSERT (read (fd, buf, sizeof buf) == sizeof buf); > +

new module 'fdopen'

2011-09-21 Thread Bruno Haible
One of the new EBADF tests fails on mingw: test-fdopen.c:38: assertion failed FAIL: test-fdopen.exe The reason is already listed in doc/posix-functions/fdopen.texi. But I don't want to have test failures accumulate. So here's a new workaround module that fixes it. 2011-09-21 Bruno Haible

Re: getting EBADF on NetBSD

2011-09-21 Thread Bruno Haible
> test-unlockpt.c:34: assertion failed > FAIL: test-unlockpt This is also seen on NetBSD 5.1. They have an unlockpt() that does nothing; it just returns 0. I'm not inclined to add a replacement just for this. Instead, modify the test: 2011-09-21 Bruno Haible unlockpt tests: Avoid te

getlogin test on Linux/SPARC

2011-09-21 Thread Bruno Haible
On a Linux 2.6.26 / SPARC machine, I'm getting these test failures: test-getlogin.c:43: assertion failed FAIL: test-getlogin test-getlogin_r.c:44: assertion failed FAIL: test-getlogin_r Apparently getlogin's error code here is EINVAL instead of ENOTTY. This fixes the test failure. 2011-09-21 B