From: Rasmus Lerdorf Date: Thu, 17 May 2007 06:38:13 +0000 (+0000) Subject: Get rid of a useless RINIT and an empty RSHUTDOWN on non-Windows X-Git-Tag: php-5.2.3RC1~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52c2d6c235d945134d86e6c0ad8a3030dbc9f144;p=php Get rid of a useless RINIT and an empty RSHUTDOWN on non-Windows --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 0cc02f3c5e..735ffa27c4 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4130,8 +4130,6 @@ PHP_RINIT_FUNCTION(basic) #endif BG(user_shutdown_function_names) = NULL; - PHP_RINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU); - PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU); #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); @@ -4186,8 +4184,10 @@ PHP_RSHUTDOWN_FUNCTION(basic) */ PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#ifdef PHP_WIN32 #ifdef HAVE_SYSLOG_H PHP_RSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#endif #endif PHP_RSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU); PHP_RSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU); diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index 30fd8b0311..62531cf095 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -106,14 +106,6 @@ PHP_MINIT_FUNCTION(lcg) return SUCCESS; } -PHP_RINIT_FUNCTION(lcg) -{ - if (!LCG(seeded)) { - lcg_seed(TSRMLS_C); - } - return SUCCESS; -} - /* {{{ proto float lcg_value() Returns a value from the combined linear congruential generator */ PHP_FUNCTION(lcg_value) diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h index 23505fbce0..437dfeabce 100644 --- a/ext/standard/php_ext_syslog.h +++ b/ext/standard/php_ext_syslog.h @@ -27,7 +27,9 @@ PHP_MINIT_FUNCTION(syslog); PHP_RINIT_FUNCTION(syslog); +#ifdef PHP_WIN32 PHP_RSHUTDOWN_FUNCTION(syslog); +#endif PHP_MSHUTDOWN_FUNCTION(syslog); PHP_FUNCTION(openlog); diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 15fcc80bfb..34bba462ed 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -114,13 +114,13 @@ PHP_RINIT_FUNCTION(syslog) } +#ifdef PHP_WIN32 PHP_RSHUTDOWN_FUNCTION(syslog) { -#ifdef PHP_WIN32 closelog(); -#endif return SUCCESS; } +#endif PHP_MSHUTDOWN_FUNCTION(syslog) {