From: Zeev Suraski Date: Mon, 5 Feb 2001 21:59:17 +0000 (+0000) Subject: Fix Windows build X-Git-Tag: php-4.0.5RC1~354 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf84618244ec08a96b79594a35c496e431cbe909;p=php Fix Windows build --- diff --git a/ext/com/VARIANT.c b/ext/com/VARIANT.c index 352c0674dd..c923b507de 100644 --- a/ext/com/VARIANT.c +++ b/ext/com/VARIANT.c @@ -30,6 +30,7 @@ #include "php_ini.h" #include "php_typedef_VARIANT.h" #include "conversion.h" +#include "ext/standard/info.h" #include @@ -48,6 +49,7 @@ function_entry VARIANT_functions[] = { {NULL, NULL, NULL} }; + static PHP_MINFO_FUNCTION(VARIANT) { php_info_print_table_start(); @@ -55,10 +57,12 @@ static PHP_MINFO_FUNCTION(VARIANT) php_info_print_table_end(); } + zend_module_entry VARIANT_module_entry = { "variant", VARIANT_functions, PHP_MINIT(VARIANT), PHP_MSHUTDOWN(VARIANT), NULL, NULL, PHP_MINFO(VARIANT), STANDARD_MODULE_PROPERTIES }; + PHP_MINIT_FUNCTION(VARIANT) { le_variant = zend_register_list_destructors_ex(php_variant_destructor, NULL, "VARIANT", module_number); diff --git a/ext/rpc/com/variant.c b/ext/rpc/com/variant.c index 352c0674dd..c923b507de 100644 --- a/ext/rpc/com/variant.c +++ b/ext/rpc/com/variant.c @@ -30,6 +30,7 @@ #include "php_ini.h" #include "php_typedef_VARIANT.h" #include "conversion.h" +#include "ext/standard/info.h" #include @@ -48,6 +49,7 @@ function_entry VARIANT_functions[] = { {NULL, NULL, NULL} }; + static PHP_MINFO_FUNCTION(VARIANT) { php_info_print_table_start(); @@ -55,10 +57,12 @@ static PHP_MINFO_FUNCTION(VARIANT) php_info_print_table_end(); } + zend_module_entry VARIANT_module_entry = { "variant", VARIANT_functions, PHP_MINIT(VARIANT), PHP_MSHUTDOWN(VARIANT), NULL, NULL, PHP_MINFO(VARIANT), STANDARD_MODULE_PROPERTIES }; + PHP_MINIT_FUNCTION(VARIANT) { le_variant = zend_register_list_destructors_ex(php_variant_destructor, NULL, "VARIANT", module_number); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 8cdef464d5..d1e6fa3ff9 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1530,39 +1530,39 @@ PHP_FUNCTION(error_log) } /* }}} */ -PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers){ +PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers) +{ FILE *logfile; int issock=0, socketd=0;; switch(opt_err){ - case 1: /*send an email*/ - { + case 1: /*send an email*/ { #if HAVE_SENDMAIL - if (!php_mail(opt,"PHP error_log message",message,headers)){ - return FAILURE; - } + if (!php_mail(opt, "PHP error_log message", message, headers, NULL)){ + return FAILURE; + } #else - php_error(E_WARNING,"Mail option not available!"); - return FAILURE; + php_error(E_WARNING,"Mail option not available!"); + return FAILURE; #endif - } - break; - case 2: /*send to an address */ - php_error(E_WARNING,"TCP/IP option not available!"); - return FAILURE; - break; - case 3: /*save to a file*/ - logfile=php_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL); - if(!logfile) { - php_error(E_WARNING,"error_log: Unable to write to %s",opt); + } + break; + case 2: /*send to an address */ + php_error(E_WARNING,"TCP/IP option not available!"); return FAILURE; - } - fwrite(message,strlen(message),1,logfile); - fclose(logfile); - break; - default: - php_log_err(message); - break; + break; + case 3: /*save to a file*/ + logfile=php_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL); + if(!logfile) { + php_error(E_WARNING,"error_log: Unable to write to %s",opt); + return FAILURE; + } + fwrite(message,strlen(message),1,logfile); + fclose(logfile); + break; + default: + php_log_err(message); + break; } return SUCCESS; }