diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-11 23:22:22 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-11 23:22:22 +0000 |
commit | c4aecd09588fb5b758b912e43f3bf57564107682 (patch) | |
tree | 27adee2392f20a8de4cf439b42558a6e58c89e08 /libstdc++-v3 | |
parent | 40dddfe05d31ad3b488780cad6b5b6d710dc66a7 (diff) | |
download | gcc-c4aecd09588fb5b758b912e43f3bf57564107682.tar.gz |
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EOVERFLOW for Tru64.
* configure: Regenerate.
* config/os/generic/error_constants.h: Guard.
* testsuite/19_diagnostics/headers/system_error/
types_std_c++0x.cc: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 10 | ||||
-rw-r--r-- | libstdc++-v3/config/os/generic/error_constants.h | 4 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 66 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc | 4 |
5 files changed, 91 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f5e60e8529c..56414255cc7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2007-10-11 Roger Sayle <roger@eyesopen.com> + + * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EOVERFLOW for Tru64. + * configure: Regenerate. + * config/os/generic/error_constants.h: Guard. + * testsuite/19_diagnostics/headers/system_error/ + types_std_c++0x.cc: Same. + 2007-10-11 Benjamin Kosnik <bkoz@redhat.com> Convert ext/hash_map, set to tr1/functional, tr1/unordered_map, set. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 4fb4af3879d..2ca902fcd83 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1410,6 +1410,16 @@ AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [ if test x"$ac_system_error_11" = x"yes"; then AC_DEFINE(HAVE_ECANCELED, 1, [Define if ECANCELED exists.]) fi + + AC_MSG_CHECKING([for EOVERFLOW]) + AC_CACHE_VAL(ac_system_error_12, [ + AC_TRY_COMPILE([#include <errno.h>], [ int i = EOVERFLOW; ], + [ac_system_error_12=yes], [ac_system_error_12=no]) + ]) + AC_MSG_RESULT($ac_system_error_12) + if test x"$ac_system_error_12" = x"yes"; then + AC_DEFINE(HAVE_EOVERFLOW, 1, [Define if EOVERFLOW exists.]) + fi ]) dnl diff --git a/libstdc++-v3/config/os/generic/error_constants.h b/libstdc++-v3/config/os/generic/error_constants.h index d13b7ff3e8b..d3a9688a856 100644 --- a/libstdc++-v3/config/os/generic/error_constants.h +++ b/libstdc++-v3/config/os/generic/error_constants.h @@ -151,7 +151,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) too_many_files_open = EMFILE, too_many_links = EMLINK, too_many_synbolic_link_levels = ELOOP, + +#ifdef _GLIBCXX_HAVE_EOVERFLOW value_too_large = EOVERFLOW, +#endif + wrong_protocol_type = EPROTOTYPE, no_posix_equivalent = 1L << 16 }; diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index d224ffc784e..05337f9f354 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -17672,6 +17672,70 @@ _ACEOF fi + echo "$as_me:$LINENO: checking for EOVERFLOW" >&5 +echo $ECHO_N "checking for EOVERFLOW... $ECHO_C" >&6 + if test "${ac_system_error_12+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 <errno.h> +int +main () +{ + int i = EOVERFLOW; + ; + 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_c_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 + ac_system_error_12=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_system_error_12=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + echo "$as_me:$LINENO: result: $ac_system_error_12" >&5 +echo "${ECHO_T}$ac_system_error_12" >&6 + if test x"$ac_system_error_12" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EOVERFLOW 1 +_ACEOF + + fi + # No surprises, no surprises... @@ -17714,7 +17778,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 17717 "configure" +#line 17781 "configure" int main() { // NB: _Atomic_word not necessarily int. diff --git a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc index 47e24d937b6..356b5074ff7 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc @@ -145,6 +145,10 @@ namespace gnu using std::too_many_files_open; using std::too_many_links; using std::too_many_synbolic_link_levels; + +#ifdef _GLIBCXX_HAVE_EOVERFLOW using std::value_too_large; +#endif + using std::wrong_protocol_type; } |