Fix compilation on Linux hosts - try #2

We can't use the _WIN32 symbol which is automatically defined once you include psdk/windef.h ...

svn path=/trunk/; revision=24069
This commit is contained in:
Hervé Poussineau 2006-09-11 12:42:35 +00:00
parent 5fb31962db
commit 60fb482ad4
2 changed files with 8 additions and 3 deletions

View file

@ -35,7 +35,7 @@
#define PATH_MAX _MAX_PATH #define PATH_MAX _MAX_PATH
#endif//_MSC_VER #endif//_MSC_VER
#ifndef WIN32 #ifndef WINDOWS_HOST
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX 260 #define PATH_MAX 260
#endif #endif
@ -62,7 +62,7 @@ void convert_path(char *dst, char *src)
i = 0; i = 0;
while (src[i] != 0) while (src[i] != 0)
{ {
#ifdef WIN32 #ifdef WINDOWS_HOST
if (src[i] == '/') if (src[i] == '/')
{ {
dst[i] = '\\'; dst[i] = '\\';

View file

@ -29,6 +29,11 @@
#include <stdio.h> #include <stdio.h>
/* We have to do this because psdk/windef.h will _always_ define _WIN32... */
#if defined(_WIN32) || defined(_WIN64)
#define WINDOWS_HOST
#endif
#define NTOS_MODE_USER #define NTOS_MODE_USER
#define WIN32_NO_STATUS #define WIN32_NO_STATUS
#include <ntddk.h> #include <ntddk.h>
@ -76,7 +81,7 @@ static void DPRINT ( const char* fmt, ... )
#define CHECKPOINT #define CHECKPOINT
#ifdef _WIN32 #ifdef WINDOWS_HOST
#define strncasecmp _strnicmp #define strncasecmp _strnicmp
#define strcasecmp _stricmp #define strcasecmp _stricmp
#else #else