[Top][All Lists]

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

Re: uint64_t fails with C++

From: Werner LEMBERG
Subject: Re: uint64_t fails with C++
Date: Wed, 07 Dec 2011 22:43:58 +0100 (CET)

>> Thanks.  However, this still doesn't explain why autoconf (using g++!)
>> says that uint64_t exists: __STDC_LIMIT_MACROS is not used in any part
>> of autoconf.
> I think that has been covered...

Nope.  A search for __STDC_LIMIT_MACROS within the git repository
gives no results.

>> PS: If using __STDC_LIMIT_MACROS is the `official' way to handle
>>     uint64 I suggest to update the autoconf documentation
>>     accordingly.
> Yes, we definitely need to improve this.  Would you mind submitting
> a patch, based on what we have learned in this thread?




2011-12-07  Werner Lemberg  <address@hidden>

        doc: Mention __STDC_LIMIT_MACROS
        * doc/autoconf.texi (Particular Type Checks): We need this
        macro for C++ compilation.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index d7d2231..7685702 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -6680,6 +6680,17 @@ use the results of this macro in C89-or-later code as 
 @end example
address@hidden __STDC_LIMIT_MACROS
+For C++, you have to insert the line
address@hidden example
+before including @file{stdint.h}; otherwise macros for minimum and maximum
+sizes like @code{INT8_MIN} or @code{UINT64_MAX} are not defined.
 This macro caches the type in the @code{ac_cv_c_int8_t} variable.
 @end defmac

reply via email to

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