mirror of
https://github.com/mirror/wget.git
synced 2025-03-25 01:00:13 +08:00
* src/utils.c: Move macro FMT_MAX_LENGTH into scope
This commit is contained in:
parent
f2574e90b7
commit
366d82f349
14
src/utils.c
14
src/utils.c
@ -298,13 +298,6 @@ sepstring (const char *s)
|
||||
vsnprintf until the correct size is found. Since Wget also ships a
|
||||
fallback implementation of vsnprintf, this should be portable. */
|
||||
|
||||
/* Constant is using for limits memory allocation for text buffer.
|
||||
Applicable in situation when: vasprintf is not available in the system
|
||||
and vsnprintf return -1 when long line is truncated (in old versions of
|
||||
glibc and in other system where C99 doesn`t support) */
|
||||
|
||||
#define FMT_MAX_LENGTH 1048576
|
||||
|
||||
char *
|
||||
aprintf (const char *fmt, ...)
|
||||
{
|
||||
@ -324,6 +317,13 @@ aprintf (const char *fmt, ...)
|
||||
return str;
|
||||
#else /* not HAVE_VASPRINTF */
|
||||
|
||||
/* Constant is using for limits memory allocation for text buffer.
|
||||
Applicable in situation when: vasprintf is not available in the system
|
||||
and vsnprintf return -1 when long line is truncated (in old versions of
|
||||
glibc and in other system where C99 doesn`t support) */
|
||||
|
||||
#define FMT_MAX_LENGTH 1048576
|
||||
|
||||
/* vasprintf is unavailable. snprintf into a small buffer and
|
||||
resize it as necessary. */
|
||||
int size = 32;
|
||||
|
Loading…
Reference in New Issue
Block a user