Re: AC_HEADER_STDC

2006-07-20 Thread Bruno Haible
Paul Eggert wrote: > > On a system where 'unsigned char' and 'int' have the same number of > > bits, the getc() and fgetc() result EOF would be ambiguous: it could > > be EOF or it could be a casted 'unsigned char' value. It sounds very > > improbable that such a system exists, now or in the future

Re: AC_HEADER_STDC

2006-07-06 Thread Paul Eggert
I found a few other glitches related to the AC_HEADER_STDC changes while propagating them into coreutils, and installed the following further patches. Some of the problems predate the recent changes. For example, the code wasn't portable to (theoretical?) C99 implementations that have an is

Re: AC_HEADER_STDC

2006-07-06 Thread Paul Eggert
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > * modules/getusershell: Add gl_FUNC_GETUSERSHELL to > configure.ac. Thanks; I checked that in.

Re: AC_HEADER_STDC

2006-07-06 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > On a system where 'unsigned char' and 'int' have the same number of > bits, the getc() and fgetc() result EOF would be ambiguous: it could > be EOF or it could be a casted 'unsigned char' value. It sounds very > improbable that such a system exists, now o

Re: AC_HEADER_STDC

2006-07-06 Thread Ralf Wildenhues
Hello Eric, Bruno, * Eric Blake wrote on Thu, Jul 06, 2006 at 02:25:38PM CEST: > According to Ralf Wildenhues on 7/6/2006 1:48 AM: > > * Paul Eggert wrote on Thu, Jul 06, 2006 at 01:44:03AM CEST: > >> - while ((c = getc (stream)) != EOF && ISSPACE (c)) > >> + while ((c = getc (stream)) != EOF &

Re: AC_HEADER_STDC

2006-07-06 Thread Ralf Wildenhues
* Bruno Haible wrote on Thu, Jul 06, 2006 at 02:51:10PM CEST: > Paul Eggert wrote: > > > * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer needed. > > All uses removed. > > * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise. > > * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise

Re: AC_HEADER_STDC

2006-07-06 Thread Bruno Haible
Paul Eggert wrote: > memcasecmp.c assumes UCHAR_MAX <= INT_MAX, which is not portable in > general Huh? On a system where 'unsigned char' and 'int' have the same number of bits, the getc() and fgetc() result EOF would be ambiguous: it could be EOF or it could be a casted 'unsigned char' value. It

Re: AC_HEADER_STDC

2006-07-06 Thread Bruno Haible
Ralf Wildenhues wrote: > > - while ((c = getc (stream)) != EOF && ISSPACE (c)) > > + while ((c = getc (stream)) != EOF && isspace (c)) > > missing cast to unsigned char (c is int). getc returns either EOF or a value in the range 0..UCHAR_MAX. The assignment to 'int c' doesn't change this value.

Re: AC_HEADER_STDC

2006-07-06 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 7/6/2006 1:48 AM: > Hello Paul, > > Some nits below. > > * Paul Eggert wrote on Thu, Jul 06, 2006 at 01:44:03AM CEST: >> Index: lib/getusershell.c >> ===

Re: AC_HEADER_STDC

2006-07-06 Thread Ralf Wildenhues
Hello Paul, Some nits below. * Paul Eggert wrote on Thu, Jul 06, 2006 at 01:44:03AM CEST: > > Index: lib/getusershell.c > === > RCS file: /cvsroot/gnulib/gnulib/lib/getusershell.c,v > retrieving revision 1.22 > diff -p -u -r1.22 getu

Re: AC_HEADER_STDC

2006-07-05 Thread Paul Eggert
* lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise. * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise. * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise. * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise. * m4/calloc.m4 (_AC_FUNC_CALLO

Re: [bug-gnulib] AC_HEADER_STDC

2006-07-05 Thread Derek R. Price
Bruno Haible wrote: > Derek R. Price wrote: >> * m4/onceonly.m4, >> m4/onceonly_2_57.m4 >> Don't call obsolescent AC_HEADER_STDC. > > It's not called there, it's only used as an example. I've changed it > like this. ... Bruno

Re: [bug-gnulib] AC_HEADER_STDC

2006-07-04 Thread Bruno Haible
Derek R. Price wrote: > lib/mbswidth.c: Remove sections > dependent on !STDC_HEADERS. Thanks, I committed to gnulib the same patch that I had done in gettext a day earlier. It is identical to yours. Bruno 2006-06-27 Bruno Haible <[EMAIL PROTECTED]> Assume ANSI C header fi

Re: [bug-gnulib] AC_HEADER_STDC

2006-07-04 Thread Bruno Haible
Derek R. Price wrote: > * m4/onceonly.m4, > m4/onceonly_2_57.m4 > Don't call obsolescent AC_HEADER_STDC. It's not called there, it's only used as an example. I've changed it like this. *** onceonly_2_57.m410 Aug 2005 12:06:39 - 1.6

AC_HEADER_STDC

2006-06-29 Thread Derek R. Price
The attached patch removes references to AC_HEADER_STDC, marked obsolescent in the Autoconf 2.60 release, from m4/*.m4 and the corresponding #if STDC_HEADERS sections from lib/*.[ch]. This seems right since GNULIB already assumes all of the headers AC_HEADER_STDC checks for (`stdlib.h', `std