Re: mkdir module license

2008-04-29 Thread Yoann Vandoorselaere
Le lundi 28 avril 2008 à 22:40 +0200, Jim Meyering a écrit : Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le samedi 26 avril 2008 à 02:31 +0200, Bruno Haible a écrit : Yoann Vandoorselaere wrote: I guess mkdir could use the original malloc implementation, returning an error on

Re: provide inet_?to? declarations in arpa_inet.h

2008-04-29 Thread Simon Josefsson
Simon Josefsson [EMAIL PROTECTED] writes: Bruno Haible [EMAIL PROTECTED] writes: Hi Simon, I would also favor removing both inet_ntop.h and inet_pton.h, and use arpa/inet.h for the declarations, as you suggested. Me too. Yoann, Bruno, I've pushed the following, please test it. I've

Re: mkdir module license

2008-04-29 Thread Jim Meyering
Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le lundi 28 avril 2008 à 22:40 +0200, Jim Meyering a écrit : Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le samedi 26 avril 2008 à 02:31 +0200, Bruno Haible a écrit : Yoann Vandoorselaere wrote: I guess mkdir could use the original malloc

Re: provide inet_?to? declarations in arpa_inet.h

2008-04-29 Thread Bruno Haible
Simon Josefsson wrote: I've tested it better now It was still apparently tested only on few systems. As you can see from doc/posix-functions/inet*.texi, the functions inet_ntop and inet_pton need to be declared also on HP-UX 11, OSF/1 4.0, Solaris 2.5.1. So the gnulib arpa/inet.h must be used in

Re: mkdir module license

2008-04-29 Thread Yoann Vandoorselaere
Le mardi 29 avril 2008 à 13:16 +0200, Jim Meyering a écrit : Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le lundi 28 avril 2008 à 22:40 +0200, Jim Meyering a écrit : Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le samedi 26 avril 2008 à 02:31 +0200, Bruno Haible a écrit : Yoann

Re: strchrnul speed

2008-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 4/28/2008 4:06 PM: | Why should a developer who uses gnulib have to write valgrind suppression files | to work around ISO C99 violations in gnulib? We can at least provide a | strchrnul.valgrind file, like the 'malloca'

[PATCH] Avoid new segfault in getaddrinfo test

2008-04-29 Thread Jim Meyering
Hi Simon Ok to apply? Without it, I'd get this: FAIL: test-getaddrinfo with a segfault that comes from using inet_ntop with no declaration. Avoid test segfault on x86_64 due to lack of inet_ntop declaration. * tests/test-getaddrinfo.c: Include arpa/inet.h, now guaranteed

Re: [PATCH] Avoid new segfault in getaddrinfo test

2008-04-29 Thread Jim Meyering
Jim Meyering [EMAIL PROTECTED] wrote: Hi Simon Ok to apply? Without it, I'd get this: FAIL: test-getaddrinfo with a segfault that comes from using inet_ntop with no declaration. Avoid test segfault on x86_64 due to lack of inet_ntop declaration. * tests/test-getaddrinfo.c:

Re: [PATCH] Avoid new segfault in getaddrinfo test

2008-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 4/29/2008 10:51 AM: | FAIL: test-getaddrinfo | with a segfault that comes from using inet_ntop with no declaration. More importantly, getaddrinfo.c fails to compile on cygwin 1.5.x without this change, also pushed: -

paying for the sin of no unit tests: useless-if-before-free bug

2008-04-29 Thread Jim Meyering
I noticed that I'd broken my useless-if-before-free script. It would only notice the useless tests if there were a cast on the argument to the free-like function. I've just pushed this correction and will add unit tests. From e47886762b67882c67f9b76f41a1f89c3552c4aa Mon Sep 17 00:00:00 2001

useless-if-before-free: print all matches

2008-04-29 Thread Jim Meyering
Before this change, when there was more than one useless if test in a block (blocks are ''-separated), only the first would be shown. Now they all are. From a24967ca5051d7210bb87096c398cfb694385512 Mon Sep 17 00:00:00 2001 From: Jim Meyering [EMAIL PROTECTED] Date: Tue, 29 Apr 2008 22:04:47

Re: [PATCH] Avoid new segfault in getaddrinfo test

2008-04-29 Thread Bruno Haible
Eric Blake wrote: More importantly, getaddrinfo.c fails to compile More importantly, users' code will fail to compile as well, if they are not made aware of the change. It's a backward-incompatible change, so needs to be mentioned in NEWS. I did this: *** NEWS.orig 2008-04-29

Re: mkdir module license

2008-04-29 Thread Jim Meyering
Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le mardi 29 avril 2008 à 13:16 +0200, Jim Meyering a écrit : Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le lundi 28 avril 2008 à 22:40 +0200, Jim Meyering a écrit : Yoann Vandoorselaere [EMAIL PROTECTED] wrote: Le samedi 26 avril 2008 à

Re: provide inet_?to? declarations in arpa_inet.h

2008-04-29 Thread Simon Josefsson
Bruno Haible [EMAIL PROTECTED] writes: Simon Josefsson wrote: I've tested it better now It was still apparently tested only on few systems. As you can see from doc/posix-functions/inet*.texi, the functions inet_ntop and inet_pton need to be declared also on HP-UX 11, OSF/1 4.0, Solaris

Re: [PATCH] Avoid new segfault in getaddrinfo test

2008-04-29 Thread Simon Josefsson
Jim Meyering [EMAIL PROTECTED] writes: Jim Meyering [EMAIL PROTECTED] wrote: Hi Simon Ok to apply? Without it, I'd get this: FAIL: test-getaddrinfo with a segfault that comes from using inet_ntop with no declaration. Avoid test segfault on x86_64 due to lack of inet_ntop

Re: provide inet_?to? declarations in arpa_inet.h

2008-04-29 Thread Bruno Haible
Simon Josefsson wrote: Btw, a solaris system I have access to declares the function as follows (in system arpa/inet.h): #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) extern int inet_pton(int, const char *_RESTRICT_KYWD, void *_RESTRICT_KYWD); extern const char

Re: provide inet_?to? declarations in arpa_inet.h

2008-04-29 Thread Bruno Haible
Simon Josefsson wrote: diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4 index 8f530c5..baddf0d 100644 --- a/m4/arpa_inet_h.m4 +++ b/m4/arpa_inet_h.m4 @@ -32,4 +32,7 @@ AC_DEFUN([gl_ARPA_INET_H_DEFAULTS], [ GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP]) GNULIB_INET_PTON=0;

speed up getndelim2

2008-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wow! Check out the speedup with this patch, comparing an -O2 /bin/cut pre-patch against an unoptimized -g cut post-patch, and that's even with running /bin/cut second so it benefits from any file system caching effects. $ dd count=20k /dev/random