]> granicus.if.org Git - php/commitdiff
MFB syscall optimizations
authorRasmus Lerdorf <rasmus@php.net>
Fri, 18 May 2007 12:15:01 +0000 (12:15 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 18 May 2007 12:15:01 +0000 (12:15 +0000)
# boredom on the plane to China...

TSRM/tsrm_virtual_cwd.c
ext/standard/basic_functions.c
ext/standard/lcg.c
ext/standard/php_ext_syslog.h
ext/standard/php_lcg.h
ext/standard/syslog.c

index d782065cbda00c2adf04e275d16954853da6219e..abdaa78469165ffdecf4da880d535f84ed8b4206 100644 (file)
@@ -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;
 
index a0e710f5846c455f11cf3d5facc31c7f58e5aa68..0cbb06db7b782c0cb7cc9ff51d27e3adf6498b93 100644 (file)
@@ -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);
index 3d34591ef6054b239a0d670e0f852f6a14f818cc..1366b4e45f4b868c12eb06ef8297690ef24c105f 100644 (file)
@@ -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)
index 23505fbce0a9e0f4d52df9ad4aad9fc75c686f5a..437dfeabce72645cba07297818dc87a9e8d864a1 100644 (file)
@@ -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);
index b036cbce004fa22513d0cb5ba832ba8263d0d5ac..e78414ff1387bb889c807fc134c73e230dcf4041 100644 (file)
@@ -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)
index 25720b1a3ec1428e174f7f02015581f39125ed5b..b60067ae7ebc2783df0c220440f8439f01ed741c 100644 (file)
@@ -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)
 {