pkgsrc/devel/poco/patches/patch-Foundation_src_SharedMemory.cpp
fhajny 207f94940c Fix the C99 problem on SunOS properly.
GCC 4.6 and newer on SunOS will force C99 with C++, which requires
_XOPEN_SOURCE=600 to be set. On the other hand, GCC 4.5 and earlier will
require C99 for _XOPEN_SOURCE=600, but reject C99 for C++ code.

Set _XOPEN_SOURCE to 500 or 600 accordingly.
2012-07-29 11:26:54 +00:00

14 lines
417 B
C++

$NetBSD: patch-Foundation_src_SharedMemory.cpp,v 1.2 2012/07/29 11:26:54 fhajny Exp $
Do not mangle _XOPEN_SOURCE when GCC is used, rely on CXXFLAGS instead.
--- Foundation/src/SharedMemory.cpp.orig 2011-09-24 08:07:00.000000000 +0000
+++ Foundation/src/SharedMemory.cpp
@@ -34,7 +34,7 @@
//
-#if defined(__sun)
+#if defined(__sun) && !defined(__GNUC__)
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500
#endif