From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 13 Nov 2007 07:43:16 +0000 (-0800)
Subject: Document 64-bit #if problems in stdint.texi.
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e021373ddbabc755ae99b6d0376cde63783e8f80;p=pspp

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/ChangeLog b/ChangeLog
index 6f151bfed1..9086ab4c4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-11-12  Paul Eggert  <eggert@cs.ucla.edu>
 
+	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.
+
 	Don't insist on 'long long int' support in the preprocessor.  It
 	breaks too many things.  For example, PRIdMAX still uses a 'long
 	long int' format with the latest Sun compiler, even though
diff --git a/doc/headers/stdint.texi b/doc/headers/stdint.texi
index c5fd40478e..6466edc2f3 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.
+@item
+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
+@code{LONG_MAX < LLONG_MAX} at @code{configure}-time rather than at
+@code{#if}-time.
 @end itemize
 
 The stdint.h module uses @code{#include_next}.  If you wish to install