Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it was
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 22 Apr 2007 20:04:34 +0000 (20:04 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 22 Apr 2007 20:04:34 +0000 (20:04 +0000)
already #defined to 1, so this would create a warning/error.

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

editcap.c
epan/ftypes/ftype-time.c
text2pcap.c

index 40846524182118a36f7828b573f373a7e992dbc5..2a11bf7a109ca41b1bb0b441c4a6a8baaf0899c0 100644 (file)
--- a/editcap.c
+++ b/editcap.c
 
 /*
  * Just make sure we include the prototype for strptime as well
- * (needed for glibc 2.2)
+ * (needed for glibc 2.2) but make sure we do this only if not
+ * yet defined.
  */
 
-#define __USE_XOPEN
+#ifndef __USE_XOPEN
+#  define __USE_XOPEN
+#endif
+
 #include <time.h>
 #include <glib.h>
 
index cd2663ac80830e50f17c3655de7f50f9080defef..ed50e3b16032a7c8ba927cb005f860b370591d76 100644 (file)
 
 /*
  * Just make sure we include the prototype for strptime as well
- * (needed for glibc 2.2)
+ * (needed for glibc 2.2) but make sure we do this only if not
+ * yet defined.
  */
-#define __USE_XOPEN
+#ifndef __USE_XOPEN
+#  define __USE_XOPEN
+#endif
 
 #include <time.h>
 
index ea058f2249f39739488781813a58b0154f49a0ef..a7349b9ce510b0b3f9bfbf1b0ce111fbe0e9dc0b 100644 (file)
 
 /*
  * Just make sure we include the prototype for strptime as well
- * (needed for glibc 2.2)
+ * (needed for glibc 2.2) but make sure we do this only if not
+ * yet defined.
  */
-#define __USE_XOPEN
+#ifndef
+#  define __USE_XOPEN
+#endif
 
 #include <time.h>
 #include <glib.h>