[threading] Fix ERROR macro after including windows.h
This commit is contained in:
parent
db3f5372df
commit
7c365eb02c
@ -51,7 +51,8 @@ typedef ZSTD_ErrorCode ERR_enum;
|
|||||||
#ifdef ERROR
|
#ifdef ERROR
|
||||||
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
|
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
|
||||||
#endif
|
#endif
|
||||||
#define ERROR(name) ((size_t)-PREFIX(name))
|
#define ERROR(name) ZSTD_ERROR(name)
|
||||||
|
#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
|
||||||
|
|
||||||
ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); }
|
ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); }
|
||||||
|
|
||||||
|
@ -37,7 +37,15 @@ extern "C" {
|
|||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ERROR
|
||||||
|
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifdef ERROR
|
||||||
|
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
|
||||||
|
#endif
|
||||||
|
#define ERROR(name) ZSTD_ERROR(name)
|
||||||
|
|
||||||
|
|
||||||
/* mutex */
|
/* mutex */
|
||||||
#define pthread_mutex_t CRITICAL_SECTION
|
#define pthread_mutex_t CRITICAL_SECTION
|
||||||
|
Loading…
Reference in New Issue
Block a user