]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EBADMSG for darwin.
authorRoger Sayle <roger@eyesopen.com>
Wed, 5 Sep 2007 21:30:04 +0000 (21:30 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Wed, 5 Sep 2007 21:30:04 +0000 (21:30 +0000)
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EBADMSG for darwin.
* configure: Regenerate.
* include/std/system_error: Guard.
* testsuite/19_diagnostics/headers/system_error/
types_std_c++0x.cc: Same.
* testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
line numbers.

From-SVN: r128154

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/configure
libstdc++-v3/include/std/system_error
libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc

index 3f1734d0c6b87fd7774d5c2dcaef53c70fcf9f11..873ac16cef57f5fa5ee24426d3b7d0655f95a9ab 100644 (file)
@@ -1,3 +1,13 @@
+2007-09-05  Roger Sayle  <roger@eyesopen.com>
+
+       * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EBADMSG for darwin.
+       * configure: Regenerate.
+       * include/std/system_error: Guard.
+       * testsuite/19_diagnostics/headers/system_error/
+       types_std_c++0x.cc: Same.
+       * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
+       line numbers.
+
 2007-09-03  Paolo Carlini  <pcarlini@suse.de>
 
        PR libstdc++/33293
index 5fa76eda147c236780305278c39a418efebb72e0..064b6ad0b85cd217b6cf1ec362684c38b26d1479 100644 (file)
@@ -1351,6 +1351,16 @@ AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [
   if test x"$ac_system_error9" = x"yes"; then
     AC_DEFINE(HAVE_SYS_NERR, 1, [Define if sys_nerr exists.])
   fi
+
+  AC_MSG_CHECKING([for EBADMSG])
+  AC_CACHE_VAL(ac_system_error_10, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = EBADMSG; ],
+             [ac_system_error_10=yes], [ac_system_error_10=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_10)
+  if test x"$ac_system_error_10" = x"yes"; then
+    AC_DEFINE(HAVE_EBADMSG, 1, [Define if EBADMSG exists.])
+  fi
 ])
 
 dnl
index 4df7e23acf4146b53f8451ef360e7e18f841b32f..0e6eb2f8101603f0dd6256634c027826d8c365dc 100755 (executable)
@@ -17109,6 +17109,70 @@ _ACEOF
 
   fi
 
+  echo "$as_me:$LINENO: checking for EBADMSG" >&5
+echo $ECHO_N "checking for EBADMSG... $ECHO_C" >&6
+  if test "${ac_system_error_10+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 = EBADMSG;
+  ;
+  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_10=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_10=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+  echo "$as_me:$LINENO: result: $ac_system_error_10" >&5
+echo "${ECHO_T}$ac_system_error_10" >&6
+  if test x"$ac_system_error_10" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EBADMSG 1
+_ACEOF
+
+  fi
+
 
 # No surprises, no surprises...
 
@@ -17151,7 +17215,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 17154 "configure"
+#line 17218 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
index e5b65ed5fc8eddeee6eed6536a4c6497d59161fe..9758d5ebb7a3be917405fecbf929a5652e6c5ead 100644 (file)
@@ -63,7 +63,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       argument_out_of_domain =                         EDOM,
       bad_address =                            EFAULT,
       bad_file_descriptor =                    EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
       bad_message =                            EBADMSG,
+#endif
+
       broken_pipe =                            EPIPE,
       connection_aborted =                     ECONNABORTED,
       connection_already_in_progress =                 EALREADY,
index 766009c429ed44f8b3f87fd0acc2b55c9e95cb9b..0fdf2c7b32d27743b3ed93e5ce7f32052f13a373 100644 (file)
@@ -50,7 +50,7 @@ int main()
   return 0;
 }
 
-// { dg-error "is private" "" { target *-*-* } 183 }
+// { dg-error "is private" "" { target *-*-* } 187 }
 // { dg-error "within this context" "" { target *-*-* } 29 }
 // { dg-error "first required here" "" { target *-*-* } 48 }
 // { dg-excess-errors "copy constructor" }
index 742ef29a77ca7b66e25792a896145751d8ffa4e0..b5ba872b69a2adc316d74d06310f7e6d49d27151 100644 (file)
@@ -37,7 +37,11 @@ namespace gnu
   using std::argument_out_of_domain;
   using std:: bad_address;
   using std::bad_file_descriptor;
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
   using std::bad_message;
+#endif
+
   using std::broken_pipe;
   using std::connection_aborted;
   using std::connection_already_in_progress;