Re: definition of NULL

2009-08-14 Thread Bruno Haible
Hi, I wrote: > In m4/locale_h.m4 it's a waste of configure time to check for the include_next > support of locale.h if it's not going to be replaced. I would keep doing > gl_CHECK_NEXT_HEADERS([locale.h]) > conditionally. > > Likewise for m4/stddef_h.m4 and m4/wchar.m4. The part for m4/wchar.m

Re: definition of NULL

2009-08-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 8/13/2009 7:04 AM: > Oh, good point. I've included in the patch refresh. > > I still need time to test on my NetBSD access point. Now tested, with success, so I've pushed the patch. Also, I've filed a report to the NetBS

Re: definition of NULL

2009-08-13 Thread Ralf Wildenhues
Hi Eric, * Eric Blake wrote on Thu, Aug 13, 2009 at 02:27:07PM CEST: > According to Ralf Wildenhues on 8/12/2009 11:53 PM: > > Just to know whether the trouble was spent well: did you report a bug > > with NetBSD? Their fixing their headers would be nice, even with your > > patch, and one would h

git format-patch on .texi (was: definition of NULL)

2009-08-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 8/13/2009 3:41 AM: > I got some "malformed patch" errors while applying the patch. Due to wrapped > lines such as > > @@ -12,6 +12,11 @@ The macros @code{EXIT_SUCCESS} and @code{EXIT_FAILURE} > are > not defined on >

Re: definition of NULL

2009-08-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 8/13/2009 3:41 AM: > Hi Eric, > > Wow! What a large change. Largely repetitive, but it adds up fast! > You handled locale.h, stddef.h, stdio.h, stdlib.h, string.h, unistd.h, > wchar.h, > but time.h also should define NU

Re: definition of NULL

2009-08-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 8/12/2009 11:53 PM: > Just to know whether the trouble was spent well: did you report a bug > with NetBSD? Their fixing their headers would be nice, even with your > patch, and one would hope it wouldn't be a lot of tro

Re: definition of NULL

2009-08-13 Thread Bruno Haible
,7 +18,7 @@ IRIX 5.3. @item -Some platforms provide @code{NULL} that cannot be used in arbitrary +Some platforms provide a @code{NULL} macro that cannot be used in arbitrary expressions: NetBSD 5.0 @end itemize --- lib/stddef.in.h.orig 2009-08-13 11:38:25.0 +0200 +++ lib/stdde

Re: definition of NULL

2009-08-12 Thread Ralf Wildenhues
Hello, * Eric Blake wrote on Wed, Aug 12, 2009 at 11:45:26PM CEST: > Bruno Haible clisp.org> writes: > > The definition of NULL is a particularly thorny area, because so many > > headers > > use it and so many headers define it. I don't think it's worth the tr

Re: definition of NULL

2009-08-12 Thread Eric Blake
Bruno Haible clisp.org> writes: > > I argue that NetBSD's definition of NULL is thus buggy > > Regarding POSIX, with XSH 2.1.2.(1), you are probably right. > > > we should add gnulib check and config.h workaround for it. > > The definition of NULL is a p

Re: definition of NULL

2009-08-11 Thread Bruno Haible
Eric Blake wrote: > I argue that NetBSD's definition of NULL is thus buggy It appears to be compliant with ISO C99. This standard requires 6.5.3 and Annex A.2.1 Syntax unary-expression: ... sizeof unary-expression sizeof ( type-name ) cast-ex

Re: definition of NULL

2009-08-11 Thread Eric Blake
Eric Blake byu.net> writes: > > Indeed, "sizeof (void*)0" parses as sizeof of the type 'void *', followed by a > > stray 0 token => parse error. > > I argue that NetBSD's definition of NULL is thus buggy, and that we should add > a gnulib c

Re: definition of NULL

2009-08-11 Thread Eric Blake
ULL is "(void > *)0", and gcc fails to parse "sizeof (void*)0". Changing this to "sizeof > (NULL)" makes the tests compile > > Indeed, "sizeof (void*)0" parses as sizeof of the type 'void *', followed by a > stray 0 token =>

Re: definition of NULL

2009-08-11 Thread Bruno Haible
Hi Eric, You wrote on 2009-06-26: > +/* Check that NULL can be passed through varargs as a pointer type, > + per POSIX 2008. */ > +verify (sizeof NULL == sizeof (void *)); Citing : on NetBSD 5.0 amd64, test-locale.c fails to build because the call

Re: definition of NULL

2009-06-27 Thread Bruno Haible
Eric Blake wrote: > Should we make gnulib provide replacement headers for systems that have such > a > poorly defined NULL? Or is NULL even poorly defined in practice on any of > gnulib's current set of reasonable porting targets? I believe that this problem with NULL existed up until 1995. Si

definition of NULL

2009-06-26 Thread Eric Blake
so installs a fixincludes for NULL for this very reason. Thus, even though Solaris cc still sees a non-POSIX definition of NULL, gcc on Solaris sees ((void*)0) and the sentinel warning does not trigger for this code: execlp ("foo", "foo", NULL); But if anyone can think of any