diff options
| author | Mattias Andrée <m@maandree.se> | 2025-12-27 11:29:31 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2025-12-27 11:29:31 +0100 |
| commit | a72264006b738c8aa3d49d7835a86bcce130d20d (patch) | |
| tree | e29423bcaaa1341b19ce9febd3f8de9fc0f95983 /common.h | |
| parent | Fix libj2_j2u_add_j2u_overflow_p (diff) | |
| download | libj2-a72264006b738c8aa3d49d7835a86bcce130d20d.tar.gz libj2-a72264006b738c8aa3d49d7835a86bcce130d20d.tar.bz2 libj2-a72264006b738c8aa3d49d7835a86bcce130d20d.tar.xz | |
Add signed arithmetics
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | common.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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 <stdlib.h> # include <stdio.h> # include <string.h> |
