From: <zw...@ma...> - 2009-05-12 09:35:08
|
Author: zwelch Date: 2009-05-12 09:35:00 +0200 (Tue, 12 May 2009) New Revision: 1757 Modified: trunk/configure.in trunk/src/helper/jim.c trunk/src/target/oocd_trace.c Log: Define _GNU_SOURCE in config.h, remove definitions from source files. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-12 07:22:07 UTC (rev 1756) +++ trunk/configure.in 2009-05-12 07:35:00 UTC (rev 1757) @@ -851,6 +851,7 @@ AC_MSG_FAILURE([Could not find 'environ' in unistd.h or available libraries.]) fi +AC_DEFINE([_GNU_SOURCE],[1],[Use GNU C library extensions (e.g. stdndup).]) # set default gcc warnings GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security" Modified: trunk/src/helper/jim.c =================================================================== --- trunk/src/helper/jim.c 2009-05-12 07:22:07 UTC (rev 1756) +++ trunk/src/helper/jim.c 2009-05-12 07:35:00 UTC (rev 1757) @@ -53,9 +53,6 @@ #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> Modified: trunk/src/target/oocd_trace.c =================================================================== --- trunk/src/target/oocd_trace.c 2009-05-12 07:22:07 UTC (rev 1756) +++ trunk/src/target/oocd_trace.c 2009-05-12 07:35:00 UTC (rev 1757) @@ -21,11 +21,6 @@ #include "config.h" #endif -// we must define _GNU_SOURCE to get strndup -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #include "oocd_trace.h" #include "arm7_9_common.h" |