2008-02-14 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Feb 2008 17:03:02 +0000 (17:03 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Feb 2008 17:03:02 +0000 (17:03 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132319 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/config/os/generic/error_constants.h
libstdc++-v3/configure

index 2d71b9b..b9a11b2 100644 (file)
@@ -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.
index c4ccb2a..bd14d90 100644 (file)
@@ -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
index 4113e0b..4c187f1 100644 (file)
@@ -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
 
index 53bccdc..bec1fe4 100644 (file)
@@ -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
index e6d0836..e23e3df 100755 (executable)
@@ -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.