summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-06-16 01:31:10 +0000
committerPierre Joye <pajoye@php.net>2011-06-16 01:31:10 +0000
commit1d357d964c9667ce8bdff4e62f23bf7be3e5bc30 (patch)
tree2746204c1a4341614b3e42570a85de8e87b7ebaf /main
parent175f84436c97f8811f807fcb4915a28fee96bab0 (diff)
downloadphp-git-1d357d964c9667ce8bdff4e62f23bf7be3e5bc30.tar.gz
- init win32 rng context once per process
Diffstat (limited to 'main')
-rw-r--r--main/main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/main/main.c b/main/main.c
index 7f944239ad..f6f6c2f636 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1885,11 +1885,21 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
#else
php_os=PHP_OS;
#endif
-
+ {
+ char dll_dir[MAX_PATH];
+ sprintf(dll_dir, "%s\\%s", module_path, "..\\..\\deps\\bin");
+ SetDllDirectory(dll_dir);
+ }
+// GetModuleFileName (NULL, module_path, MAX_PATH);
+//__debugbreak();
#ifdef ZTS
tsrm_ls = ts_resource(0);
#endif
+#ifdef PHP_WIN32
+ php_win32_init_rng_lock();
+#endif
+
module_shutdown = 0;
module_startup = 1;
sapi_initialize_empty_request(TSRMLS_C);
@@ -2241,6 +2251,10 @@ void php_module_shutdown(TSRMLS_D)
WSACleanup();
#endif
+#ifdef PHP_WIN32
+ php_win32_free_rng_lock();
+#endif
+
sapi_flush(TSRMLS_C);
zend_shutdown(TSRMLS_C);