bug-gnulib
[Top][All Lists]
Advanced

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

Re: inttypes.h compile error


From: Paul Eggert
Subject: Re: inttypes.h compile error
Date: Thu, 15 Dec 2011 11:50:23 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 12/15/11 04:50, Alexander V. Lukyanov wrote:
> I get this message in a C++ program on linux (glibc-2.14).
> 
> ../lib/inttypes.h:58:3: error: #error "This file assumes that 'int' has 
> exactly 32 bits. Please report your platform and compiler to 
> <address@hidden>."

Thanks for reporting that.  I installed the following patch
to try to fix it.  Please give it a try.

stdint: don't assume C++11 when compiling with g++
Problem reported for glibc 2.14 and g++ by Alexander V. Lukyanov in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-12/msg00099.html>.
* m4/stdint.m4 (gl_STDINT_H): Don't go to extra work to make it
work also in C++ before C++11, as that improperly inhibits
generating a substitute stdint.h for that case.
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index cfad016..cc3866b 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 42
+# stdint.m4 serial 43
 dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -69,8 +69,6 @@ AC_DEFUN_ONCE([gl_STDINT_H],
       [gl_cv_header_working_stdint_h=no
        AC_COMPILE_IFELSE([
          AC_LANG_PROGRAM([[
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ before C++11 */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ before C++11 */
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
 #include <stdint.h>
 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */



reply via email to

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