This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH] libstdc++ os_defines now required for DragonFly
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: John Marino <gnugcc at marino dot st>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, libstdc++ at gcc dot gnu dot org
- Date: Mon, 6 Jul 2015 15:54:46 +0100
- Subject: Re: [PATCH] libstdc++ os_defines now required for DragonFly
- Authentication-results: sourceware.org; auth=none
- References: <559A894A dot 5080809 at marino dot st>
On 06/07/15 15:57 +0200, John Marino wrote:
On the development branch of DragonFly BSD, it was discovered that
__LONG_LONG_SUPPORTED was accidently unconditionally defined. This had
a positive side effect of allowing GCC conftests to pass for C99 support
via wchar.h. When the bug was fixed, the wchar C99 conftest now fails,
resulting in a c++ regression where software that previously compiled
now fail due to unknown functions such as wcstoll (since C99 supported
changed from "true" to "false")
FreeBSD behaves the exactly same way, and this OS dealt with it with
The DragonFly regression is fixed by copying the relevant defines from
the FreeBSD config. (see attached patch).
This patch should be applied to trunk and also backported to GCC-5 branch.
OK, I'll commit it thanks. I think we will be able to undo at least
part of the change on trunk soon-ish, as we're going to improve all
the _GLIBCXX_USE_C99 macros so that they are smarter and work better.
--- libstdc++-v3/config/os/bsd/dragonfly/os_defines.h (revision 225453)
+++ libstdc++-v3/config/os/bsd/dragonfly/os_defines.h (working copy)
@@ -29,4 +29,9 @@
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
+#define _GLIBCXX_USE_C99_CHECK 1
+#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
+#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
+#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED)