]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Revert "tuklib_common: Define __has_warning if it is not defined."
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 23 Jan 2023 21:44:58 +0000 (23:44 +0200)
committerJia Tan <jiat0218@gmail.com>
Tue, 24 Jan 2023 12:20:51 +0000 (20:20 +0800)
This reverts commit 82e3c968bfa10e3ff13333bd9cbbadb5988d6766.

Macros in the reserved namespace (_foo or __foo) shouldn't be #defined
without a very good reason. Here the alternative would have been
to #define tuklib_has_warning(str) to an approriate value.

Also the tuklib_* files should stay namespace clean if possible.

src/common/tuklib_common.h

index 8942e625b50b9e385df9299db76bf4fcf7527f8d..b1f531ea4a68cdd2d7a250ae5603ee1f4ed88641 100644 (file)
 #      define TUKLIB_DOSLIKE 1
 #endif
 
-// Clang has a macro to check if the compiler supports a certain warning.
-// If this macro is used with a compiler that does not support this macro
-// (like gcc), then it will cause a preprocessor error.
-#ifndef __has_warning
-#      define __has_warning(warn) 0
-#endif
-
 #endif