1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-13 14:40:22 +00:00

Fix for non-GCC compilers.

Approved by:	re (jhb)
This commit is contained in:
David E. O'Brien 2002-11-27 16:28:18 +00:00
parent f7b5becb5c
commit 6380ce4de1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107317

View File

@ -64,17 +64,16 @@ typedef __va_list va_list;
#else /* ! __GNUC__ post GCC 2.95 */
#ifdef __GNUC__
#define __va_size(type) \
(((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
#ifdef __GNUC__
#define va_start(ap, last) \
((ap) = (va_list)__builtin_next_arg(last))
#else
#else /* non-GNU compiler */
#define va_start(ap, last) \
((ap) = (va_list)&(last) + __va_size(last))
#endif
#endif /* __GNUC__ */
#define va_arg(ap, type) \
(*(type *)((ap) += __va_size(type), (ap) - __va_size(type)))