[Pcre-svn] [1027] code/trunk: Small patches for the z/OS por…

Góra strony
Delete this message
Autor: Subversion repository
Data:  
Dla: pcre-svn
Temat: [Pcre-svn] [1027] code/trunk: Small patches for the z/OS port that don' t affect other OS.
Revision: 1027
          http://vcs.pcre.org/viewvc?view=rev&revision=1027
Author:   ph10
Date:     2012-09-03 15:01:38 +0100 (Mon, 03 Sep 2012)


Log Message:
-----------
Small patches for the z/OS port that don't affect other OS.

Modified Paths:
--------------
    code/trunk/dftables.c
    code/trunk/pcretest.c


Modified: code/trunk/dftables.c
===================================================================
--- code/trunk/dftables.c    2012-08-31 09:11:54 UTC (rev 1026)
+++ code/trunk/dftables.c    2012-09-03 14:01:38 UTC (rev 1027)
@@ -108,11 +108,24 @@
   "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");


Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c    2012-08-31 09:11:54 UTC (rev 1026)
+++ code/trunk/pcretest.c    2012-09-03 14:01:38 UTC (rev 1027)
@@ -112,9 +112,14 @@
 #else
 #include <sys/time.h>          /* These two includes are needed */
 #include <sys/resource.h>      /* for setrlimit(). */
+#if defined NATIVE_ZOS         /* z/OS uses non-binary I/O */
+#define INPUT_MODE   "r"
+#define OUTPUT_MODE  "w"
+#else
 #define INPUT_MODE   "rb"
 #define OUTPUT_MODE  "wb"
 #endif
+#endif


#define PRIV(name) name

@@ -2336,7 +2341,7 @@
       ((stack_size = get_value((pcre_uint8 *)argv[op+1], &endptr)),
         *endptr == 0))
     {
-#if defined(_WIN32) || defined(WIN32) || defined(__minix)
+#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS)
     printf("PCRE: -S not supported on this OS\n");
     exit(1);
 #else