about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libpm.c6
-rw-r--r--lib/pm.h2
-rw-r--r--lib/pmfileio.c4
-rw-r--r--lib/util/nsleep.c6
4 files changed, 10 insertions, 8 deletions
diff --git a/lib/libpm.c b/lib/libpm.c
index 3c69c105..f6578a59 100644
--- a/lib/libpm.c
+++ b/lib/libpm.c
@@ -708,7 +708,7 @@ extractAfterLastSlash(const char * const fullPath,
 
 
 
-#ifdef WIN32
+#if MSVCRT
 static void
 splitpath(const char * const fullPath,
           char *       const retval,
@@ -737,8 +737,8 @@ pm_arg0toprogname(const char arg0[]) {
    but truncated at 64 characters.
 -----------------------------------------------------------------------------*/
     static char retval[64+1];
-#ifdef WIN32
-    splitPath(arg0, retval, sizeof(retval));
+#if MSVCRT
+    splitpath(arg0, retval, sizeof(retval));
 #else
     extractAfterLastSlash(arg0, retval, sizeof(retval));
 #endif
diff --git a/lib/pm.h b/lib/pm.h
index 88f61522..72ecc919 100644
--- a/lib/pm.h
+++ b/lib/pm.h
@@ -86,7 +86,7 @@ extern "C" {
    We're ignoring S_IREAD now to see if anyone misses it.  If there are still
    users that need it, we can handle it here.
 */
-#ifdef WIN32
+#if MSVCRT
   #define PM_S_IWUSR _S_IWRITE
   #define PM_S_IRUSR _S_IREAD
 #else
diff --git a/lib/pmfileio.c b/lib/pmfileio.c
index abcb05cf..1d7d2643 100644
--- a/lib/pmfileio.c
+++ b/lib/pmfileio.c
@@ -122,10 +122,10 @@ tempFileOpenFlags(void) {
     retval = 0
         | O_CREAT
         | O_RDWR
-#ifndef WIN32
+#if !MSVCRT
         | O_EXCL
 #endif
-#ifdef WIN32
+#if MSVCRT
         | O_BINARY
 #endif
         ;
diff --git a/lib/util/nsleep.c b/lib/util/nsleep.c
index d9fed571..24d48207 100644
--- a/lib/util/nsleep.c
+++ b/lib/util/nsleep.c
@@ -1,4 +1,6 @@
-#ifdef WIN32
+#include "pm_config.h"
+
+#if MSVCRT
   #include <windows.h>
   #include <process.h>
 #else
@@ -12,7 +14,7 @@
 void
 pm_sleep(unsigned int const milliseconds) {
 
-#ifdef WIN32
+#if MSVCRT
     SleepEx(milliseconds, TRUE);
 #else