diff options
author | Eric Blake <eblake@redhat.com> | 2007-04-24 16:01:15 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2007-04-24 16:01:15 +0000 |
commit | 68f2517f722ea38e90b9e0d3f22182e03a4354df (patch) | |
tree | 7f52f26f557a8903a0299ae3b823435adf28d50c /newlib/libc | |
parent | 714d0b7a88aeeec4fb13b846102c7c61217680eb (diff) | |
download | newlib-68f2517f722ea38e90b9e0d3f22182e03a4354df.zip newlib-68f2517f722ea38e90b9e0d3f22182e03a4354df.tar.gz newlib-68f2517f722ea38e90b9e0d3f22182e03a4354df.tar.bz2 |
* libc/include/limits.h (NL_ARGMAX): Define a default value.
* libc/stdio/vfprintf.c (MAX_POS_ARGS): Define in terms of
NL_ARGMAX, if present.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/include/limits.h | 6 | ||||
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/newlib/libc/include/limits.h b/newlib/libc/include/limits.h index 53a7a41..137ebe6 100644 --- a/newlib/libc/include/limits.h +++ b/newlib/libc/include/limits.h @@ -9,6 +9,11 @@ # define MB_LEN_MAX 1 # endif +/* Maximum number of positional arguments, if _WANT_IO_POS_ARGS. */ +# ifndef NL_ARGMAX +# define NL_ARGMAX 32 +# endif + /* if do not have #include_next support, then we have to define the limits here. */ # if !defined __GNUC__ || __GNUC__ < 2 @@ -124,4 +129,3 @@ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ # include_next <limits.h> #endif /* __GNUC__ && !_GCC_LIMITS_H_ */ - diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 0e40a3e..0f9f78b 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -320,7 +320,11 @@ typedef int * int_ptr_t; typedef short * short_ptr_t; #ifndef _NO_POS_ARGS -#define MAX_POS_ARGS 32 +# ifdef NL_ARGMAX +# define MAX_POS_ARGS NL_ARGMAX +# else +# define MAX_POS_ARGS 32 +# endif union arg_val { |