Zach Welch <zw@superlucidity.net> wrap _GNU_SOURCE defines
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 27 Apr 2009 05:29:30 +0000 (05:29 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 27 Apr 2009 05:29:30 +0000 (05:29 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1532 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/jim.c
src/target/oocd_trace.c

index 28dc950db1999937e39a60a0eb2cf4cd2886fa76..bcea7c53ff2611053e9ac89766a9c2409046b2d7 100644 (file)
@@ -49,7 +49,9 @@
 #define JIM_DYNLIB      /* Dynamic library support for UNIX and WIN32 */
 #endif /* JIM_ANSIC */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE    /* for vasprintf() */
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 55ea67caf63dcffcd77c96bdd3a637d669ab5242..e59c6203a8faa1918472d0573c01cb1ad25b390d 100644 (file)
@@ -21,7 +21,9 @@
 #include "config.h"
 #endif
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <string.h>
 #include <errno.h>