]> granicus.if.org Git - php/commitdiff
Fix non-thread safe mode
authorZeev Suraski <zeev@php.net>
Sun, 4 Mar 2001 01:45:19 +0000 (01:45 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 4 Mar 2001 01:45:19 +0000 (01:45 +0000)
ext/standard/output.c
ext/standard/php_output.h
main/main.c
main/output.c
main/php_output.h

index e484ea777c62c410bd91abe6a2d4b8a959fd9d0f..1b4a6569811e10fc79faca2f15046c41eccdb052 100644 (file)
@@ -68,18 +68,24 @@ PHP_GINIT_FUNCTION(output)
 PHPAPI void php_output_startup()
 {
        OLS_FETCH();
-       ELS_FETCH();
 
        OG(php_body_write) = php_ub_body_write;
        OG(php_header_write) = sapi_module.ub_write;
        OG(nesting_level) = 0;
        OG(lock) = 0;
+}
+
+
+void php_output_register_constants()
+{
+       ELS_FETCH();
 
        REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_START", PHP_OUTPUT_HANDLER_START, CONST_CS | CONST_PERSISTENT);
        REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_CONT", PHP_OUTPUT_HANDLER_CONT, CONST_CS | CONST_PERSISTENT);
        REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_END", PHP_OUTPUT_HANDLER_END, CONST_CS | CONST_PERSISTENT);
 }
 
+
 PHPAPI int php_body_write(const char *str, uint str_length)
 {
        OLS_FETCH();
index d7d617ba1257bd3464e10ede83ee5bc19fae3c60..1792d20257a51b5aa485f4142beff9f1d9b44a43 100644 (file)
@@ -24,6 +24,7 @@
 #include "php.h"
 
 PHPAPI void php_output_startup(void);
+void php_output_register_constants(void);
 PHPAPI int  php_body_write(const char *str, uint str_length);
 PHPAPI int  php_header_write(const char *str, uint str_length);
 PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size);
index 00fbbd0c9a4d6b328113659c9325364fd77372a3..4fb2c9a45d8107bdf680964a607334d7a04e6690 100644 (file)
@@ -850,6 +850,7 @@ int php_module_startup(sapi_module_struct *sf)
 
        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);
+       php_output_register_constants();
 
        if (php_startup_ticks(PLS_C) == FAILURE) {
                php_printf("Unable to start PHP ticks\n");
index e484ea777c62c410bd91abe6a2d4b8a959fd9d0f..1b4a6569811e10fc79faca2f15046c41eccdb052 100644 (file)
@@ -68,18 +68,24 @@ PHP_GINIT_FUNCTION(output)
 PHPAPI void php_output_startup()
 {
        OLS_FETCH();
-       ELS_FETCH();
 
        OG(php_body_write) = php_ub_body_write;
        OG(php_header_write) = sapi_module.ub_write;
        OG(nesting_level) = 0;
        OG(lock) = 0;
+}
+
+
+void php_output_register_constants()
+{
+       ELS_FETCH();
 
        REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_START", PHP_OUTPUT_HANDLER_START, CONST_CS | CONST_PERSISTENT);
        REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_CONT", PHP_OUTPUT_HANDLER_CONT, CONST_CS | CONST_PERSISTENT);
        REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_END", PHP_OUTPUT_HANDLER_END, CONST_CS | CONST_PERSISTENT);
 }
 
+
 PHPAPI int php_body_write(const char *str, uint str_length)
 {
        OLS_FETCH();
index d7d617ba1257bd3464e10ede83ee5bc19fae3c60..1792d20257a51b5aa485f4142beff9f1d9b44a43 100644 (file)
@@ -24,6 +24,7 @@
 #include "php.h"
 
 PHPAPI void php_output_startup(void);
+void php_output_register_constants(void);
 PHPAPI int  php_body_write(const char *str, uint str_length);
 PHPAPI int  php_header_write(const char *str, uint str_length);
 PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size);