diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-03-03 14:08:45 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.ru> | 2022-03-03 14:08:45 +0300 |
commit | ecbf59ee908f520741be4c495d9ea4b70dc50fb4 (patch) | |
tree | 0f362b5c992ba76edfccbb056ed78aa6d3ab4488 | |
parent | 75b363ad9be455d895aee7f72f45be2d950d3518 (diff) | |
download | ydb-ecbf59ee908f520741be4c495d9ea4b70dc50fb4.tar.gz |
Enable yet another warning under clang-cl
ref:fdd92250532d24eebbf27cb8f8369eeb88e17df9
-rwxr-xr-x | build/ymake_conf.py | 1 | ||||
-rw-r--r-- | contrib/restricted/boost/boost_common.inc | 2 | ||||
-rw-r--r-- | util/system/win_undef.h | 40 | ||||
-rw-r--r-- | util/system/winint.h | 47 |
4 files changed, 51 insertions, 39 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py index a26aecbda69..87d789664e9 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -2456,7 +2456,6 @@ class MSVCCompiler(MSVC, Compiler): c_warnings.extend(( '-Wno-bitwise-op-parentheses', - '-Wno-dll-attribute-on-redeclaration', '-Wno-extern-initializer', '-Wno-format', '-Wno-inconsistent-dllimport', diff --git a/contrib/restricted/boost/boost_common.inc b/contrib/restricted/boost/boost_common.inc index 892bae5b39b..ac87e45c400 100644 --- a/contrib/restricted/boost/boost_common.inc +++ b/contrib/restricted/boost/boost_common.inc @@ -63,7 +63,7 @@ ENDIF () IF (OS_WINDOWS AND ARCH_X86_64) CFLAGS( -DBOOST_THREAD_USES_CHRONO - -DBOOST_USE_WINDOWS_H + GLOBAL -DBOOST_USE_WINDOWS_H -DNOMINMAX -DSECURITY_WIN32 -DWIN32_LEAN_AND_MEAN diff --git a/util/system/win_undef.h b/util/system/win_undef.h new file mode 100644 index 00000000000..43f3d5c73d2 --- /dev/null +++ b/util/system/win_undef.h @@ -0,0 +1,40 @@ +/* + * The lack of #pragma once is intentional, + * as the user might need to include this header multiple times. + */ + +#include <util/system/platform.h> + +#if defined(_win_) + #undef GetFreeSpace + #undef LoadImage + #undef GetMessage + #undef SendMessage + #undef DeleteFile + #undef GetUserName + #undef CreateMutex + #undef GetObject + #undef GetGeoInfo + #undef GetClassName + #undef GetKValue + #undef StartDoc + #undef UpdateResource + #undef GetNameInfo + #undef GetProp + #undef SetProp + #undef RemoveProp + + // FIXME thegeorg@: undefining CONST breaks too many projects. + // #undef CONST + #undef DEFAULT_QUALITY + #undef ERROR + #undef IGNORE + #undef OPTIONAL + #undef TRANSPARENT + + #undef LANG_LAO + #undef LANG_YI + + #undef CM_NONE + +#endif diff --git a/util/system/winint.h b/util/system/winint.h index ebeaefb3d2c..4f6659b40c1 100644 --- a/util/system/winint.h +++ b/util/system/winint.h @@ -1,43 +1,16 @@ #pragma once -#include "platform.h" +/* + * WARN: + * including this header does not make a lot of sense. + * You should just #include all necessary headers from Windows SDK, + * and then #include <util/system/win_undef.h> in order to undefine some common macros. + */ -#if defined(_win_) - - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN - #endif - - #ifndef NOMINMAX - #define NOMINMAX - #endif +#include <util/system/platform.h> +#if defined(_win_) #include <windows.h> - - #undef GetFreeSpace - #undef LoadImage - #undef GetMessage - #undef SendMessage - #undef DeleteFile - #undef OPTIONAL - #undef GetUserName - #undef CreateMutex - #undef GetObject - #undef GetGeoInfo - #undef GetClassName - #undef LANG_LAO - #undef GetKValue - #undef StartDoc - #undef UpdateResource - #undef GetNameInfo - #undef GetProp - #undef SetProp - #undef RemoveProp - - #undef IGNORE - #undef ERROR - #undef TRANSPARENT - - #undef CM_NONE - #endif + +#include <util/system/win_undef.h> |