aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common.h14
1 files changed, 7 insertions, 7 deletions
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 <stdlib.h>
# include <stdio.h>
# include <string.h>