2424#include "ext/standard/info.h"
2525#include "php_variables.h"
2626#include "php_ini.h"
27+ #include <process.h>
2728
28- #ifdef PHP_WIN32
29- # include <process.h>
30- #else
31- # define __try
32- # define __except (val )
33- # define __declspec (foo )
34- #endif
35-
36-
37- #ifdef PHP_WIN32
3829#define PHP_ENABLE_SEH
39- #endif
4030
4131/*
4232uncomment the following lines to turn off
@@ -111,7 +101,7 @@ static char *isapi_secure_server_variable_names[] = {
111101 NULL
112102};
113103
114- #if defined( PHP_WIN32 ) && defined( ZTS )
104+ #ifdef ZTS
115105ZEND_TSRMLS_CACHE_DEFINE ()
116106#endif
117107
@@ -655,14 +645,11 @@ BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO *pVer)
655645
656646static void my_endthread ()
657647{
658- #ifdef PHP_WIN32
659648 if (bTerminateThreadsOnError ) {
660649 _endthread ();
661650 }
662- #endif
663651}
664652
665- #ifdef PHP_WIN32
666653/* ep is accessible only in the context of the __except expression,
667654 * so we have to call this function to obtain it.
668655 */
@@ -671,7 +658,6 @@ BOOL exceptionhandler(LPEXCEPTION_POINTERS *e, LPEXCEPTION_POINTERS ep)
671658 * e = ep ;
672659 return TRUE;
673660}
674- #endif
675661
676662DWORD WINAPI HttpExtensionProc (LPEXTENSION_CONTROL_BLOCK lpECB )
677663{
@@ -684,9 +670,7 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
684670#ifdef ZTS
685671 /* initial resource fetch */
686672 (void )ts_resource (0 );
687- # ifdef PHP_WIN32
688673 ZEND_TSRMLS_CACHE_UPDATE ();
689- # endif
690674#endif
691675
692676 zend_first_try {
@@ -767,9 +751,7 @@ __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, L
767751 switch (fdwReason ) {
768752 case DLL_PROCESS_ATTACH :
769753 php_tsrm_startup_ex (128 );
770- # ifdef PHP_WIN32
771754 ZEND_TSRMLS_CACHE_UPDATE ();
772- # endif
773755 sapi_startup (& isapi_sapi_module );
774756 if (isapi_sapi_module .startup ) {
775757 isapi_sapi_module .startup (& sapi_module );
0 commit comments