From: Rasmus Lerdorf Date: Fri, 18 May 2007 12:15:01 +0000 (+0000) Subject: MFB syscall optimizations X-Git-Tag: RELEASE_1_4~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e84cb97a078b3f198ff0ad16dbd2f76371074c2;p=php MFB syscall optimizations # boredom on the plane to China... --- diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index d782065cbd..abdaa78469 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -517,7 +517,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func } if (use_cache) { - t = CWDG(realpath_cache_ttl)?time(NULL):0; + t = CWDG(realpath_cache_ttl)?sapi_get_request_time(TSRMLS_C):0; if ((bucket = realpath_cache_find(path, path_length, t TSRMLS_CC)) != NULL) { int len = bucket->realpath_len; diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index a0e710f584..0cbb06db7b 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4138,8 +4138,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); @@ -4192,7 +4190,9 @@ PHP_RSHUTDOWN_FUNCTION(basic) PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU); #ifdef HAVE_SYSLOG_H +#ifdef PHP_WIN32 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 3d34591ef6..1366b4e45f 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() U 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/php_lcg.h b/ext/standard/php_lcg.h index b036cbce00..e78414ff13 100644 --- a/ext/standard/php_lcg.h +++ b/ext/standard/php_lcg.h @@ -33,7 +33,6 @@ PHPAPI double php_combined_lcg(TSRMLS_D); PHP_FUNCTION(lcg_value); PHP_MINIT_FUNCTION(lcg); -PHP_RINIT_FUNCTION(lcg); #ifdef ZTS #define LCG(v) TSRMG(lcg_globals_id, php_lcg_globals *, v) diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 25720b1a3e..b60067ae7e 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) {