summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/dftables.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/dftables.c')
-rw-r--r--ext/pcre/pcrelib/dftables.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/dftables.c b/ext/pcre/pcrelib/dftables.c
index 763ac8c64f..1fdc8e0f23 100644
--- a/ext/pcre/pcrelib/dftables.c
+++ b/ext/pcre/pcrelib/dftables.c
@@ -43,7 +43,9 @@ character tables for PCRE. The tables are built according to the current
locale. Now that pcre_maketables is a function visible to the outside world, we
make use of its code from here in order to be consistent. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <ctype.h>
#include <stdio.h>
@@ -106,11 +108,24 @@ fprintf(f,
"library and dead code stripping is activated. This leads to link errors.\n"
"Pulling in the header ensures that the array gets flagged as \"someone\n"
"outside this compilation unit might reference this\" and so it will always\n"
- "be supplied to the linker. */\n\n"
+ "be supplied to the linker. */\n\n");
+
+/* Force config.h in z/OS */
+
+#if defined NATIVE_ZOS
+fprintf(f,
+ "/* For z/OS, config.h is forced */\n"
+ "#ifndef HAVE_CONFIG_H\n"
+ "#define HAVE_CONFIG_H 1\n"
+ "#endif\n\n");
+#endif
+
+fprintf(f,
"#ifdef HAVE_CONFIG_H\n"
"#include \"config.h\"\n"
"#endif\n\n"
"#include \"pcre_internal.h\"\n\n");
+
fprintf(f,
"const pcre_uint8 PRIV(default_tables)[] = {\n\n"
"/* This table is a lower casing table. */\n\n");