[Top][All Lists]

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

Re: size_max: remove it?

From: Paul Eggert
Subject: Re: size_max: remove it?
Date: Fri, 28 Apr 2006 13:23:06 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

"Derek R. Price" <address@hidden> writes:

> It sounds reasonable to leave size_max in for those who want it, but is
> it really necessary to make stdint depend on it?  All that extra work by
> configure sounds like overkill too, when stdint_.h has already included
> <stddef.h> and so the current code from stdint_.h suffices:
> #ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */
> # define SIZE_MAX ((size_t)~(size_t)0)
> #endif

Sorry, I must be missing something then.  I thought you wanted
size_max because you wanted SIZE_MAX to be usable in #if, as it is
with real stdint.h implementations.

If you merely want a C constant that is not necessarily usable in #if,
then "#define SIZE_MAX ((size_t) -1)" will do and is commonly used in
many packages.

reply via email to

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