]> granicus.if.org Git - php/commitdiff
fix zts build
authorWez Furlong <wez@php.net>
Fri, 5 Dec 2003 03:14:54 +0000 (03:14 +0000)
committerWez Furlong <wez@php.net>
Fri, 5 Dec 2003 03:14:54 +0000 (03:14 +0000)
ext/iconv/config.w32
ext/iconv/iconv.c

index 067707558a60508808b79109b4d6410ad47ee9aa..c7e15e469a1fe530c1294ad9c688d48f38befc19 100644 (file)
@@ -3,13 +3,14 @@
 
 ARG_WITH("iconv", "iconv support", "no");
 
-if (PHP_ICONV == "yes") {
-       EXTENSION("iconv", "iconv.c");
-       AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled");
-       AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
-       AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");
-       AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not");
-       CHECK_LIB("iconv.lib", "iconv");
-       CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS");
+if (PHP_ICONV != "no") {
+       if (CHECK_LIB("iconv.lib", "iconv", PHP_ICONV) && CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_ICONV", PHP_ICONV)) {
+               EXTENSION("iconv", "iconv.c");
+               
+               AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled");
+               AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
+               AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");
+               AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not");
+       }
 }
 
index 9cc55bbe604f99b509bc961e4096bda75f829f59..8be5596e9a4adc6e0930194e90d6e06bcec24bf1 100644 (file)
@@ -148,8 +148,8 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
 
 static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *str, size_t str_nbytes, const char *enc, const char **next_pos, int mode);
 
-static php_iconv_err_t php_iconv_stream_filter_register_factory();
-static php_iconv_err_t php_iconv_stream_filter_unregister_factory();
+static php_iconv_err_t php_iconv_stream_filter_register_factory(TSRMLS_D);
+static php_iconv_err_t php_iconv_stream_filter_unregister_factory(TSRMLS_D);
 /* }}} */
 
 /* {{{ static globals */
@@ -207,7 +207,7 @@ PHP_MINIT_FUNCTION(miconv)
        REGISTER_LONG_CONSTANT("ICONV_MIME_DECODE_STRICT", PHP_ICONV_MIME_DECODE_STRICT, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("ICONV_MIME_DECODE_CONTINUE_ON_ERROR", PHP_ICONV_MIME_DECODE_CONTINUE_ON_ERROR, CONST_CS | CONST_PERSISTENT);
 
-       if (php_iconv_stream_filter_register_factory() != PHP_ICONV_ERR_SUCCESS) {
+       if (php_iconv_stream_filter_register_factory(TSRMLS_C) != PHP_ICONV_ERR_SUCCESS) {
                return FAILURE;
        }
 
@@ -218,7 +218,7 @@ PHP_MINIT_FUNCTION(miconv)
 /* {{{ PHP_MSHUTDOWN_FUNCTION */
 PHP_MSHUTDOWN_FUNCTION(miconv)
 {
-       php_iconv_stream_filter_unregister_factory();
+       php_iconv_stream_filter_unregister_factory(TSRMLS_C);
        UNREGISTER_INI_ENTRIES();
        return SUCCESS;
 }
@@ -2523,7 +2523,7 @@ static php_stream_filter *php_iconv_stream_filter_factory_create(const char *nam
 /* }}} */
 
 /* {{{ php_iconv_stream_register_factory */
-static php_iconv_err_t php_iconv_stream_filter_register_factory()
+static php_iconv_err_t php_iconv_stream_filter_register_factory(TSRMLS_D)
 {
        static php_stream_filter_factory filter_factory = {
                php_iconv_stream_filter_factory_create
@@ -2539,7 +2539,7 @@ static php_iconv_err_t php_iconv_stream_filter_register_factory()
 /* }}} */
 
 /* {{{ php_iconv_stream_unregister_factory */
-static php_iconv_err_t php_iconv_stream_filter_unregister_factory()
+static php_iconv_err_t php_iconv_stream_filter_unregister_factory(TSRMLS_D)
 {
        if (FAILURE == php_stream_filter_unregister_factory(
                                php_iconv_stream_filter_ops.label TSRMLS_CC)) {