From: Andi Gutmans Date: Thu, 31 Aug 2000 23:44:10 +0000 (+0000) Subject: - Support for always building TSRM into PHP X-Git-Tag: php-4.0.3RC1~388 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d95c23c967b1b10e56c363a700ae85f21e83869;p=php - Support for always building TSRM into PHP --- diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 5750bc7d4a..04f746883f 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -11,6 +11,9 @@ */ #include "TSRM.h" + +#ifdef ZTS + #include #include @@ -455,3 +458,5 @@ void tsrm_debug_set(int status) { tsrm_debug_status = status; } + +#endif /* ZTS */ diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index dbf5fbe898..23dc73f8d2 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -21,6 +21,9 @@ # undef VERSION #endif +/* Only compile multi-threading functions if we're in ZTS mode */ +#ifdef ZTS + #if WIN32||WINNT # include #elif defined(GNUPTH) @@ -104,4 +107,6 @@ TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(TH } #endif +#endif /* ZTS */ + #endif /* TSRM_H */ diff --git a/TSRM/configure.in b/TSRM/configure.in index 43171d8f5d..3d46fdc5b1 100644 --- a/TSRM/configure.in +++ b/TSRM/configure.in @@ -18,4 +18,6 @@ fi TSRM_PTHREAD +AC_DEFINE(ZTS,1,[ ]) + AC_OUTPUT(Makefile)