[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?
Attached.
Werner
======================================================================
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
follows:
#endif
@end example
address@hidden __STDC_LIMIT_MACROS
+For C++, you have to insert the line
+
address@hidden
+#define __STDC_LIMIT_MACROS
address@hidden example
+
address@hidden
+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
- Re: uint64_t fails with C++, (continued)
- Re: uint64_t fails with C++, Mike Frysinger, 2011/12/07
- Re: uint64_t fails with C++, Nick Bowler, 2011/12/07
- Re: uint64_t fails with C++, Mike Frysinger, 2011/12/07
- Re: uint64_t fails with C++, Nick Bowler, 2011/12/07
- Re: uint64_t fails with C++, Paul Eggert, 2011/12/07
- Re: uint64_t fails with C++, Bob Friesenhahn, 2011/12/07
- Re: uint64_t fails with C++, Ben Pfaff, 2011/12/07
- Re: uint64_t fails with C++, Peter O'Gorman, 2011/12/07
- Re: uint64_t fails with C++, Werner LEMBERG, 2011/12/07
- Re: uint64_t fails with C++, Eric Blake, 2011/12/07
- Re: uint64_t fails with C++,
Werner LEMBERG <=
uint64_t fails with C++, Werner LEMBERG, 2011/12/07
uint64_t fails with C++, Werner LEMBERG, 2011/12/07
Re: uint64_t fails with C++, Werner LEMBERG, 2011/12/07