]> granicus.if.org Git - php/commitdiff
- Use TSRM_WIN32
authorAndi Gutmans <andi@php.net>
Sat, 2 Sep 2000 15:03:19 +0000 (15:03 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 2 Sep 2000 15:03:19 +0000 (15:03 +0000)
TSRM/TSRM.c
TSRM/TSRM.h

index 04f746883f55ed9d803c2d36f3dcc284afb8f44b..b8b03cf7ae2fddde32a9f804228978b529d41ac8 100644 (file)
@@ -310,7 +310,7 @@ void ts_free_id(ts_rsrc_id id)
 /* Obtain the current thread id */
 TSRM_API THREAD_T tsrm_thread_id(void)
 {
-#ifdef WIN32
+#ifdef TSRM_WIN32
        return GetCurrentThreadId();
 #elif defined(GNUPTH)
        return pth_self();
@@ -329,7 +329,7 @@ TSRM_API MUTEX_T tsrm_mutex_alloc( void )
 {
     MUTEX_T mutexp;
 
-#ifdef WIN32
+#ifdef TSRM_WIN32
     mutexp = malloc(sizeof(CRITICAL_SECTION));
        InitializeCriticalSection(mutexp);
 #elif defined(GNUPTH)
@@ -354,7 +354,7 @@ TSRM_API MUTEX_T tsrm_mutex_alloc( void )
 TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
 {
     if (mutexp) {
-#ifdef WIN32
+#ifdef TSRM_WIN32
                DeleteCriticalSection(mutexp);
 #elif defined(GNUPTH)
                free(mutexp);
@@ -379,7 +379,7 @@ TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
 #if 0
        tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
 #endif
-#ifdef WIN32
+#ifdef TSRM_WIN32
        EnterCriticalSection(mutexp);
        return 1;
 #elif defined(GNUPTH)
@@ -400,7 +400,7 @@ TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
 #if 0
        tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
 #endif
-#ifdef WIN32
+#ifdef TSRM_WIN32
        LeaveCriticalSection(mutexp);
        return 1;
 #elif defined(GNUPTH)
index 23dc73f8d2e1cc39b9c2ef8a3e81e71c5932efed..4957aba72872d87118ba09f8d1fda5d90b45a01a 100644 (file)
@@ -24,7 +24,7 @@
 /* Only compile multi-threading functions if we're in ZTS mode */
 #ifdef ZTS
 
-#if WIN32||WINNT
+#ifdef TSRM_WIN32
 # include <windows.h>
 #elif defined(GNUPTH)
 # include <pth.h>
@@ -34,7 +34,7 @@
 
 typedef int ts_rsrc_id;
 
-#if WIN32||WINNT
+#ifdef TSRM_WIN32
 #      ifdef TSRM_EXPORTS
 #      define TSRM_API __declspec(dllexport)
 #      else
@@ -46,7 +46,7 @@ typedef int ts_rsrc_id;
 
 
 /* Define THREAD_T and MUTEX_T */
-#if defined(WIN32)
+#ifdef TSRM_WIN32
 # define THREAD_T DWORD
 # define MUTEX_T CRITICAL_SECTION *
 #elif defined(GNUPTH)