[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] Re: xsize.h needs SIZE_MAX defined on Windows

From: Paul Eggert
Subject: Re: [Bug-gnulib] Re: xsize.h needs SIZE_MAX defined on Windows
Date: 11 Mar 2004 11:13:33 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Derek Robert Price <address@hidden> writes:

> Mark D. Baushke from the CVS development team suggested that ~0 might be
> a better value than -1 as it is more obviously positive.

But ~0 == 0 on hosts with ones'-complement arithmetic; and on such
hosts, (size_t) ~0 == 0.  There are C compilers for some
ones'-complement hosts (though admittedly they're a bit unusual as
porting targets for GNU code these days :-).

Anyway, I don't see why the fix is needed at all.  The gl_XSIZE
autoconf macro invokes gl_SIZE_MAX, which should arrange for SIZE_MAX
to be defined.  The advantage of this approach is that the resulting
SIZE_MAX can be used in C preprocessor expressions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]