Skip to content

Commit

Permalink
Correct location of rpl_* defines to outside "#if !HAVE_VSNPRINTF"
Browse files Browse the repository at this point in the history
  • Loading branch information
jrosdahl committed Nov 28, 2010
1 parent 11584a8 commit e113d8a
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdlib.h> /* For malloc(3). */
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit e113d8a

Please sign in to comment.