From fb9454705c02bdd638e6f7207c5622dce8af02a0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 8 Oct 2015 01:40:36 +0200 Subject: on some systems, va_start and va_end contains { and }, respetively, therefore, if _PORTABLE_SOURCE or _LIBRARY_HEADER is defined, they should here too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/stdarg.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/stdarg.h') diff --git a/include/stdarg.h b/include/stdarg.h index 801e5e8..bc07813 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -52,7 +52,11 @@ typedef __builtin_va_list va_list; * @param last:identifier The the last non-variadic argument. */ #ifndef va_start -# define va_start(state, last) __builtin_va_start(state, last) +# ifndef __PORTABLE +# define va_start(state, last) __builtin_va_start(state, last) +# else +# define va_start(state, last) { __builtin_va_start(state, last) +# endif #endif /** @@ -61,7 +65,11 @@ typedef __builtin_va_list va_list; * @param state:va_list The state of the variadic argument-reading. */ #ifndef va_end -# define va_end(state) __builtin_va_end(state) +# ifndef __PORTABLE +# define va_end(state) __builtin_va_end(state) +# else +# define va_end(state) } __builtin_va_end(state) +# endif #endif /** -- cgit v1.2.3-70-g09d2