diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2015-11-13 16:49:49 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2015-11-13 16:49:49 +0800 |
commit | 274227ed441e941cbc07e3ba90497dbf73db5684 (patch) | |
tree | 92990074f19cb6d71447248aa1333ca03edc8a93 | |
parent | 5017c802e8aeda0d61715d2566f6a866311b63e3 (diff) | |
download | compiler2015-274227ed441e941cbc07e3ba90497dbf73db5684.tar.gz compiler2015-274227ed441e941cbc07e3ba90497dbf73db5684.tar.zst compiler2015-274227ed441e941cbc07e3ba90497dbf73db5684.zip |
Enable POSIX extensions
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/ast.c | 4 | ||||
-rw-r--r-- | src/draw.c | 3 | ||||
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/parser.y | 4 | ||||
-rw-r--r-- | src/symbol-table.c | 4 |
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 @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -1,4 +1,7 @@ /* 2015/10 functions to support printGV() */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "ast.h" #include <assert.h> @@ -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> |