summaryrefslogtreecommitdiff
path: root/support/regex.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-12-25 22:27:35 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-12-25 22:27:35 +0200
commit913d3b4ef271d7d1e51901491ace857379a97340 (patch)
treefe69d63f462cb93a9f1c391ffaa434c0dd0aa8f0 /support/regex.c
parented770e303639529c2dcf9f44cb5260c8bae8d993 (diff)
downloadgawk-gnulib-regex-again.tar.gz
Try gnulib regex + fixes.gnulib-regex-again
Diffstat (limited to 'support/regex.c')
-rw-r--r--support/regex.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/support/regex.c b/support/regex.c
index d6591e86..c8debb3a 100644
--- a/support/regex.c
+++ b/support/regex.c
@@ -18,8 +18,6 @@
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
-# include <config.h>
-
# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# endif
@@ -64,7 +62,14 @@
#undefs RE_DUP_MAX and sets it to the right value. */
#include <limits.h>
-#include <regex.h>
+#ifndef _LIBC
+# define _GNU_SOURCE 1
+# include <regex.h>
+# undef _GNU_SOURCE
+# undef __USE_GNU
+#else
+# include <regex.h>
+#endif
#include "regex_internal.h"
#include "regex_internal.c"