bug-gnulib
[Top][All Lists]
Advanced

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

Re: rethinking #if and 64-bit numbers (inttypes.h on Sun platforms)


From: Paul Eggert
Subject: Re: rethinking #if and 64-bit numbers (inttypes.h on Sun platforms)
Date: Mon, 12 Nov 2007 23:47:31 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Can you document this limitation in doc/headers/stdint.texi please?
> Possibly also in autoconf.texi section "Portable C and C++ Programming"?

I did the former by installing the following.
I'll look at the latter next.

2007-11-12  Paul Eggert  <address@hidden>

        Document 64-bit #if problems in stdint.texi.
        * doc/headers/stdint.texi (stdint.h): Mention problems with
        64-bit-#if, and how to work around them.

diff --git a/doc/headers/stdint.texi b/doc/headers/stdint.texi
index c5fd404..6466edc 100644
--- a/doc/headers/stdint.texi
+++ b/doc/headers/stdint.texi
@@ -28,6 +28,14 @@ Portability problems not fixed by Gnulib:
 types available on the system.
 @item
 Macros are used instead of typedefs.
address@hidden
+Some C preprocessors mishandle constants that do not fit in @code{long int}.
+For example, as of 2007, Sun C mishandles @code{#if LLONG_MIN < 0} on
+a platform with 32-bit @code{long int} and 64-bit @code{long long int}.
+Some older preprocessors mishandle constants ending in @code{LL}.
+To work around these problems, compute the value of expressions like
address@hidden < LLONG_MAX} at @code{configure}-time rather than at
address@hidden
 @end itemize

 The stdint.h module uses @code{#include_next}.  If you wish to install




reply via email to

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