This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3 PATCH] Fix Darwin bootstrap failure: EBADMSG in system_error
- From: "Roger Sayle" <roger at eyesopen dot com>
- To: <gcc-patches at gcc dot gnu dot org>, <libstdc++ at gcc dot gnu dot org>
- Cc: "Benjamin Kosnik" <benjamin dot kosnik at gmail dot com>
- Date: Wed, 5 Sep 2007 12:17:48 -0600
- Subject: [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