bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] Re: stdint_.h update


From: Bruno Haible
Subject: [bug-gnulib] Re: stdint_.h update
Date: Sat, 14 May 2005 19:33:52 +0200
User-agent: KMail/1.5

Hi Jim,

> Then, look carefully and you'll see that all three branches
> are the same, so you can condense them into one:
>
>   #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ || defined _MSC_VER
>   # define INT64_MIN   (~INT64_MIN)
>   # define INT64_MAX   INT64_C(9223372036854775807)
>   # define UINT64_MAX UINT64_C(18446744073709551615)
>   #endif

Looks nicer than the existing code.

But when used from C++, <stdint.h> must *not* define INT64_C, UINT64_C
etc. if __STDC_CONSTANT_MACROS is not defined. So if a user wants only
the __STDC_LIMIT_MACROS and not the __STDC_CONSTANT_MACROS, our stdint_.h
should still work. We could escape to using __INT64_C and __UINT64_C,
like glibc does, but this bears the risk of conflicts with the system
headers.

Bruno





reply via email to

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