aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2007-04-22 20:04:34 +0000
committerJörg Mayer <jmayer@loplof.de>2007-04-22 20:04:34 +0000
commitb16106f89f474978b22d8c7e555bc61634d6766f (patch)
tree75fd9c188c709b19a8d4642567741855434e6700
parent065be642f4a970c0a12d80d00df7e1e93cbbd254 (diff)
Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it was
already #defined to 1, so this would create a warning/error. svn path=/trunk/; revision=21508
-rw-r--r--editcap.c8
-rw-r--r--epan/ftypes/ftype-time.c7
-rw-r--r--text2pcap.c7
3 files changed, 16 insertions, 6 deletions
diff --git a/editcap.c b/editcap.c
index 4084652418..2a11bf7a10 100644
--- a/editcap.c
+++ b/editcap.c
@@ -18,10 +18,14 @@
/*
* 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>
diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c
index cd2663ac80..ed50e3b160 100644
--- a/epan/ftypes/ftype-time.c
+++ b/epan/ftypes/ftype-time.c
@@ -29,9 +29,12 @@
/*
* 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>
diff --git a/text2pcap.c b/text2pcap.c
index ea058f2249..a7349b9ce5 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -88,9 +88,12 @@
/*
* 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>