From a72264006b738c8aa3d49d7835a86bcce130d20d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 27 Dec 2025 11:29:31 +0100 Subject: Add signed arithmetics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'common.h') diff --git a/common.h b/common.h index 876d2ef..54f1e2e 100644 --- a/common.h +++ b/common.h @@ -1,13 +1,8 @@ /* See LICENSE file for copyright and license details. */ +#define LIBJ2_COMPILING_ #include "libj2.h" -#if defined(__GNUC__) -# define CONST __attribute__((__const__)) -# define PURE __attribute__((__pure__)) -#else -# define CONST -# define PURE -#endif +#define PURE LIBJ2_PURE_ #if defined(__clang__) # pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* broken warning, spams false positives */ @@ -15,6 +10,11 @@ #endif #ifdef TEST +# if defined(__GNUC__) +# define CONST __attribute__((__const__)) +# else +# define CONST +# endif # include # include # include -- cgit v1.2.3-70-g09d2