aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Hunter <evan@ozhiker.com>2016-10-08 11:27:03 +0100
committerSteve Bennett <steveb@workware.net.au>2016-10-09 08:19:18 +1000
commit1b0cdc3e669b69281371ab77893792d2d8621af9 (patch)
tree62e302af329cc6ea7cfd858652c7298c0280a44d
parent9b5c92b150d319f35cdc93cd556101f1de6b2b32 (diff)
downloadjimtcl-1b0cdc3e669b69281371ab77893792d2d8621af9.zip
jimtcl-1b0cdc3e669b69281371ab77893792d2d8621af9.tar.gz
jimtcl-1b0cdc3e669b69281371ab77893792d2d8621af9.tar.bz2
Avoid re-defining _GNU_SOURCE
pkgconfig for SDL causes _GNU_SOURCE to be defined on the commandline, hence causing an error when these source files re-define it.
-rw-r--r--jim-aio.c2
-rw-r--r--jim-exec.c2
-rw-r--r--jim.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/jim-aio.c b/jim-aio.c
index 93e0b41..0631e40 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -39,7 +39,9 @@
#include "jimautoconf.h"
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <stdio.h>
#include <string.h>
#include <errno.h>
diff --git a/jim-exec.c b/jim-exec.c
index 19b5128..6690c75 100644
--- a/jim-exec.c
+++ b/jim-exec.c
@@ -20,7 +20,9 @@
* express or implied warranty.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <string.h>
#include <ctype.h>
diff --git a/jim.c b/jim.c
index 3c52f74..bf98eb9 100644
--- a/jim.c
+++ b/jim.c
@@ -41,7 +41,9 @@
* official policies, either expressed or implied, of the Jim Tcl Project.
**/
#define JIM_OPTIMIZATION /* comment to avoid optimizations and reduce size */
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* Mostly just for environ */
+#endif
#include <stdio.h>
#include <stdlib.h>