extensive header cleanup for standards conformance & correctness
[musl] / include / limits.h
index 4499afb..6757012 100644 (file)
 #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
@@ -23,7 +27,8 @@
 /* Implementation choices... */
 
 #define PTHREAD_KEYS_MAX  1024
-#define PTHREAD_STACK_MIN (2*PAGE_SIZE)
+#define PTHREAD_STACK_MIN PAGE_SIZE
+#define PTHREAD_DESTRUCTOR_ITERATIONS 4
 
 /* Arbitrary numbers... */
 
@@ -44,6 +49,8 @@
 #define NL_SETMAX 255
 #define NL_TEXTMAX 2048
 
+#endif
+
 /* POSIX/SUS requirements follow. These numbers come directly
  * from SUS and have nothing to do with the host system. */
 
@@ -51,6 +58,7 @@
 #define _POSIX_AIO_MAX          1
 #define _POSIX_ARG_MAX          4096
 #define _POSIX_CHILD_MAX        25
+#define _POSIX_CLOCKRES_MIN     20000000
 #define _POSIX_DELAYTIMER_MAX   32
 #define _POSIX_HOST_NAME_MAX    255
 #define _POSIX_LINK_MAX         8