This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3 PATCH] Fix Darwin bootstrap failure: EBADMSG in system_error



The following patch fixes the current libstdc++ bootstrap failure on powerpc-apple-darwin7.9.0. The issue is that the new system_error header file unconditionally uses the value EBADMSG (everyone knows monosodium glutamate isn't good). Alas not all almost POSIX systems provide this value in sys/errno.h.


The fix is similar to Ben Kosnik's previous fix for FreeBSD, to add a suitable configure check, and then guard the usafe of EBADMSG and std::bad_message by _GLIBCXX_HAVE_EBADMSG.

The following patch has been tested on powerpc-apple-darwin7.9.0 where it allows the a full "make bootstrap" to complete without problems. A top-level "make -k check" also reveals that the testcase fixes are sufficient to prevent them failing (as with Ben's FreeBSD patch).

Ok for mainline?

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.

Roger
--

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]