diff options
author | Paolo Carlini <pcarlini@suse.de> | 2006-01-30 15:32:09 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2006-01-30 15:32:09 +0000 |
commit | 03bf3bc1050030f8ad8f92fc4b6d8a3f69a8f5b8 (patch) | |
tree | fd4f7106f8c6d5f00e1a6dbed8368648ff3ce996 | |
parent | a6ab9fc0872bbc3330490c0e3ad5d0a61dbe4458 (diff) | |
download | gcc-03bf3bc1050030f8ad8f92fc4b6d8a3f69a8f5b8.tar.gz |
acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Do the <inttypes.h> checks only if the <stdint.h> checks are successful.
2006-01-30 Paolo Carlini <pcarlini@suse.de>
* acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Do the <inttypes.h>
checks only if the <stdint.h> checks are successful.
* configure: Regenerate.
From-SVN: r110399
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 36 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 35 |
3 files changed, 41 insertions, 36 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 07b96bcb318..a2af31ac714 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2006-01-30 Paolo Carlini <pcarlini@suse.de> + * acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Do the <inttypes.h> + checks only if the <stdint.h> checks are successful. + * configure: Regenerate. + +2006-01-30 Paolo Carlini <pcarlini@suse.de> + * include/tr1/cinttypes: New. * include/Makefile.am: Add. * testsuite/tr1/8_c_compatibility/cinttypes/functions: New. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 22b94d1273d..e83658f283a 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1181,27 +1181,29 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [ <tr1/cstdint> in namespace std::tr1.]) fi - # Check for the existence of <inttypes.h> functions. - AC_MSG_CHECKING([for ISO C99 support to TR1 in <inttypes.h>]) - AC_CACHE_VAL(ac_c99_inttypes_tr1, [ - AC_TRY_COMPILE([#include <inttypes.h>], - [intmax_t i, numer, denom, base; - const char* s; - char** endptr; - intmax_t ret; - uintmax_t uret; - imaxdiv_t dret; - ret = imaxabs(i); - dret = imaxdiv(numer, denom); - ret = strtoimax(s, endptr, base); - uret = strtoumax(s, endptr, base); - ],[ac_c99_inttypes_tr1=yes], [ac_c99_inttypes_tr1=no]) - ]) + # Check for the existence of <inttypes.h> functions (NB: doesn't make + # sense if the previous check fails, per C99, 7.8/1). + ac_c99_inttypes_tr1=no; + if test x"$ac_c99_stdint_tr1" = x"yes"; then + AC_MSG_CHECKING([for ISO C99 support to TR1 in <inttypes.h>]) + AC_TRY_COMPILE([#include <inttypes.h>], + [intmax_t i, numer, denom, base; + const char* s; + char** endptr; + intmax_t ret; + uintmax_t uret; + imaxdiv_t dret; + ret = imaxabs(i); + dret = imaxdiv(numer, denom); + ret = strtoimax(s, endptr, base); + uret = strtoumax(s, endptr, base); + ],[ac_c99_inttypes_tr1=yes], [ac_c99_inttypes_tr1=no]) + fi AC_MSG_RESULT($ac_c99_inttypes_tr1) if test x"$ac_c99_inttypes_tr1" = x"yes"; then AC_DEFINE(_GLIBCXX_USE_C99_INTTYPES_TR1, 1, [Define if C99 functions in <inttypes.h> should be imported in - <tr1/cinttypes> in namespace std::tr1.]) + <tr1/cinttypes> in namespace std::tr1.]) fi AC_LANG_RESTORE diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 2b8a85c8637..dfc5b4ab0e2 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -30610,14 +30610,13 @@ _ACEOF fi - # Check for the existence of <inttypes.h> functions. - echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <inttypes.h>" >&5 + # Check for the existence of <inttypes.h> functions (NB: doesn't make + # sense if the previous check fails, per C99, 7.8/1). + ac_c99_inttypes_tr1=no; + if test x"$ac_c99_stdint_tr1" = x"yes"; then + echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <inttypes.h>" >&5 echo $ECHO_N "checking for ISO C99 support to TR1 in <inttypes.h>... $ECHO_C" >&6 - if test "${ac_c99_inttypes_tr1+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -30628,15 +30627,15 @@ int main () { intmax_t i, numer, denom, base; - const char* s; - char** endptr; - intmax_t ret; - uintmax_t uret; - imaxdiv_t dret; - ret = imaxabs(i); - dret = imaxdiv(numer, denom); - ret = strtoimax(s, endptr, base); - uret = strtoumax(s, endptr, base); + const char* s; + char** endptr; + intmax_t ret; + uintmax_t uret; + imaxdiv_t dret; + ret = imaxabs(i); + dret = imaxdiv(numer, denom); + ret = strtoimax(s, endptr, base); + uret = strtoumax(s, endptr, base); ; return 0; @@ -30672,9 +30671,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_c99_inttypes_tr1=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - + fi echo "$as_me:$LINENO: result: $ac_c99_inttypes_tr1" >&5 echo "${ECHO_T}$ac_c99_inttypes_tr1" >&6 if test x"$ac_c99_inttypes_tr1" = x"yes"; then |