summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/head.c12
-rw-r--r--main.h1
-rw-r--r--main/main.c3
-rw-r--r--main/php_globals.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/ext/standard/head.c b/ext/standard/head.c
index 6c2772a547..6f06a4b031 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -236,17 +236,17 @@ PHPAPI int php3_header(void)
#if APACHE || defined(USE_SAPI) || FHTTPD
char *tempstr;
#endif
-TLS_VARS;
+ PLS_FETCH();
- if (GLOBAL(header_is_being_sent)) {
+ if (PG(header_is_being_sent)) {
return 0;
} else {
- GLOBAL(header_is_being_sent) = 1;
+ PG(header_is_being_sent) = 1;
}
#if APACHE
if (!GLOBAL(php3_rqst)) { /* we're not in a request, allow output */
- GLOBAL(header_is_being_sent) = 0;
+ PG(header_is_being_sent) = 0;
return 1;
}
if ((GLOBAL(php3_PrintHeader) && !GLOBAL(php3_HeaderPrinted)) || (GLOBAL(php3_PrintHeader) && GLOBAL(php3_HeaderPrinted) == 2)) {
@@ -324,7 +324,7 @@ TLS_VARS;
send_http_header(GLOBAL(php3_rqst));
if (GLOBAL(php3_rqst)->header_only) {
set_header_request(1);
- GLOBAL(header_is_being_sent) = 0;
+ PG(header_is_being_sent) = 0;
return(0);
}
}
@@ -382,7 +382,7 @@ TLS_VARS;
GLOBAL(header_called) = 1;
}
#endif
- GLOBAL(header_is_being_sent) = 0;
+ PG(header_is_being_sent) = 0;
return(1);
}
diff --git a/main.h b/main.h
index 3f4501210c..d19d0208cc 100644
--- a/main.h
+++ b/main.h
@@ -55,7 +55,6 @@ extern void php3_module_shutdown();
extern void php3_module_shutdown_for_exec(void);
#ifndef THREAD_SAFE
-extern unsigned char header_is_being_sent;
extern int initialized;
#endif
diff --git a/main/main.c b/main/main.c
index 5a0cf38eef..4b706ae375 100644
--- a/main/main.c
+++ b/main/main.c
@@ -250,7 +250,6 @@ PHP_INI_END()
*/
int initialized; /* keep track of which resources were successfully initialized */
static int module_initialized = 0;
-unsigned char header_is_being_sent;
#if WIN32|WINNT
unsigned int wintimer;
@@ -648,7 +647,7 @@ int php3_request_startup(CLS_D ELS_DC PLS_DC)
/* initialize global variables */
{
- GLOBAL(header_is_being_sent) = 0;
+ PG(header_is_being_sent)=0;
}
if (php3_init_request_info(NULL)) {
diff --git a/main/php_globals.h b/main/php_globals.h
index 19dbaa8804..969d7cab66 100644
--- a/main/php_globals.h
+++ b/main/php_globals.h
@@ -63,7 +63,9 @@ struct _php_core_globals {
long track_vars;
long y2k_compliance;
+
+ unsigned char header_is_being_sent;
};
-#endif /* _PHP_GLOBALS_H */ \ No newline at end of file
+#endif /* _PHP_GLOBALS_H */