]> wimlib.net Git - wimlib/commitdiff
wimlib.h: test _WIN32 instead of __WIN32__
authorEric Biggers <ebiggers3@gmail.com>
Sun, 27 Nov 2016 23:24:37 +0000 (15:24 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 28 Nov 2016 02:35:16 +0000 (18:35 -0800)
MSVC defines _WIN32 but not __WIN32__.  MinGW defines both.

include/wimlib.h

index 5941b9ee856a970fa0eee7221b0b98212df933f6..a45ebac308c5d829db4eaaf90fda0e0c7b7d711a 100644 (file)
@@ -440,14 +440,14 @@ typedef struct WIMStruct WIMStruct;
 #define WIMLIB_WIMSTRUCT_DECLARED
 #endif
 
 #define WIMLIB_WIMSTRUCT_DECLARED
 #endif
 
-#ifdef __WIN32__
+#ifdef _WIN32
 typedef wchar_t wimlib_tchar;
 #else
 /** See @ref sec_encodings */
 typedef char wimlib_tchar;
 #endif
 
 typedef wchar_t wimlib_tchar;
 #else
 /** See @ref sec_encodings */
 typedef char wimlib_tchar;
 #endif
 
-#ifdef __WIN32__
+#ifdef _WIN32
 /** Path separator for WIM paths passed back to progress callbacks.
  * This is forward slash on UNIX and backslash on Windows.  */
 #  define WIMLIB_WIM_PATH_SEPARATOR '\\'
 /** Path separator for WIM paths passed back to progress callbacks.
  * This is forward slash on UNIX and backslash on Windows.  */
 #  define WIMLIB_WIM_PATH_SEPARATOR '\\'