]> granicus.if.org Git - php/commitdiff
Fixed compile failures when ZLIB / PCRE are compiled as shared
authorfoobar <sniper@php.net>
Sun, 9 Feb 2003 19:09:52 +0000 (19:09 +0000)
committerfoobar <sniper@php.net>
Sun, 9 Feb 2003 19:09:52 +0000 (19:09 +0000)
extensions in same build.

ext/mime_magic/mime_magic.c
ext/standard/aggregation.c
ext/standard/basic_functions.c
ext/standard/image.c
main/SAPI.c
main/output.c

index cd4914a04018afab599aef5ce5d451a0f551a42e..7df87f1f6ff8d5d9a2fc25091a90a20f9624d8fb 100644 (file)
@@ -192,7 +192,7 @@ static long from_oct(int, char *);
 static int fsmagic(char *fn TSRMLS_DC);
 
 
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 static int zmagic(unsigned char *, int);
 #endif
 
@@ -1057,7 +1057,7 @@ static void tryit(unsigned char *buf, int nb, int checkzmagic)
     /*
      * Try compression stuff
      */
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
        if (checkzmagic == 1) {  
                if (zmagic(buf, nb) == 1)
                        return;
@@ -1606,7 +1606,7 @@ static int mcheck(union VALUETYPE *p, struct magic *m)
     return matched;
 }
 
-#if HAVE_ZLIB 
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 /*
  * compress routines: zmagic() - returns 0 if not recognized, uncompresses
  * and prints information if recognized uncompress(s, method, old, n, newch)
index 780d8626787cf5c830e404ba47b3df53e4a1f975..d78d55a98e1d13ed1df24aee18b9d7c5947dd778 100644 (file)
@@ -524,7 +524,7 @@ PHP_FUNCTION(aggregate_properties_by_list)
 }
 /* }}} */
 
-#if HAVE_PCRE || HAVE_BUNDLED_PCRE
+#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
 /* {{{ proto void aggregate_methods_by_regexp(object obj, string class, string regexp [, bool exclude])
    */
 PHP_FUNCTION(aggregate_methods_by_regexp)
index 4481a2f42f34c777e84141d9f9ded75eeac64a96..dd743bd79d82b04c6ea0e13e88b1c3e1110d508b 100644 (file)
@@ -886,7 +886,7 @@ function_entry basic_functions[] = {
        PHP_FE(aggregate_methods_by_list,               first_arg_force_ref)
        PHP_FE(aggregate_properties,                    first_arg_force_ref)
        PHP_FE(aggregate_properties_by_list,    first_arg_force_ref)
-#if HAVE_PCRE || HAVE_BUNDLED_PCRE
+#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
        PHP_FE(aggregate_methods_by_regexp,             first_arg_force_ref)
        PHP_FE(aggregate_properties_by_regexp,  first_arg_force_ref)
 #endif
index a5a5d7c53ccc0ae6cd0a75a30520b249413a45d0..82a323e3f48c89ff58c0f8ff32be64ed88a80550 100644 (file)
@@ -34,7 +34,7 @@
 #endif
 #include "php_image.h"
 
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 #include "zlib.h"
 #endif
 
@@ -83,7 +83,7 @@ PHP_MINIT_FUNCTION(imagetypes)
        REGISTER_LONG_CONSTANT("IMAGETYPE_JP2",     IMAGE_FILETYPE_JP2,     CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("IMAGETYPE_JPX",     IMAGE_FILETYPE_JPX,     CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("IMAGETYPE_JB2",     IMAGE_FILETYPE_JB2,     CONST_CS | CONST_PERSISTENT);
-#if HAVE_ZLIB  
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
        REGISTER_LONG_CONSTANT("IMAGETYPE_SWC",     IMAGE_FILETYPE_SWC,     CONST_CS | CONST_PERSISTENT);
 #endif 
        REGISTER_LONG_CONSTANT("IMAGETYPE_IFF",     IMAGE_FILETYPE_IFF,     CONST_CS | CONST_PERSISTENT);
@@ -176,7 +176,7 @@ static unsigned long int php_swf_get_bits (unsigned char* buffer, unsigned int p
 }
 /* }}} */
 
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 /* {{{ php_handle_swc
  */
 static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC)
@@ -1212,7 +1212,7 @@ PHP_FUNCTION(getimagesize)
                case IMAGE_FILETYPE_SWF:
                        result = php_handle_swf(stream TSRMLS_CC);
                        break;
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
                case IMAGE_FILETYPE_SWC:
                        result = php_handle_swc(stream TSRMLS_CC);
                        break;
index d23ec9a4ef43b8c6ddb09169e279d702f3f0f9c9..ed0b0a21f56091ec9fc8ff66d26673ccdbe7a387 100644 (file)
@@ -30,7 +30,7 @@
 #if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
 #include "ext/pcre/php_pcre.h"
 #endif
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 #include "ext/zlib/php_zlib.h"
 ZEND_EXTERN_MODULE_GLOBALS(zlib)
 #endif
@@ -556,7 +556,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
                                while (*ptr == ' ' && *ptr != '\0') {
                                        ptr++;
                                }
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
                                if(!strncmp(ptr, "image/", sizeof("image/")-1)) {
                                        ZLIBG(output_compression) = 0;
                                }
@@ -704,7 +704,7 @@ SAPI_API int sapi_send_headers(TSRMLS_D)
                return SUCCESS;
        }
 
-#if HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
        /* Add output compression headers at this late stage in order to make
           it possible to switch it off inside the script. */
        if (ZLIBG(output_compression)) {
index e0cb32974c9a4ec2b3b7c4857a017652f7afef36..de5b9faaec2ef09e05a520728dc32fa1d0b7e0f8 100644 (file)
@@ -24,7 +24,7 @@
 #include "ext/standard/head.h"
 #include "ext/standard/basic_functions.h"
 #include "ext/standard/url_scanner_ex.h"
-#ifdef HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 #include "ext/zlib/php_zlib.h"
 #endif
 #include "SAPI.h"
@@ -408,7 +408,7 @@ PHPAPI int php_ob_init_conflict(char *handler_new, char *handler_set TSRMLS_DC)
 static int php_ob_init_named(uint initial_size, uint block_size, char *handler_name, zval *output_handler, uint chunk_size, zend_bool erase TSRMLS_DC)
 {
        if (OG(ob_nesting_level)>0) {
-#ifdef HAVE_ZLIB
+#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
                if (!strncmp(handler_name, "ob_gzhandler", sizeof("ob_gzhandler")) && php_ob_gzhandler_check(TSRMLS_C)) {
                        return FAILURE;
                }