diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2012-02-12 20:44:37 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2012-02-12 20:44:37 +0000 |
commit | eae74c7acfa484868f5374f8f0ebff1eb39d1c61 (patch) | |
tree | b2ce4f2f26c00e5be74fd4c55a737ca7bed39da7 /lib | |
parent | 47e6714f1bb9be3587d5c76d5638887b595e6355 (diff) | |
download | netpbm-mirror-eae74c7acfa484868f5374f8f0ebff1eb39d1c61.tar.gz netpbm-mirror-eae74c7acfa484868f5374f8f0ebff1eb39d1c61.tar.xz netpbm-mirror-eae74c7acfa484868f5374f8f0ebff1eb39d1c61.zip |
redo conditional compilation of Windows stuff to use MSVCRT, based on _WIN32, instead of WIN32
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1644 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpm.c | 6 | ||||
-rw-r--r-- | lib/pm.h | 2 | ||||
-rw-r--r-- | lib/pmfileio.c | 4 | ||||
-rw-r--r-- | lib/util/nsleep.c | 6 |
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 |