diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-06 12:25:00 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-06 12:25:00 +0000 |
commit | e061cb0f9d166c0a04b7753cbdb4548d7831a69a (patch) | |
tree | c017003f10aa30deb666f6a595b74f5885f3917e /libstdc++-v3/configure | |
parent | a6090c119ec004ea2c30ebe04d13e8dd0c096199 (diff) | |
download | gcc-e061cb0f9d166c0a04b7753cbdb4548d7831a69a.tar.gz |
2008-08-06 Paolo Carlini <paolo.carlini@oracle.com>
* acinclude.m4 ([GLIBCXX_CHECK_INT64_T]): Also check whether int64_t
is actually a typedef to long or long long.
* include/bits/postypes.h: If int64_t is actually a typedef for
long or long long don't include <stdint.h> unnecessarily.
* configure: Regenerate.
* config.h.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138797 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-x | libstdc++-v3/configure | 160 |
1 files changed, 157 insertions, 3 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 2ea940ae8a1..5fb310780a6 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -39677,6 +39677,16 @@ echo "${ECHO_T}$glibcxx_cv_WRITEV" >&6 # For the __streamoff_base_type typedef. + + + + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + echo "$as_me:$LINENO: checking for int64_t" >&5 echo $ECHO_N "checking for int64_t... $ECHO_C" >&6 if test "${glibcxx_cv_INT64_T+set}" = set; then @@ -39707,7 +39717,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -39731,16 +39741,160 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi + if test $glibcxx_cv_INT64_T = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_INT64_T 1 _ACEOF - fi - echo "$as_me:$LINENO: result: $glibcxx_cv_INT64_T" >&5 + echo "$as_me:$LINENO: result: $glibcxx_cv_INT64_T" >&5 echo "${ECHO_T}$glibcxx_cv_INT64_T" >&6 + echo "$as_me:$LINENO: checking for int64_t as long" >&5 +echo $ECHO_N "checking for int64_t as long... $ECHO_C" >&6 + if test "${glibcxx_cv_int64_t_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdint.h> + template<typename, typename> struct same { enum { value = -1 }; }; + template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; }; + int array[same<int64_t, long>::value]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + glibcxx_cv_int64_t_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +glibcxx_cv_int64_t_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + + if test $glibcxx_cv_int64_t_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INT64_T_LONG 1 +_ACEOF + + echo "$as_me:$LINENO: result: $glibcxx_cv_int64_t_long" >&5 +echo "${ECHO_T}$glibcxx_cv_int64_t_long" >&6 + fi + + echo "$as_me:$LINENO: checking for int64_t as long long" >&5 +echo $ECHO_N "checking for int64_t as long long... $ECHO_C" >&6 + if test "${glibcxx_cv_int64_t_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdint.h> + template<typename, typename> struct same { enum { value = -1 }; }; + template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; }; + int array[same<int64_t, long long>::value]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + glibcxx_cv_int64_t_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +glibcxx_cv_int64_t_long_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + + if test $glibcxx_cv_int64_t_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INT64_T_LONG_LONG 1 +_ACEOF + + echo "$as_me:$LINENO: result: $glibcxx_cv_int64_t_long_long" >&5 +echo "${ECHO_T}$glibcxx_cv_int64_t_long_long" >&6 + fi + fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # For LFS support. |