re PR libstdc++/37147 (New failures: 20_util/ratio/comparisons/comp2.cc et al)
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 18 Aug 2008 15:02:10 +0000 (15:02 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 18 Aug 2008 15:02:10 +0000 (15:02 +0000)
2008-08-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/37147
* acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Tighten checks on stdint.h,
check the macros too.
* configure: Regenerate.

From-SVN: r139200

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/configure

index e8e6739b5b1d44116ff683a1f607d56110932989..4afb75de21e3e532eaed65c242ba254afc0dff75 100644 (file)
@@ -1,3 +1,10 @@
+2008-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR libstdc++/37147
+       * acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Tighten checks on stdint.h,
+       check the macros too.
+       * configure: Regenerate.
+
 2008-08-17  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * acinclude.m4 ([AC_LC_MESSAGES]): Use AC_TRY_COMPILE instead of
index 2772f5dce6f0bdbaa685c90ec6ce4c09e5c15fdc..66eb9dd103c84ad49f5384faa8dacb9b1c29b169 100644 (file)
@@ -1274,35 +1274,93 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
   # Check for the existence of <stdint.h> types.
   AC_MSG_CHECKING([for ISO C99 support to TR1 in <stdint.h>])
   AC_CACHE_VAL(glibcxx_cv_c99_stdint_tr1, [
-  AC_TRY_COMPILE([#include <stdint.h>],
+  AC_TRY_COMPILE([#define __STDC_LIMIT_MACROS
+                  #define __STDC_CONSTANT_MACROS
+                  #include <stdint.h>],
                 [typedef int8_t          my_int8_t;
+                 my_int8_t               i8 = INT8_MIN;
+                 i8 = INT8_MAX;
                  typedef int16_t         my_int16_t;
+                 my_int16_t              i16 = INT16_MIN;
+                 i16 = INT16_MAX;
                  typedef int32_t         my_int32_t;
+                 my_int32_t              i32 = INT32_MIN;
+                 i32 = INT32_MAX;
                  typedef int64_t         my_int64_t;
+                 my_int64_t              i64 = INT64_MIN;
+                 i64 = INT64_MAX;
                  typedef int_fast8_t     my_int_fast8_t;
+                 my_int_fast8_t          if8 = INT_FAST8_MIN;
+                 if8 = INT_FAST8_MAX;
                  typedef int_fast16_t    my_int_fast16_t;
+                 my_int_fast16_t         if16 = INT_FAST16_MIN;
+                 if16 = INT_FAST16_MAX;
                  typedef int_fast32_t    my_int_fast32_t;
-                 typedef int_fast64_t    my_int_fast64_t;      
+                 my_int_fast32_t         if32 = INT_FAST32_MIN;
+                 if32 = INT_FAST32_MAX;
+                 typedef int_fast64_t    my_int_fast64_t;
+                 my_int_fast64_t         if64 = INT_FAST64_MIN;
+                 if64 = INT_FAST64_MAX;
                  typedef int_least8_t    my_int_least8_t;
+                 my_int_least8_t         il8 = INT_LEAST8_MIN;
+                 il8 = INT_LEAST8_MAX;
                  typedef int_least16_t   my_int_least16_t;
+                 my_int_least16_t        il16 = INT_LEAST16_MIN;
+                 il16 = INT_LEAST16_MAX;
                  typedef int_least32_t   my_int_least32_t;
+                 my_int_least32_t        il32 = INT_LEAST32_MIN;
+                 il32 = INT_LEAST32_MAX;
                  typedef int_least64_t   my_int_least64_t;
+                 my_int_least64_t        il64 = INT_LEAST64_MIN;
+                 il64 = INT_LEAST64_MAX;
                  typedef intmax_t        my_intmax_t;
+                 my_intmax_t             im = INTMAX_MAX;
+                 im = INTMAX_MIN;
                  typedef intptr_t        my_intptr_t;
+                 my_intptr_t             ip = INTPTR_MAX;
+                 ip = INTPTR_MIN;
                  typedef uint8_t         my_uint8_t;
+                 my_uint8_t              ui8 = UINT8_MAX;
+                 ui8 = UINT8_MAX;
                  typedef uint16_t        my_uint16_t;
+                 my_uint16_t             ui16 = UINT16_MAX;
+                 ui16 = UINT16_MAX;
                  typedef uint32_t        my_uint32_t;
+                 my_uint32_t             ui32 = UINT32_MAX;
+                 ui32 = UINT32_MAX;
                  typedef uint64_t        my_uint64_t;
+                 my_uint64_t             ui64 = UINT64_MAX;
+                 ui64 = UINT64_MAX;
                  typedef uint_fast8_t    my_uint_fast8_t;
+                 my_uint_fast8_t         uif8 = UINT_FAST8_MAX;
+                 uif8 = UINT_FAST8_MAX;
                  typedef uint_fast16_t   my_uint_fast16_t;
+                 my_uint_fast16_t        uif16 = UINT_FAST16_MAX;
+                 uif16 = UINT_FAST16_MAX;
                  typedef uint_fast32_t   my_uint_fast32_t;
-                 typedef uint_fast64_t   my_uint_fast64_t;     
+                 my_uint_fast32_t        uif32 = UINT_FAST32_MAX;
+                 uif32 = UINT_FAST32_MAX;
+                 typedef uint_fast64_t   my_uint_fast64_t;
+                 my_uint_fast64_t        uif64 = UINT_FAST64_MAX;
+                 uif64 = UINT_FAST64_MAX;
                  typedef uint_least8_t   my_uint_least8_t;
+                 my_uint_least8_t        uil8 = UINT_LEAST8_MAX;
+                 uil8 = UINT_LEAST8_MAX;
                  typedef uint_least16_t  my_uint_least16_t;
+                 my_uint_least16_t       uil16 = UINT_LEAST16_MAX;
+                 uil16 = UINT_LEAST16_MAX;
                  typedef uint_least32_t  my_uint_least32_t;
+                 my_uint_least32_t       uil32 = UINT_LEAST32_MAX;
+                 uil32 = UINT_LEAST32_MAX;
                  typedef uint_least64_t  my_uint_least64_t;
+                 my_uint_least64_t       uil64 = UINT_LEAST64_MAX;
+                 uil64 = UINT_LEAST64_MAX;
                  typedef uintmax_t       my_uintmax_t;
+                 my_uintmax_t            uim = UINTMAX_MAX;
+                 uim = UINTMAX_MAX;
                  typedef uintptr_t       my_uintptr_t;
+                 my_uintptr_t            uip = UINTPTR_MAX;
+                 uip = UINTPTR_MAX;
                 ],[glibcxx_cv_c99_stdint_tr1=yes],
                   [glibcxx_cv_c99_stdint_tr1=no])
   ])
index 8deb763736d42438249100ce354607eb65c8f2be..d9d257ef5ef73305f07e9a2c61e5bfdaa2ad0240 100755 (executable)
@@ -20038,38 +20038,96 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdint.h>
+#define __STDC_LIMIT_MACROS
+                  #define __STDC_CONSTANT_MACROS
+                  #include <stdint.h>
 int
 main ()
 {
 typedef int8_t          my_int8_t;
+                 my_int8_t               i8 = INT8_MIN;
+                 i8 = INT8_MAX;
                  typedef int16_t         my_int16_t;
+                 my_int16_t              i16 = INT16_MIN;
+                 i16 = INT16_MAX;
                  typedef int32_t         my_int32_t;
+                 my_int32_t              i32 = INT32_MIN;
+                 i32 = INT32_MAX;
                  typedef int64_t         my_int64_t;
+                 my_int64_t              i64 = INT64_MIN;
+                 i64 = INT64_MAX;
                  typedef int_fast8_t     my_int_fast8_t;
+                 my_int_fast8_t          if8 = INT_FAST8_MIN;
+                 if8 = INT_FAST8_MAX;
                  typedef int_fast16_t    my_int_fast16_t;
+                 my_int_fast16_t         if16 = INT_FAST16_MIN;
+                 if16 = INT_FAST16_MAX;
                  typedef int_fast32_t    my_int_fast32_t;
+                 my_int_fast32_t         if32 = INT_FAST32_MIN;
+                 if32 = INT_FAST32_MAX;
                  typedef int_fast64_t    my_int_fast64_t;
+                 my_int_fast64_t         if64 = INT_FAST64_MIN;
+                 if64 = INT_FAST64_MAX;
                  typedef int_least8_t    my_int_least8_t;
+                 my_int_least8_t         il8 = INT_LEAST8_MIN;
+                 il8 = INT_LEAST8_MAX;
                  typedef int_least16_t   my_int_least16_t;
+                 my_int_least16_t        il16 = INT_LEAST16_MIN;
+                 il16 = INT_LEAST16_MAX;
                  typedef int_least32_t   my_int_least32_t;
+                 my_int_least32_t        il32 = INT_LEAST32_MIN;
+                 il32 = INT_LEAST32_MAX;
                  typedef int_least64_t   my_int_least64_t;
+                 my_int_least64_t        il64 = INT_LEAST64_MIN;
+                 il64 = INT_LEAST64_MAX;
                  typedef intmax_t        my_intmax_t;
+                 my_intmax_t             im = INTMAX_MAX;
+                 im = INTMAX_MIN;
                  typedef intptr_t        my_intptr_t;
+                 my_intptr_t             ip = INTPTR_MAX;
+                 ip = INTPTR_MIN;
                  typedef uint8_t         my_uint8_t;
+                 my_uint8_t              ui8 = UINT8_MAX;
+                 ui8 = UINT8_MAX;
                  typedef uint16_t        my_uint16_t;
+                 my_uint16_t             ui16 = UINT16_MAX;
+                 ui16 = UINT16_MAX;
                  typedef uint32_t        my_uint32_t;
+                 my_uint32_t             ui32 = UINT32_MAX;
+                 ui32 = UINT32_MAX;
                  typedef uint64_t        my_uint64_t;
+                 my_uint64_t             ui64 = UINT64_MAX;
+                 ui64 = UINT64_MAX;
                  typedef uint_fast8_t    my_uint_fast8_t;
+                 my_uint_fast8_t         uif8 = UINT_FAST8_MAX;
+                 uif8 = UINT_FAST8_MAX;
                  typedef uint_fast16_t   my_uint_fast16_t;
+                 my_uint_fast16_t        uif16 = UINT_FAST16_MAX;
+                 uif16 = UINT_FAST16_MAX;
                  typedef uint_fast32_t   my_uint_fast32_t;
+                 my_uint_fast32_t        uif32 = UINT_FAST32_MAX;
+                 uif32 = UINT_FAST32_MAX;
                  typedef uint_fast64_t   my_uint_fast64_t;
+                 my_uint_fast64_t        uif64 = UINT_FAST64_MAX;
+                 uif64 = UINT_FAST64_MAX;
                  typedef uint_least8_t   my_uint_least8_t;
+                 my_uint_least8_t        uil8 = UINT_LEAST8_MAX;
+                 uil8 = UINT_LEAST8_MAX;
                  typedef uint_least16_t  my_uint_least16_t;
+                 my_uint_least16_t       uil16 = UINT_LEAST16_MAX;
+                 uil16 = UINT_LEAST16_MAX;
                  typedef uint_least32_t  my_uint_least32_t;
+                 my_uint_least32_t       uil32 = UINT_LEAST32_MAX;
+                 uil32 = UINT_LEAST32_MAX;
                  typedef uint_least64_t  my_uint_least64_t;
+                 my_uint_least64_t       uil64 = UINT_LEAST64_MAX;
+                 uil64 = UINT_LEAST64_MAX;
                  typedef uintmax_t       my_uintmax_t;
+                 my_uintmax_t            uim = UINTMAX_MAX;
+                 uim = UINTMAX_MAX;
                  typedef uintptr_t       my_uintptr_t;
+                 my_uintptr_t            uip = UINTPTR_MAX;
+                 uip = UINTPTR_MAX;
 
   ;
   return 0;