summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-09-02 15:03:19 +0000
committerAndi Gutmans <andi@php.net>2000-09-02 15:03:19 +0000
commit92cfa27ff0db9c85dda59507434660c52db4c970 (patch)
treed928b02dfba8aa19fce117d12e540c18578bf5da /TSRM
parentf2b0015c9b9dba1eaf014fd6f7a31a057c9df7db (diff)
downloadphp-git-92cfa27ff0db9c85dda59507434660c52db4c970.tar.gz
- Use TSRM_WIN32
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/TSRM.c10
-rw-r--r--TSRM/TSRM.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 04f746883f..b8b03cf7ae 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -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)
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index 23dc73f8d2..4957aba728 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -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)