summaryrefslogtreecommitdiff
path: root/tests/tset_sj.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tset_sj.c')
-rw-r--r--tests/tset_sj.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tset_sj.c b/tests/tset_sj.c
index 4f75f2bcd..c43dbd7c6 100644
--- a/tests/tset_sj.c
+++ b/tests/tset_sj.c
@@ -28,6 +28,13 @@ MA 02111-1307, USA. */
#include <stdlib.h>
#include <limits.h>
+/* The ISO C99 standard specifies that in C++ implementations the
+ INTMAX_MAX, ... macros should only be defined if explicitly requested. */
+#if defined __cplusplus
+# define __STDC_LIMIT_MACROS
+# define __STDC_CONSTANT_MACROS
+#endif
+
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif