From: Joel Rosdahl Date: Sun, 28 Nov 2010 14:23:05 +0000 (+0100) Subject: Correct location of rpl_* defines to outside "#if !HAVE_VSNPRINTF" X-Git-Tag: v3.1.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e113d8a816f79398db55b7dbd5df5a9bffdb71ec;p=thirdparty%2Fccache.git Correct location of rpl_* defines to outside "#if !HAVE_VSNPRINTF" --- diff --git a/snprintf.c b/snprintf.c index 600eff2d6..e1b86f286 100644 --- a/snprintf.c +++ b/snprintf.c @@ -293,6 +293,23 @@ #define VA_SHIFT(ap, value, type) value = va_arg(ap, type) #endif /* HAVE_STDARG_H */ +#if !HAVE_VSNPRINTF +int rpl_vsnprintf(char *, size_t, const char *, va_list); +#define vsnprintf rpl_vsnprintf +#endif +#if !HAVE_SNPRINTF +int rpl_snprintf(char *, size_t, const char *, ...); +#define snprintf rpl_snprintf +#endif +#if !HAVE_VASPRINTF +int rpl_vasprintf(char **, const char *, va_list); +#define vasprintf rpl_vasprintf +#endif +#if !HAVE_ASPRINTF +int rpl_asprintf(char **, const char *, ...); +#define asprintf rpl_asprintf +#endif + #if !HAVE_VASPRINTF #if HAVE_STDLIB_H #include /* For malloc(3). */ @@ -524,23 +541,6 @@ static LDOUBLE mypow10(int); extern int errno; -#if !HAVE_VSNPRINTF - int rpl_vsnprintf(char *, size_t, const char *, va_list); - #define vsnprintf rpl_vsnprintf -#endif -#if !HAVE_SNPRINTF - int rpl_snprintf(char *, size_t, const char *, ...); - #define snprintf rpl_snprintf -#endif -#if !HAVE_VASPRINTF - int rpl_vasprintf(char **, const char *, va_list); - #define vasprintf rpl_vasprintf -#endif -#if !HAVE_ASPRINTF - int rpl_asprintf(char **, const char *, ...); - #define asprintf rpl_asprintf -#endif - int rpl_vsnprintf(char *str, size_t size, const char *format, va_list args) {