]> granicus.if.org Git - php/commitdiff
MFB: remove HAVE_CONFIG_H
authorNuno Lopes <nlopess@php.net>
Tue, 11 Sep 2007 16:19:14 +0000 (16:19 +0000)
committerNuno Lopes <nlopess@php.net>
Tue, 11 Sep 2007 16:19:14 +0000 (16:19 +0000)
25 files changed:
ext/pcre/config.w32
ext/pcre/config0.m4
ext/pcre/pcrelib/dftables.c
ext/pcre/pcrelib/pcre_chartables.c
ext/pcre/pcrelib/pcre_compile.c
ext/pcre/pcrelib/pcre_config.c
ext/pcre/pcrelib/pcre_exec.c
ext/pcre/pcrelib/pcre_fullinfo.c
ext/pcre/pcrelib/pcre_get.c
ext/pcre/pcrelib/pcre_globals.c
ext/pcre/pcrelib/pcre_info.c
ext/pcre/pcrelib/pcre_maketables.c
ext/pcre/pcrelib/pcre_newline.c
ext/pcre/pcrelib/pcre_ord2utf8.c
ext/pcre/pcrelib/pcre_refcount.c
ext/pcre/pcrelib/pcre_study.c
ext/pcre/pcrelib/pcre_tables.c
ext/pcre/pcrelib/pcre_try_flipped.c
ext/pcre/pcrelib/pcre_ucp_searchfuncs.c
ext/pcre/pcrelib/pcre_valid_utf8.c
ext/pcre/pcrelib/pcre_version.c
ext/pcre/pcrelib/pcre_xclass.c
ext/pcre/pcrelib/pcregrep.c
ext/pcre/pcrelib/pcreposix.c
ext/pcre/upgrade-pcre.php

index 9cd11ce3e1fdf1696462d0d370b3f42b78594e8c..b52aa71236245a96db75ca24c4500cd97b625388 100644 (file)
@@ -5,7 +5,7 @@ ARG_WITH("pcre-regex", "Perl Compatible Regular Expressions", "yes");
 
 if (PHP_PCRE_REGEX == "yes") {
        EXTENSION("pcre", "php_pcre.c", PHP_PCRE_REGEX_SHARED,
-               "-DNO_RECURSE -DHAVE_CONFIG_H -Iext/pcre/pcrelib");
+               "-DNO_RECURSE -Iext/pcre/pcrelib");
        ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucp_searchfuncs.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre");
        ADD_DEF_FILE("ext\\pcre\\php_pcre.def");
 
index 73eb1325779fea33906420ba149205bc6f4f39b0..ebd7850d0baafdc74d3f681e4aa2082561c5b56e 100644 (file)
@@ -11,7 +11,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support,
 
 if test "$PHP_PCRE_REGEX" != "no"; then
   if test "$PHP_PCRE_REGEX" = "yes"; then
-    PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_ucp_searchfuncs.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib)
+    PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_ucp_searchfuncs.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-I@ext_srcdir@/pcrelib)
     PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
     PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
        PHP_ADD_INCLUDE(pcrelib)
index eb9a1a4b7d9e149870226aac336640d95324f854..cf3b21052fb7392fccb30f77c15f4e2232e0ccf8 100644 (file)
@@ -43,9 +43,7 @@ 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>
index 3d6a4fff9c9204d0215c691def45a7b172936d9f..bec2d0c046e6b217466c026d55269e8e57c1815e 100644 (file)
@@ -20,9 +20,7 @@ and dead code stripping is activated. This leads to link errors. Pulling in the
 header ensures that the array gets flagged as "someone outside this compilation
 unit might reference this" and so it will always be supplied to the linker. */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 8361e148bb48a973222db40aa3e89d53cfd4bdc9..77ec51caceaa2352325471a462bf132f04f9214b 100644 (file)
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 supporting internal functions that are not used by other modules. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #define NLBLOCK cd             /* Block containing newline information */
 #define PSSTART start_pattern  /* Field containing processed string start */
index ea0e317db8fa7c01ad7ae15efe0ab65ffe0f1d23..700a5d2918b1ad362d1298e6e8fbf2ec81bfcdc8 100644 (file)
@@ -41,9 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
 /* This module contains the external function pcre_config(). */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index bd650e9b184c29285b59b561a54cda4918e1b55a..1c570a03bd2761f27eda31cfeffc8d199eae8057 100644 (file)
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 pattern matching using an NFA algorithm, trying to mimic Perl as closely as
 possible. There are also some static supporting functions. */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #define NLBLOCK md             /* Block containing newline information */
 #define PSSTART start_subject  /* Field containing processed string start */
index b082473351cc67083ea090c55856be8e2b06e107..1554292e660e83b77e03d38739b0c1ce34d2b268 100644 (file)
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 information about a compiled pattern. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 64a195e9406bdce0ebcdd89f266298d7be6c7069..898f051e892e785643ae3c599490d27c147f11c9 100644 (file)
@@ -43,9 +43,7 @@ from the subject string after a regex match has succeeded. The original idea
 for these functions came from Scott Wimer. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 41b89dd75c9958270a6849db1b8afb4e6e9fe870..a56f13aa2f40c69b1a8339b27910bf80f0c5b2d8 100644 (file)
@@ -46,9 +46,7 @@ indirection. These values can be changed by the caller, but are shared between
 all threads. However, when compiling for Virtual Pascal, things are done
 differently, and global variables are not used (see pcre.in). */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index c40eb7c37554dc283d62d6459e5bbb93c51edc3e..6970e7953f189ecfcbe012d24b67e1d102135d69 100644 (file)
@@ -43,9 +43,7 @@ information about a compiled pattern. However, use of this function is now
 deprecated, as it has been superseded by pcre_fullinfo(). */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 1e6381aa347ee1740c39f8342dd73bbfde640908..cba42260ce6b512c9d47bd57021125532bb268ef 100644 (file)
@@ -45,9 +45,7 @@ compilation of dftables.c, in which case the macro DFTABLES is defined. */
 
 
 #ifndef DFTABLES
-#  ifdef HAVE_CONFIG_H
 #  include <config.h>
-#  endif
 #  include "pcre_internal.h"
 #endif
 
index db02a8cf205df169e9caa50a89ab1d912ed8f3cd..9725c723da1d7d1948e3b23faed271dd1d137041 100644 (file)
@@ -47,9 +47,7 @@ and NLTYPE_ANY. The full list of Unicode newline characters is taken from
 http://unicode.org/unicode/reports/tr18/. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 7552034e44399dedab7deda5d7e462f7a0a5100e..ebb8a9d483d469de409a86af55814510f32920cd 100644 (file)
@@ -41,9 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
 /* This file contains a private PCRE function that converts an ordinal
 character value into a UTF8 string. */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index b6a464ce81ce37ee6a2926763f9e54b9e7640c16..7d3b7981c449152bb88bc34bd274457060fc7f9b 100644 (file)
@@ -44,9 +44,7 @@ pattern data block. This might be helpful in applications where the block is
 shared by different users. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 6a6c314b02af85267712d5aaf20a26df29b40faa..8c82d1ce61a58732ba68ae1cd0ed234ae9a3aaca 100644 (file)
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 supporting functions. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 7d79eff205a582543307280f7cb9b71952d9b9f7..95d166975f8c76738949bcf2d612a70fed6f696d 100644 (file)
@@ -44,9 +44,7 @@ uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
 clashes with the library. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 4f9891853842e1121f698eba29af9ddf2727576d..cd7d21eccc531a12eb58bdc0b8f8366118be9c00 100644 (file)
@@ -43,9 +43,7 @@ see if it was compiled with the opposite endianness. If so, it uses an
 auxiliary local function to flip the appropriate bytes. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index d3edc2d71bed550a4bf3608976b30efdbf572aef..95d42cf7cdae2312e6ea19beac3928e175de547a 100644 (file)
@@ -41,9 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
 /* This module contains code for searching the table of Unicode character
 properties. */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 0486ea381f42141edf0e30d8d06caa4c9ed97aad..223e74085737c112f8191a919f73fdc7daf99426 100644 (file)
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 strings. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index e1ab4d4107cc9c6b896bb0d80c3591e17801a2fa..865453d9bc98b604dcac38615cc7b77f77a17bb4 100644 (file)
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 string that identifies the PCRE version that is in use. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 502e718bf45c4e57ddfd246e7760028e46f6e0f3..db5331b638d4be52b75184264b799fdc1d5efbbc 100644 (file)
@@ -43,9 +43,7 @@ class (one that contains characters whose values are > 255). It is used by both
 pcre_exec() and pcre_def_exec(). */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "pcre_internal.h"
 
index 36b618a8c4fd3cb4ff5be23a222396c203451df3..29338d159954a9748f7354d5d48b2500b1b79c9c 100644 (file)
@@ -37,9 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <ctype.h>
 #include <locale.h>
index 83263deaab8c6c8242bb60b22e1fc7ee235a7130..9c0adebb96229aa06e558b0dcdfe5b1ac04f1ec6 100644 (file)
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 functions. */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 
 /* Ensure that the PCREPOSIX_EXP_xxx macros are set appropriately for
index 2f7202e0fb6a4251714262e5058fb0bf72a6e951..dd0a8a783a1a11d7b3a77141a65242047a639c5d 100644 (file)
@@ -33,10 +33,13 @@ function recurse($path)
 {
        global $newpcre, $dirlen;
 
-       foreach(scandir($path) as $file) {
+       foreach (scandir($path) as $file) {
 
-               if ($file[0] === '.' || $file === 'CVS') continue;
-               if (substr_compare($file, '.lo', -3, 3) == 0 || substr_compare($file, '.o', -2, 2) == 0) continue;
+               if ($file[0] === '.' ||
+               $file === 'CVS' ||
+               substr_compare($file, '.lo', -3, 3) == 0 ||
+               substr_compare($file, '.loT', -4, 4) == 0 ||
+               substr_compare($file, '.o', -2, 2) == 0) continue;
 
                $file = "$path/$file";
 
@@ -58,7 +61,19 @@ function recurse($path)
                        die("$newfile is not available any more\n");
                }
 
-               copy($newfile, $file);
+               // maintain file mtimes so that cvs doesnt get crazy
+               if (file_get_contents($newfile) !== file_get_contents($file)) {
+                       copy($newfile, $file);
+               }
+
+               // always include the config.h file
+               $content    = file_get_contents($newfile);
+               $newcontent = preg_replace('/#\s*ifdef HAVE_CONFIG_H\s*(.+)\s*#\s*endif/', '$1', $content);
+
+               if ($content !== $newcontent) {
+                       file_put_contents($file, $newcontent);
+               }
+
                echo "OK\n";
        }