]> granicus.if.org Git - php/commitdiff
- fix CGI build (at least)
authorSascha Schumann <sas@php.net>
Thu, 27 May 1999 01:34:18 +0000 (01:34 +0000)
committerSascha Schumann <sas@php.net>
Thu, 27 May 1999 01:34:18 +0000 (01:34 +0000)
configure.in.in
ext/pcre/Makefile.am
ext/pcre/config.m4
ext/pcre/config0.m4
ext/pcre/pcrelib/Makefile [deleted file]
ext/pcre/pcrelib/Makefile.am [new file with mode: 0644]
ext/xml/xml.c

index 29b474ef8bd4bde10a43fa11b564b62438bd1f5f..40c8c5b49c6f02f16ce72bb540dc7e5677b01291 100644 (file)
@@ -875,6 +875,7 @@ AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS")
 
 AC_OUTPUT(Makefile libphp4.module
           scripts/mkextlib regex/Makefile ext/Makefile
+                 ext/pcre/pcrelib/Makefile
           @@EXT_MAKEFILES@@ build-defs.h, [
 ], [
 
index 0c054fb168d13acdc494456e165d9c40e61b9f0c..e3295645323f074ab81a6bae3b3d48da7a627b64 100644 (file)
@@ -1,7 +1,6 @@
 # $Id$
 
-INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend @PCRE_INCLUDE@
-LIBS=@LIBS@ @PCRE_LIB@
+INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
 noinst_LIBRARIES=libphpext_pcre.a
 libphpext_pcre_a_SOURCES=pcre.c
 SUBDIRS=@PCRE_SUBDIR@
index 588c9f488119e88b4c89a41d93e041d98e87cf58..ebeb82e2b0a4d47b6423e6d5271c18f4fa9293d6 100644 (file)
@@ -11,15 +11,15 @@ AC_ARG_WITH(pcre-regex,
     no)
        AC_MSG_RESULT(no) ;;
     yes)
-       PCRE_LIB="-Lpcrelib -lpcre"
-       PCRE_INCLUDE="-Ipcrelib"
+        EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
+       INCLUDES="-Ipcrelib $INCLUDES"
         PCRE_SUBDIR="pcrelib"
        AC_DEFINE(HAVE_LIBPCRE, 1)
        AC_MSG_RESULT(yes)
        PHP_EXTENSION(pcre) ;;
     *)
-        test -f $withval/pcre.h && PCRE_INCLUDE="-I$withval"
-        test -f $withval/libpcre.a && PCRE_LIB="-L$withval -lpcre"
+        test -f $withval/pcre.h && INCLUDES="-I$withval $INCLUDES"
+        test -f $withval/libpcre.a && EXTRA_LIBS="-L$withval -lpcre $EXTRA_LIBS"
        
         if test -n "$PCRE_INCLUDE" && test -n "$PCRE_LIB" ; then
           AC_DEFINE(HAVE_LIBPCRE, 1)
@@ -31,13 +31,11 @@ AC_ARG_WITH(pcre-regex,
         fi ;;
   esac
 ],[
-  PCRE_LIB="-Lpcrelib -lpcre"
-  PCRE_INCLUDE="-Ipcrelib"
+  EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
+  INCLUDES="-Ipcrelib $INCLUDES"
   PCRE_SUBDIR="pcrelib"
   AC_DEFINE(HAVE_LIBPCRE, 1)
   AC_MSG_RESULT(yes)
   PHP_EXTENSION(pcre)
 ]) 
-AC_SUBST(PCRE_LIB)
-AC_SUBST(PCRE_INCLUDE)
 AC_SUBST(PCRE_SUBDIR)
index 588c9f488119e88b4c89a41d93e041d98e87cf58..ebeb82e2b0a4d47b6423e6d5271c18f4fa9293d6 100644 (file)
@@ -11,15 +11,15 @@ AC_ARG_WITH(pcre-regex,
     no)
        AC_MSG_RESULT(no) ;;
     yes)
-       PCRE_LIB="-Lpcrelib -lpcre"
-       PCRE_INCLUDE="-Ipcrelib"
+        EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
+       INCLUDES="-Ipcrelib $INCLUDES"
         PCRE_SUBDIR="pcrelib"
        AC_DEFINE(HAVE_LIBPCRE, 1)
        AC_MSG_RESULT(yes)
        PHP_EXTENSION(pcre) ;;
     *)
-        test -f $withval/pcre.h && PCRE_INCLUDE="-I$withval"
-        test -f $withval/libpcre.a && PCRE_LIB="-L$withval -lpcre"
+        test -f $withval/pcre.h && INCLUDES="-I$withval $INCLUDES"
+        test -f $withval/libpcre.a && EXTRA_LIBS="-L$withval -lpcre $EXTRA_LIBS"
        
         if test -n "$PCRE_INCLUDE" && test -n "$PCRE_LIB" ; then
           AC_DEFINE(HAVE_LIBPCRE, 1)
@@ -31,13 +31,11 @@ AC_ARG_WITH(pcre-regex,
         fi ;;
   esac
 ],[
-  PCRE_LIB="-Lpcrelib -lpcre"
-  PCRE_INCLUDE="-Ipcrelib"
+  EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
+  INCLUDES="-Ipcrelib $INCLUDES"
   PCRE_SUBDIR="pcrelib"
   AC_DEFINE(HAVE_LIBPCRE, 1)
   AC_MSG_RESULT(yes)
   PHP_EXTENSION(pcre)
 ]) 
-AC_SUBST(PCRE_LIB)
-AC_SUBST(PCRE_INCLUDE)
 AC_SUBST(PCRE_SUBDIR)
diff --git a/ext/pcre/pcrelib/Makefile b/ext/pcre/pcrelib/Makefile
deleted file mode 100644 (file)
index 2da3012..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-# Make file for PCRE (Perl-Compatible Regular Expression) library.
-
-# Edit CC, CFLAGS, and RANLIB for your system.
-
-# It is believed that RANLIB=ranlib is required for AIX, BSDI, FreeBSD, Linux,
-# MIPS RISCOS, NetBSD, OpenBSD, Digital Unix, and Ultrix.
-
-# Use CFLAGS = -DUSE_BCOPY on SunOS4 and any other system that lacks the
-# memmove() function, but has bcopy().
-
-# Use CFLAGS = -DSTRERROR_FROM_ERRLIST on SunOS4 and any other system that
-# lacks the strerror() function, but can provide the equivalent by indexing
-# into errlist.
-
-AR = ar cq
-CC = gcc -O2 -Wall
-CFLAGS =
-RANLIB = @true
-
-##########################################################################
-
-OBJ = maketables.o get.o study.o pcre.o
-
-all:            libpcre.a libpcreposix.a pcretest pgrep
-
-pgrep:          libpcre.a pgrep.o
-               $(CC) $(CFLAGS) -o pgrep pgrep.o libpcre.a
-
-pcretest:       libpcre.a libpcreposix.a pcretest.o
-               $(PURIFY) $(CC) $(CFLAGS) -o pcretest pcretest.o libpcre.a libpcreposix.a
-
-libpcre.a:      $(OBJ)
-               -rm -f libpcre.a
-               $(AR) libpcre.a $(OBJ)
-               $(RANLIB) libpcre.a
-
-libpcreposix.a: pcreposix.o
-               -rm -f libpcreposix.a
-               $(AR) libpcreposix.a pcreposix.o
-               $(RANLIB) libpcreposix.a
-
-pcre.o:         chartables.c pcre.c pcre.h internal.h Makefile
-               $(CC) -c $(CFLAGS) pcre.c
-
-pcreposix.o:    pcreposix.c pcreposix.h internal.h pcre.h Makefile
-               $(CC) -c $(CFLAGS) pcreposix.c
-
-maketables.o:   maketables.c pcre.h internal.h Makefile
-               $(CC) -c $(CFLAGS) maketables.c
-
-get.o:          get.c pcre.h internal.h Makefile
-               $(CC) -c $(CFLAGS) get.c
-
-study.o:        study.c pcre.h internal.h Makefile
-               $(CC) -c $(CFLAGS) study.c
-
-pcretest.o:     pcretest.c pcre.h Makefile
-               $(CC) -c $(CFLAGS) pcretest.c
-
-pgrep.o:        pgrep.c pcre.h Makefile
-               $(CC) -c $(CFLAGS) pgrep.c
-
-# An auxiliary program makes the default character table source
-
-chartables.c:   dftables
-               ./dftables >chartables.c
-
-dftables:       dftables.c maketables.c pcre.h internal.h Makefile
-               $(CC) -o dftables $(CFLAGS) dftables.c
-
-# We deliberately omit dftables and chartables.c from 'make clean'; once made
-# chartables.c shouldn't change, and if people have edited the tables by hand,
-# you don't want to throw them away.
-
-clean:;         -rm -f *.o *.a pcretest pgrep
-
-runtest:        all
-               ./RunTest
-
-# End
diff --git a/ext/pcre/pcrelib/Makefile.am b/ext/pcre/pcrelib/Makefile.am
new file mode 100644 (file)
index 0000000..8f7cad1
--- /dev/null
@@ -0,0 +1,2 @@
+noinst_LIBRARIES = libpcre.a
+libpcre_a_SOURCES = maketables.c get.c study.c pcre.c
index be4fe3b11019cbc9b559ba6e83cf0d514d1f35bc..29d5d96fa750c4bb7e532807c9e73ed3de83b965 100644 (file)
@@ -363,7 +363,8 @@ xml_set_handler(char **nameBufp, pval *data)
                if (*nameBufp != NULL) {
                        efree(*nameBufp);
                }
-               *nameBufp = php3i_pval_strdup(data);
+               convert_to_string(data);
+               *nameBufp = estrndup(data->value.str.val, data->value.str.len);
        } else {
                if (*nameBufp != NULL) {
                        efree(*nameBufp);
@@ -378,18 +379,18 @@ xml_set_handler(char **nameBufp, pval *data)
 static pval *
 xml_call_handler(xml_parser *parser, char *funcName, int argc, pval **argv)
 {
+       ELS_FETCH();
+
        if (parser && funcName) {
                pval *retval, *func;
                int i;
-               HashTable *function_table;
 
                func = php3i_string_pval(funcName);
                retval = emalloc(sizeof(pval));
                /* We cannot call internal variables from a function module as
                   it breaks any chance of compiling it as a module on windows.
                   Instead, we create a callback function. */
-               function_table=php3i_get_function_table();
-               if (call_user_function(function_table, NULL, func, retval, argc, argv) == FAILURE) {
+               if (call_user_function(EG(function_table), NULL, func, retval, argc, argv) == FAILURE) {
                        php3tls_pval_destructor(retval);
                        efree(retval);
                        return NULL;