Skip to content

Commit

Permalink
Merge pull request #931 from pps83/dev-win32-sheck
Browse files Browse the repository at this point in the history
Correct check for Windows compilation
  • Loading branch information
Cyan4973 authored May 7, 2024
2 parents 98684ae + b54324a commit 5930eb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cli/xsum_os_specific.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static int XSUM_IS_CONSOLE(FILE* stdStream)
#elif defined(MSDOS) || defined(OS2)
# include <io.h> /* _isatty */
# define XSUM_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 @@ -92,7 +92,7 @@ static __inline int XSUM_IS_CONSOLE(FILE* stdStream)
# define XSUM_IS_CONSOLE(stdStream) 0
#endif

#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
4 changes: 2 additions & 2 deletions xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ extern "C" {

/*! @brief Marks a global symbol. */
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
# if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
# ifdef XXH_EXPORT
# define XXH_PUBLIC_API __declspec(dllexport)
# elif XXH_IMPORT
Expand Down Expand Up @@ -521,7 +521,7 @@ extern "C" {

/* specific declaration modes for Windows */
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
# if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
# ifdef XXH_EXPORT
# define XXH_PUBLIC_API __declspec(dllexport)
# elif XXH_IMPORT
Expand Down

0 comments on commit 5930eb4

Please sign in to comment.