This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [PATCH] libstdc++ os_defines now required for DragonFly


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
system-specific defines.
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.

Committed to trunk so far, we'll have to wait for the branch to
re-open next week.


Index: libstdc++-v3/config/os/bsd/dragonfly/os_defines.h
===================================================================
--- 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)
+
#endif


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