Re: VC-tag again

2011-04-28 Thread Reuben Thomas
On 14 March 2011 15:45, Jim Meyering wrote: > Reuben Thomas wrote: >> This line in maint.mk: >> >> VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' >> >> does appear to be unused, because its syntax is wrong: there's no >> message (argument to -m), or equivalently, no tag name is specified.

[PATCH] getaddrinfo: fix gai_strerror signature

2011-04-28 Thread Eric Blake
Several platforms declare gai_strerror to return char* rather than const char*. Worse, on mingw, if UNICODE is defined, it is defined to return WCHAR*, which means the result is in unicode but an application expecting bytes for characters will only see a one-byte answer. * m4/getaddrinfo.m4 (gl_G

[PATCH] quotearg: avoid uninitialized variable use

2011-04-28 Thread Eric Blake
Coverity correctly deduced: Error: UNINIT: m4-1.4.16/lib/quotearg.c:171: var_decl: Declaring variable "o" without initializer. m4-1.4.16/lib/quotearg.c:175: uninit_use: Using uninitialized value "o": field "o".right_quote is uninitialized. When custom_quoting_style was introduced in commit 1224

Re: dirfd on mingw

2011-04-28 Thread Bruno Haible
Eric Blake wrote: > perhaps the dummy fd for fchdir _should_ open a directory HANDLE, as > windows guarantees that a directory with an open handle is less likely > to be renamed out from under us Yes, you can control this behaviour through the FILE_SHARE_DELETE bit of the ShareMode parameter of Cr

Re: dirfd on mingw

2011-04-28 Thread Eric Blake
On 04/28/2011 04:10 PM, Bruno Haible wrote: > Eric Blake wrote: >> what about my idea of >> starting to associate DIR* with directory fds, for the sake of dirfd? > > OK, you want to implement dirfd for native Windows? There are two issues: > > 1) Use a fake fd without a HANDLE, or use a real HAND

Re: dirfd on mingw

2011-04-28 Thread Bruno Haible
Eric Blake wrote: > what about my idea of > starting to associate DIR* with directory fds, for the sake of dirfd? OK, you want to implement dirfd for native Windows? There are two issues: 1) Use a fake fd without a HANDLE, or use a real HANDLE? 2) How to associate the fd with with a DIR structure

replace gai_strerror on mingw?

2011-04-28 Thread Eric Blake
On mingw, gai_strerror has two different return types, depending on whether UNICODE was defined at the time the header was included. Both types (char* and WCHAR*) are incompatible with the POSIX return type of const char*. Furthermore, a WCHAR* return renders the return string worthless for an ap

[PATCH] getsockopt: avoid compiler warning

2011-04-28 Thread Eric Blake
getsockopt.c: In function 'rpl_getsockopt': getsockopt.c:51:7: warning: passing argument 4 of 'getsockopt' from incompatible pointer type c:\dev\msys_setup\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winsock2.h:543:32: note: expected 'char *' but argument is of type 'int *' A simple cas

Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Bruno Haible
Hi Eric, > it sounds like you would rather maintain two or three shadow arrays > - one array in fchdir for dir names, one array in nonblocking for > nonblocking status.  Am I understanding you correctly? Yes. It appears that doing so allows (or makes it much easier) to keep independent code separ

Re: [PATCHv2 4/4] tests: drop unused link dependency

2011-04-28 Thread Eric Blake
On 04/27/2011 05:03 PM, Eric Blake wrote: > Ever since commit 2392b18099, openat and fdopendir no longer drag in > xalloc-die through indirect dependencies, so these tests no longer > need $(LIBINTL). > > * modules/areadlinkat-tests (Makefile.am): Drop stale LDADD. I've pushed this series now. >

Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Eric Blake
On 04/28/2011 05:20 AM, Bruno Haible wrote: > Hi Eric, > >> In order to eventually add socket nonblocking status into >> fd shadowing, it is useful to move the existing fchdir name >> shadowing into a common file. > > No, that's definitely not useful. On the contrary, it would make it > harder to

Re: [PATCH]: Change gnulib-tool to support NetBSD's join

2011-04-28 Thread Paolo Bonzini
On 04/27/2011 05:23 PM, J.T. Conklin wrote: For backwards compatibility, the 4.4BSD join used by NetBSD supports a "-a" option as if it was "-a 1 -a 2". Unfortunately, this was done in such a way that "-a 1" and "-a 2" need to be passed as "-a1" or "-a2". Ouch, so BSD has optional arguments in

Re: [PATCHv2 2/4] xalloc-oversized: new module

2011-04-28 Thread Bruno Haible
Eric Blake wrote: > Rather than copy the body and comments for xalloc_oversized > into multiple files, I think this layout works nicer. Yes, it's good to avoid code duplication. Bruno -- In memoriam Heinz Droßel

Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Bastien ROUCARIES
> Now there are two ways to proceed: > >  a) Formalize the notion of a set of :AROUND methods for 'dup', 'dup2', >     'dup3', 'fcntl', 'close', in such a way that the first and third code >     can share the same infrastructure. That would mean a file fd-hook2.c, >     similar to fd-hook.c but jus

Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Bruno Haible
Hi Eric, > In order to eventually add socket nonblocking status into > fd shadowing, it is useful to move the existing fchdir name > shadowing into a common file. No, that's definitely not useful. On the contrary, it would make it harder to write and maintain the code that stores the socket non-b

Re: new test-lock failure on Darwin via nixos/hydra diffutils autobuilder

2011-04-28 Thread Bruno Haible
Jim Meyering wrote: > FYI, here's the log: > > http://hydra.nixos.org/build/1058543 Such a spurious abort() in the test_rwlock function is worrisome. But in order to debug it, I would need the core dump and executable. Just the log file is not enough. Bruno -- In memoriam Heinz Droßel