Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not test WIN32, instead test _WIN32 #3772

Merged
merged 1 commit into from Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/seekable_format/examples/parallel_processing.c
Expand Up @@ -19,7 +19,7 @@
#define ZSTD_STATIC_LINKING_ONLY
#include <zstd.h> // presumes zstd library is installed
#include <zstd_errors.h>
#if defined(WIN32) || defined(_WIN32)
#if defined(_WIN32)
# include <windows.h>
# define SLEEP(x) Sleep(x)
#else
Expand Down
2 changes: 1 addition & 1 deletion programs/fileio.c
Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions programs/platform.h
Expand Up @@ -141,7 +141,7 @@ extern "C" {
#elif defined(MSDOS) || defined(OS2)
# include <io.h> /* _isatty */
# define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
#elif defined(WIN32) || defined(_WIN32)
#elif defined(_WIN32)
# include <io.h> /* _isatty */
# include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */
# include <stdio.h> /* FILE */
Expand All @@ -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 <fcntl.h> /* _O_BINARY */
# include <io.h> /* _setmode, _fileno, _get_osfhandle */
# if !defined(__DJGPP__)
Expand Down
2 changes: 1 addition & 1 deletion programs/util.h
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions zlibWrapper/examples/minigzip.c
Expand Up @@ -34,7 +34,7 @@
# include <sys/stat.h>
#endif

#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
#if defined(MSDOS) || defined(OS2) || defined(_WIN32) || defined(__CYGWIN__)
# include <fcntl.h>
# include <io.h>
# ifdef UNDER_CE
Expand Down Expand Up @@ -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
Expand Down