Revisit https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 24 Feb 2012 20:33:19 +0000 (20:33 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 24 Feb 2012 20:33:19 +0000 (20:33 +0000)
and r39501:

Setting _XOPEN_SOURCE to 600 is only allowed on Solaris 10 if the compiler is
set to C99 mode.  Conversely (and as reported in the bug), simply defining it
(but with no value) is not allowed if the compiler *is* compiling to C99.

So, don't define _XOPEN_SOURCE at all on Solaris.  Keep defining it as 600 on
other OS's as (also) requested in that bug.

Maybe there's a cleaner way to do this but all of this is a "trickery" mess
anyway...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41182 f5534014-38df-0310-8fa8-9805f1628bb7

text2pcap.c
ui/gtk/text_import.c

index a9033d6d403881e57c494b315abf6aadcb787302..ed31688dd811e00498be30e7bb2ec390e8613ba6 100644 (file)
@@ -90,7 +90,9 @@
 #  define __USE_XOPEN
 #endif
 #ifndef _XOPEN_SOURCE
-#  define _XOPEN_SOURCE 600
+#  ifndef __solaris__
+#    define _XOPEN_SOURCE 600
+#  endif
 #endif
 
 /*
index 5c032739e753249935601035a4b08a3d70b4c0cc..7108de7634fbf00af37110f9ac6915cb2be0c4ee 100644 (file)
@@ -88,7 +88,9 @@
 #  define __USE_XOPEN
 #endif
 #ifndef _XOPEN_SOURCE
-#  define _XOPEN_SOURCE 600
+#  ifndef __solaris__
+#    define _XOPEN_SOURCE 600
+#  endif
 #endif
 
 /*