about summary refs log tree commit diff
path: root/include/limits.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/limits.h')
-rw-r--r--include/limits.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/limits.h b/include/limits.h
index 61920c7d..6d7dfdbb 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -13,9 +13,13 @@
 #define UCHAR_MAX 255
 #define CHAR_MIN (-128)
 #define CHAR_MAX 127
-#define SSIZE_MAX LONG_MAX
 
 #define MB_LEN_MAX 4
+
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+
+#define SSIZE_MAX LONG_MAX
 #define TZNAME_MAX 6
 #define TTY_NAME_MAX 20
 #define HOST_NAME_MAX 255
@@ -100,3 +104,5 @@
 #define _XOPEN_PATH_MAX         1024
 
 #endif
+
+#endif