Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Mark D. Baushke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ben Pfaff <[EMAIL PROTECTED]> writes: > I don't understand why ((size_t)-1) is considered C99 specific. You are correct. It is not C99 specific. I was quoting the C99 standard which Bruno referenced to be sure everyone was on the same page because I

Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Ben Pfaff
"Mark D. Baushke" <[EMAIL PROTECTED]> writes: > Bruno Haible <[EMAIL PROTECTED]> writes: > >> Mark D. Baushke wrote on 2005-11-15: >> > it would be more portable to use this: >> > >> > #ifndef SIZE_MAX >> > # define SIZE_MAX ((size_t)-1) >> > #endif >> > >> > because ((size_t)-1) wil

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Paul Eggert
"Mark D. Baushke" <[EMAIL PROTECTED]> writes: > I believe a merge of the two types is cleaner with gl_STDINT_H to > require this new macro. Likewise. ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Bruno Haible
Mark D. Baushke wrote: > I have no problems with either > ((size_t)~(size_t)0) or ((size_t)-1) being used. > However, the previous definition in stdint_.h of > '#define SIZE_MAX (~(size_t)0)' seemed wrong to me. Yes, it was wrong. Thank you for noticing the problem. I changed it to ((size_t)~(size

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Mark D. Baushke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Haible <[EMAIL PROTECTED]> writes: > Paul Eggert wrote on 2005-11-15: > > I'd like Bruno's opinion on all this before installing into gnulib. > > > > 2005-11-14 Paul Eggert <[EMAIL PROTECTED]> > > > > * lib/stdint_.h (intmax_t) [defined

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Mark D. Baushke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Haible <[EMAIL PROTECTED]> writes: > Mark D. Baushke wrote on 2005-11-15: > > it would be more portable to use this: > > > > #ifndef SIZE_MAX > > # define SIZE_MAX ((size_t)-1) > > #endif > > > > because ((size_t)-1) will work even

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Bruno Haible
Mark D. Baushke wrote on 2005-11-15: > it would be more portable to use this: > > #ifndef SIZE_MAX > # define SIZE_MAX ((size_t)-1) > #endif > > because ((size_t)-1) will work even if size_t is narrower than int. Yes. As explained on 2005-07-11, I prefer to write this as ((size_t)~

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t

2006-01-09 Thread Bruno Haible
Paul Eggert wrote on 2005-11-15: > I'd like Bruno's opinion on all this before installing into gnulib. > > 2005-11-14 Paul Eggert <[EMAIL PROTECTED]> > > * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare. > (uintmax_t) [defined uintmax_t]: Do not declare. > (SIZE_M

Re: stdint_.h vs intmax_t & uintmax_t

2005-11-27 Thread Paul Eggert
"Mark D. Baushke" <[EMAIL PROTECTED]> writes: > Did Bruno ever give you his opinion for this fix? No. I suspect he's been busy. Now that you've pinged him again let's give him another chance for a few days; if he doesn't respond I don't think he'd object to that patch. ___

Re: stdint_.h vs intmax_t & uintmax_t

2005-11-27 Thread Mark D. Baushke
Hi Paul, Did Bruno ever give you his opinion for this fix? Thanks, -- Mark Paul Eggert <[EMAIL PROTECTED]> writes: > "Mark D. Baushke" <[EMAIL PROTECTED]> writes: > > > There is one remaining interaction with stdint_.h and config.h > > which arises from m4/size_max.m4 > > > > %

Re: stdint_.h vs intmax_t & uintmax_t

2005-11-15 Thread Paul Eggert
"Mark D. Baushke" <[EMAIL PROTECTED]> writes: > I suspect it would be more portable to use this: > > #ifndef SIZE_MAX > # define SIZE_MAX ((size_t)-1) > #endif Yes, that's true. There are several other deficiencies like that in stdint_.h. I wonder why stdint_.h diverges so much from

Re: stdint_.h vs intmax_t & uintmax_t

2005-11-15 Thread Mark D. Baushke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Eggert <[EMAIL PROTECTED]> writes: > "Mark D. Baushke" <[EMAIL PROTECTED]> writes: > > > There is one remaining interaction with stdint_.h and config.h > > which arises from m4/size_max.m4 > > > > % grep SIZE_MAX config.h > > config.h:#define S

Re: stdint_.h vs intmax_t & uintmax_t

2005-11-14 Thread Paul Eggert
"Mark D. Baushke" <[EMAIL PROTECTED]> writes: > There is one remaining interaction with stdint_.h and config.h > which arises from m4/size_max.m4 > > % grep SIZE_MAX config.h > config.h:#define SIZE_MAX 4294967295U > % grep lib/stdint_.h > #define SIZE_MAX (~(size_t)0) Thanks for mentioning that

Re: stdint_.h vs intmax_t & uintmax_t

2005-11-14 Thread Mark D. Baushke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Eggert <[EMAIL PROTECTED]> writes: > Does the following (untested) patch fix things for you? Yes. Thank you. > 2005-11-14 Paul Eggert <[EMAIL PROTECTED]> > > * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare. > (uintm

Re: stdint_.h vs intmax_t & uintmax_t

2005-11-14 Thread Paul Eggert
Does the following (untested) patch fix things for you? 2005-11-14 Paul Eggert <[EMAIL PROTECTED]> * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare. (uintmax_t) [defined uintmax_t]: Do not declare. This works around a problem if intmax_t.m4 and/or uintmax_t.

stdint_.h vs intmax_t & uintmax_t

2005-11-14 Thread Mark D. Baushke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have run into a quirk of GNULIB building CVS on a FreeBSD 4.2 host. It seems that CVS is using m4/intmax.m4 which generate these lines into the config.h file: /* Define if you have the 'uintmax_t' type in or . */ /* The size of a `intmax_t', as co