summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/ast.c4
-rw-r--r--src/draw.c3
-rw-r--r--src/main.c4
-rw-r--r--src/parser.y4
-rw-r--r--src/symbol-table.c4
6 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f25a3fa..d6c1942 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,10 @@ AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_SILENT_RULES([yes])
+# We need POSIX functions
+AC_DEFINE([_POSIX_C_SOURCE], [200809L], [Enable POSIX.1-2008 support])
+AC_DEFINE([_XOPEN_SOURCE], [700], [Enable X/OPEN system interfaces])
+
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_STDC
diff --git a/src/ast.c b/src/ast.c
index 7c35744..7d70a68 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/draw.c b/src/draw.c
index 82ef484..0ecc592 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -1,4 +1,7 @@
/* 2015/10 functions to support printGV() */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include "ast.h"
#include <assert.h>
diff --git a/src/main.c b/src/main.c
index 4b46032..e7ed754 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include "ast.h"
diff --git a/src/parser.y b/src/parser.y
index 1b164ca..128788d 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -1,4 +1,8 @@
%{
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/symbol-table.c b/src/symbol-table.c
index 090bdbe..2e18839 100644
--- a/src/symbol-table.c
+++ b/src/symbol-table.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>