Date: Tue, 26 Nov 2002 19:42:19 -0800 From: Juli Mallett <jmallett@FreeBSD.org> To: freebsd-standards@FreeBSD.org, re@FreeBSD.org Subject: Approval to fix non-GCC users of <stdarg.h> Message-ID: <20021126194219.A92609@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
The following patch fixes <stdarg.h> for use on i386 with non-GCC consumers... __va_size is defined inside an if GNUC block, but not used solely within an if GNUC block. This allows me to compile a number of pieces of software I work on with TenDRA 4.1.2 on -CURRENT again. It only "affects" things that would break, behaviour stays the same for modern GCC (unrelated block) and for old GCC (definition still in scope). I'd like to get approval to get this in for 5.0. %%% Index: sys/i386/include/stdarg.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/stdarg.h,v retrieving revision 1.17 diff -b -d -w -u -r1.17 stdarg.h --- sys/i386/include/stdarg.h 6 Oct 2002 22:01:06 -0000 1.17 +++ sys/i386/include/stdarg.h 27 Nov 2002 03:38:07 -0000 @@ -64,11 +64,10 @@ #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 %%% Thanks, juli. -- Juli Mallett <jmallett@FreeBSD.org> OpenDarwin, Mono, FreeBSD Developer. ircd-hybrid Developer, EFnet addict. FreeBSD on MIPS-Anything on FreeBSD. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021126194219.A92609>