diff options
author | Zeev Suraski <zeev@php.net> | 1999-12-17 20:55:31 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-12-17 20:55:31 +0000 |
commit | fb1c77bd4f8a636ba47d720f8ca65fc6baae836d (patch) | |
tree | 1be0390e76d422f7abc36f577178f9683536fa84 /main/main.c | |
parent | 71dddd7db7e768ae8145e085fcbb6b6db4a1c40a (diff) | |
download | php-git-fb1c77bd4f8a636ba47d720f8ca65fc6baae836d.tar.gz |
- Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c index 2d0aee4991..2d650e803b 100644 --- a/main/main.c +++ b/main/main.c @@ -887,6 +887,7 @@ int php_module_startup(sapi_module_struct *sf) zend_utility_functions zuf; zend_utility_values zuv; int module_number=0; /* for REGISTER_INI_ENTRIES() */ + char *php_os; #ifdef ZTS zend_executor_globals *executor_globals; php_core_globals *core_globals; @@ -896,6 +897,16 @@ int php_module_startup(sapi_module_struct *sf) WORD wVersionRequested = MAKEWORD(2, 0); WSADATA wsaData; #endif +#if WIN32|WINNT + /* Get build numbers for Windows NT or Win95 */ + if (dwVersion < 0x80000000){ + php_os="WINNT"; + } else { + php_os="WIN32"; + } +#else + php_os=PHP_OS; +#endif global_lock_init(); SG(server_context) = NULL; @@ -963,6 +974,9 @@ int php_module_startup(sapi_module_struct *sf) zend_set_utility_values(&zuv); php_startup_SAPI_content_types(); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php_os, strlen(php_os), CONST_PERSISTENT | CONST_CS); + if (php_startup_internal_extensions() == FAILURE) { php_printf("Unable to start builtin modules\n"); return FAILURE; |