diff --git a/contrib/seekable_format/examples/parallel_processing.c b/contrib/seekable_format/examples/parallel_processing.c index 356561e5a..928371025 100644 --- a/contrib/seekable_format/examples/parallel_processing.c +++ b/contrib/seekable_format/examples/parallel_processing.c @@ -19,7 +19,7 @@ #define ZSTD_STATIC_LINKING_ONLY #include // presumes zstd library is installed #include -#if defined(WIN32) || defined(_WIN32) +#if defined(_WIN32) # include # define SLEEP(x) Sleep(x) #else diff --git a/programs/fileio.c b/programs/fileio.c index 217232542..81d343023 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -527,7 +527,7 @@ static int FIO_removeFile(const char* path) DISPLAYLEVEL(2, "zstd: Refusing to remove non-regular file %s\n", path); return 0; } -#if defined(_WIN32) || defined(WIN32) +#if defined(_WIN32) /* windows doesn't allow remove read-only files, * so try to make it writable first */ if (!(statbuf.st_mode & _S_IWRITE)) { diff --git a/programs/platform.h b/programs/platform.h index 43c5dc969..bbe0965ae 100644 --- a/programs/platform.h +++ b/programs/platform.h @@ -141,7 +141,7 @@ extern "C" { #elif defined(MSDOS) || defined(OS2) # include /* _isatty */ # define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream)) -#elif defined(WIN32) || defined(_WIN32) +#elif defined(_WIN32) # include /* _isatty */ # include /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */ # include /* FILE */ @@ -157,7 +157,7 @@ static __inline int IS_CONSOLE(FILE* stdStream) { /****************************** * OS-specific IO behaviors ******************************/ -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) +#if defined(MSDOS) || defined(OS2) || defined(_WIN32) # include /* _O_BINARY */ # include /* _setmode, _fileno, _get_osfhandle */ # if !defined(__DJGPP__) diff --git a/programs/util.h b/programs/util.h index 8234646bf..571d39421 100644 --- a/programs/util.h +++ b/programs/util.h @@ -338,7 +338,7 @@ void UTIL_refFilename(FileNamesTable* fnt, const char* filename); FileNamesTable* UTIL_createExpandedFNT(const char* const* filenames, size_t nbFilenames, int followLinks); -#if defined(_WIN32) || defined(WIN32) +#if defined(_WIN32) DWORD CountSetBits(ULONG_PTR bitMask); #endif diff --git a/zlibWrapper/examples/minigzip.c b/zlibWrapper/examples/minigzip.c index 717a94df9..67a17907b 100644 --- a/zlibWrapper/examples/minigzip.c +++ b/zlibWrapper/examples/minigzip.c @@ -34,7 +34,7 @@ # include #endif -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) +#if defined(MSDOS) || defined(OS2) || defined(_WIN32) || defined(__CYGWIN__) # include # include # ifdef UNDER_CE @@ -63,7 +63,7 @@ #endif #if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) -#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ +#ifndef _WIN32 /* unlink already in stdio.h for WIN32 */ extern int unlink _Z_OF((const char *)); #endif #endif