From: Sebastien Bourdeauducq Date: Sat, 2 Jun 2012 15:12:37 +0000 (+0200) Subject: software: stdarg.h: cleanup and add va_copy X-Git-Tag: 24jan2021_ls180~3138 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=964dc8050c8ac5b1f307068d6379d0a8f72d7b6e;p=litex.git software: stdarg.h: cleanup and add va_copy --- diff --git a/software/include/base/stdarg.h b/software/include/base/stdarg.h index 4e11f283..1d15836a 100644 --- a/software/include/base/stdarg.h +++ b/software/include/base/stdarg.h @@ -3,20 +3,11 @@ #include -#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) -#define va_start(v,l) __builtin_va_start((v),l) -#else -#define va_start(v,l) __builtin_stdarg_start((v),l) -#endif - -#define va_arg(ap, type) \ - __builtin_va_arg((ap), type) - -#define va_end(ap) \ - __builtin_va_end(ap) - -#define va_list \ - __builtin_va_list +#define va_start(v, l) __builtin_va_start((v), l) +#define va_arg(ap, type) __builtin_va_arg((ap), type) +#define va_copy(aq, ap) __builtin_va_copy((aq), (ap)) +#define va_end(ap) __builtin_va_end(ap) +#define va_list __builtin_va_list int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);