This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[PATCH] adjustments for NetWare
- From: "Jan Beulich" <jbeulich at novell dot com>
- To: <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 25 Feb 2008 11:14:46 +0000
- Subject: [PATCH] adjustments for NetWare
Built and tested for i686-novell-netware on i686-pc-linux-gnu.
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-25/libstdc++-v3/acinclude.m4 2008-02-22 10:57:23.000000000 +0100
+++ 2008-02-25/libstdc++-v3/acinclude.m4 2008-02-22 15:22:26.000000000 +0100
@@ -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
--- 2008-02-25/libstdc++-v3/config/os/generic/error_constants.h 2008-02-22 10:57:19.000000000 +0100
+++ 2008-02-25/libstdc++-v3/config/os/generic/error_constants.h 2008-02-22 15:27:48.000000000 +0100
@@ -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,
--- 2008-02-25/libstdc++-v3/configure 2008-02-22 10:57:23.000000000 +0100
+++ 2008-02-25/libstdc++-v3/configure 2008-02-22 15:23:14.000000000 +0100
@@ -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...
--- 2008-02-25/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc 2008-02-22 10:56:29.000000000 +0100
+++ 2008-02-25/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc 2008-02-22 16:41:42.000000000 +0100
@@ -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;