diff options
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 20 | ||||
-rw-r--r-- | libstdc++-v3/config/os/generic/error_constants.h | 7 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 128 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc | 7 |
5 files changed, 171 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a1550cc..7333576 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2008-02-25 Jan Beulich <jbeulich@novell.com> + + * acinclude.m4: Also check for EIDRM and ETXTBSY. + * configure: Re-generate. + * config/os/generic/error_constants.h (namespace posix_error): + Also wrap uses of EIDRM and ETXTBSY in conditionals. + * testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc: + Likewise. + 2008-02-20 Jason Merrill <jason@redhat.com> * include/bits/c++config: Use 'inline namespace' instead of diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index bd14d90..45c8ffd 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1440,6 +1440,26 @@ AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [ if test x"$ac_system_error_13" = x"yes"; then AC_DEFINE(HAVE_ENOTSUP, 1, [Define if ENOTSUP exists.]) fi + + AC_MSG_CHECKING([for EIDRM]) + AC_CACHE_VAL(ac_system_error_14, [ + AC_TRY_COMPILE([#include <errno.h>], [ int i = EIDRM; ], + [ac_system_error_14=yes], [ac_system_error_14=no]) + ]) + AC_MSG_RESULT($ac_system_error_14) + if test x"$ac_system_error_14" = x"yes"; then + AC_DEFINE(HAVE_EIDRM, 1, [Define if EIDRM exists.]) + fi + + AC_MSG_CHECKING([for ETXTBSY]) + AC_CACHE_VAL(ac_system_error_15, [ + AC_TRY_COMPILE([#include <errno.h>], [ int i = ETXTBSY; ], + [ac_system_error_15=yes], [ac_system_error_15=no]) + ]) + AC_MSG_RESULT($ac_system_error_15) + if test x"$ac_system_error_15" = x"yes"; then + AC_DEFINE(HAVE_ETXTBSY, 1, [Define if ETXTBSY exists.]) + fi ]) dnl diff --git a/libstdc++-v3/config/os/generic/error_constants.h b/libstdc++-v3/config/os/generic/error_constants.h index bec1fe4..644d111 100644 --- a/libstdc++-v3/config/os/generic/error_constants.h +++ b/libstdc++-v3/config/os/generic/error_constants.h @@ -72,7 +72,11 @@ namespace posix_error filename_too_long = ENAMETOOLONG, function_not_supported = ENOSYS, host_unreachable = EHOSTUNREACH, + +#ifdef _GLIBCXX_HAVE_EIDRM identifier_removed = EIDRM, +#endif + illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, interrupted = EINTR, @@ -156,7 +160,10 @@ namespace posix_error stream_timeout = ETIME, #endif +#ifdef _GLIBCXX_HAVE_ETXTBSY text_file_busy = ETXTBSY, +#endif + timed_out = ETIMEDOUT, too_many_files_open_in_system = ENFILE, too_many_files_open = EMFILE, diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index e23e3df..b95feb4 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -17806,6 +17806,134 @@ _ACEOF fi + echo "$as_me:$LINENO: checking for EIDRM" >&5 +echo $ECHO_N "checking for EIDRM... $ECHO_C" >&6 + if test "${ac_system_error_14+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 = EIDRM; + ; + 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_14=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_system_error_14=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + echo "$as_me:$LINENO: result: $ac_system_error_14" >&5 +echo "${ECHO_T}$ac_system_error_14" >&6 + if test x"$ac_system_error_14" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EIDRM 1 +_ACEOF + + fi + + echo "$as_me:$LINENO: checking for ETXTBSY" >&5 +echo $ECHO_N "checking for ETXTBSY... $ECHO_C" >&6 + if test "${ac_system_error_15+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 = ETXTBSY; + ; + 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_15=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_system_error_15=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + echo "$as_me:$LINENO: result: $ac_system_error_15" >&5 +echo "${ECHO_T}$ac_system_error_15" >&6 + if test x"$ac_system_error_15" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ETXTBSY 1 +_ACEOF + + fi + # No surprises, no surprises... 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 31b6d4b..00a2457 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 @@ -57,7 +57,11 @@ namespace gnu using std::posix_error::filename_too_long; using std::posix_error::function_not_supported; using std::posix_error::host_unreachable; + +#ifdef _GLIBCXX_HAVE_EIDRM using std::posix_error::identifier_removed; +#endif + using std::posix_error::illegal_byte_sequence; using std::posix_error::inappropriate_io_control_operation; using std::posix_error::interrupted; @@ -139,7 +143,10 @@ namespace gnu using std::posix_error::stream_timeout; #endif +#ifdef _GLIBCXX_HAVE_ETXTBSY using std::posix_error::text_file_busy; +#endif + using std::posix_error::timed_out; using std::posix_error::too_many_files_open_in_system; using std::posix_error::too_many_files_open; |