aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2008-02-14 17:03:02 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2008-02-14 17:03:02 +0000
commit4bcf935d1195ea17f17d5249ef2a502ead734535 (patch)
tree764a3963c92dd5f036ee47531383f80648caecee /libstdc++-v3
parenta5bfb13a75be342bbe6296a95b8e61bdef02a684 (diff)
downloadgcc-4bcf935d1195ea17f17d5249ef2a502ead734535.zip
gcc-4bcf935d1195ea17f17d5249ef2a502ead734535.tar.gz
gcc-4bcf935d1195ea17f17d5249ef2a502ead734535.tar.bz2
error_constants.h (posix_errno): Guard not_supported use of ENOTSUP.
2008-02-14 Benjamin Kosnik <bkoz@redhat.com> * config/os/generic/error_constants.h (posix_errno): Guard not_supported use of ENOTSUP. * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add check for ENOTSUP for OpenBSD. * aclocal.m4: Regenerate. * configure: Rengerate. * config.h.in: Same. From-SVN: r132319
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog10
-rw-r--r--libstdc++-v3/acinclude.m410
-rw-r--r--libstdc++-v3/config.h.in3
-rw-r--r--libstdc++-v3/config/os/generic/error_constants.h13
-rwxr-xr-xlibstdc++-v3/configure66
5 files changed, 99 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2d71b9b..b9a11b2 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,13 @@
+2008-02-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/os/generic/error_constants.h (posix_errno): Guard
+ not_supported use of ENOTSUP.
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add check for ENOTSUP
+ for OpenBSD.
+ * aclocal.m4: Regenerate.
+ * configure: Rengerate.
+ * config.h.in: Same.
+
2008-02-13 Benjamin Kosnik <bkoz@redhat.com>
* doc/doxygen/mainpage.html: Correct links.
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index c4ccb2a..bd14d90 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1430,6 +1430,16 @@ AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [
if test x"$ac_system_error_12" = x"yes"; then
AC_DEFINE(HAVE_EOVERFLOW, 1, [Define if EOVERFLOW exists.])
fi
+
+ AC_MSG_CHECKING([for ENOTSUP])
+ AC_CACHE_VAL(ac_system_error_13, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOTSUP; ],
+ [ac_system_error_13=yes], [ac_system_error_13=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_13)
+ if test x"$ac_system_error_13" = x"yes"; then
+ AC_DEFINE(HAVE_ENOTSUP, 1, [Define if ENOTSUP exists.])
+ fi
])
dnl
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 4113e0b..4c187f1 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -84,6 +84,9 @@
/* Define if ENOTRECOVERABLE exists. */
#undef HAVE_ENOTRECOVERABLE
+/* Define if ENOTSUP exists. */
+#undef HAVE_ENOTSUP
+
/* Define if EOVERFLOW exists. */
#undef HAVE_EOVERFLOW
diff --git a/libstdc++-v3/config/os/generic/error_constants.h b/libstdc++-v3/config/os/generic/error_constants.h
index 53bccdcb..bec1fe4 100644
--- a/libstdc++-v3/config/os/generic/error_constants.h
+++ b/libstdc++-v3/config/os/generic/error_constants.h
@@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -33,7 +33,7 @@
*/
#ifndef _GLIBCXX_ERROR_CONSTANTS
-# define _GLIBCXX_ERROR_CONSTANTS 1
+#define _GLIBCXX_ERROR_CONSTANTS 1
#include <bits/c++config.h>
#include <cerrno>
@@ -90,6 +90,7 @@ namespace posix_error
#ifdef _GLIBCXX_HAVE_ENOLINK
no_link = ENOLINK,
#endif
+
no_lock_available = ENOLCK,
#ifdef _GLIBCXX_HAVE_ENODATA
@@ -117,7 +118,10 @@ namespace posix_error
not_connected = ENOTCONN,
not_enough_memory = ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
not_supported = ENOTSUP,
+#endif
#ifdef _GLIBCXX_HAVE_ECANCELED
operation_canceled = ECANCELED,
@@ -127,18 +131,23 @@ namespace posix_error
operation_not_permitted = EPERM,
operation_not_supported = EOPNOTSUPP,
operation_would_block = EWOULDBLOCK,
+
#ifdef _GLIBCXX_HAVE_EOWNERDEAD
owner_dead = EOWNERDEAD,
#endif
+
permission_denied = EACCES,
+
#ifdef _GLIBCXX_HAVE_EPROTO
protocol_error = EPROTO,
#endif
+
protocol_not_supported = EPROTONOSUPPORT,
read_only_file_system = EROFS,
resource_deadlock_would_occur = EDEADLK,
resource_unavailable_try_again = EAGAIN,
result_out_of_range = ERANGE,
+
#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
state_not_recoverable = ENOTRECOVERABLE,
#endif
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index e6d0836..e23e3df 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -17742,6 +17742,70 @@ _ACEOF
fi
+ echo "$as_me:$LINENO: checking for ENOTSUP" >&5
+echo $ECHO_N "checking for ENOTSUP... $ECHO_C" >&6
+ if test "${ac_system_error_13+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 = ENOTSUP;
+ ;
+ 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_13=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_13=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_13" >&5
+echo "${ECHO_T}$ac_system_error_13" >&6
+ if test x"$ac_system_error_13" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENOTSUP 1
+_ACEOF
+
+ fi
+
# No surprises, no surprises...
@@ -17784,7 +17848,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 17787 "configure"
+#line 17851 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.