summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/bits/xopen_lim.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/bits/xopen_lim.h')
-rw-r--r--libc/sysdeps/linux/common/bits/xopen_lim.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/bits/xopen_lim.h b/libc/sysdeps/linux/common/bits/xopen_lim.h
index 90cb54123..c2363ab04 100644
--- a/libc/sysdeps/linux/common/bits/xopen_lim.h
+++ b/libc/sysdeps/linux/common/bits/xopen_lim.h
@@ -68,7 +68,13 @@
/* Maximum value of `digit' in calls to the `printf' and `scanf'
functions. Posix dictates this should be a minimum of 9 */
+#if !defined(__UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__) || (__UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ <= 1)
+#undef NL_ARGMAX
+#elif __UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ < 9
#define NL_ARGMAX 9
+#else
+#define NL_ARGMAX __UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__
+#endif
/* Maximum number of bytes in a `LANG' name. We have no limit. */
#define NL_LANGMAX _POSIX2_LINE_MAX