1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-07 09:26:03 +02:00

[error] Don't guard undef X with ifdef X

This commit is contained in:
Nick Terrell 2017-08-29 11:54:38 -07:00
parent 02033be08c
commit 9822f97721
2 changed files with 3 additions and 9 deletions

View File

@ -48,9 +48,7 @@ typedef ZSTD_ErrorCode ERR_enum;
/*-****************************************
* Error codes handling
******************************************/
#ifdef ERROR
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
#endif
#undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
#define ERROR(name) ZSTD_ERROR(name)
#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))

View File

@ -37,13 +37,9 @@ extern "C" {
# define WIN32_LEAN_AND_MEAN
#endif
#ifdef ERROR
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
#endif
#undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
#include <windows.h>
#ifdef ERROR
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
#endif
#undef ERROR
#define ERROR(name) ZSTD_ERROR(name)