From: Lasse Collin Date: Mon, 23 Jan 2023 21:44:58 +0000 (+0200) Subject: Revert "tuklib_common: Define __has_warning if it is not defined." X-Git-Tag: v5.5.1alpha~450 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f78ecc5939b3d97ddfc2a6bd31b50108a28d0a2;p=thirdparty%2Fxz.git Revert "tuklib_common: Define __has_warning if it is not defined." 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. --- diff --git a/src/common/tuklib_common.h b/src/common/tuklib_common.h index 8942e625..b1f531ea 100644 --- a/src/common/tuklib_common.h +++ b/src/common/tuklib_common.h @@ -68,11 +68,4 @@ # 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