Date: Thu, 18 Oct 2001 13:37:29 +0300 From: Ruslan Ermilov <ru@FreeBSD.ORG> To: Mark Santcroos <marks@ripe.net> Cc: obrien@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: commit to ansi.h Message-ID: <20011018133729.A7667@sunbay.com> In-Reply-To: <20011018105311.D508@laptop.6bone.nl>; from marks@ripe.net on Thu, Oct 18, 2001 at 10:53:11AM %2B0200 References: <20011018105311.D508@laptop.6bone.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 18, 2001 at 10:53:11AM +0200, Mark Santcroos wrote: > Hi David > > >From sys/i386/include/ansi.h: > > (1) #if defined __GNUC__ > (2) #if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95) > (3) #define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */ > (4) #endif > (5) typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ > (6) #else > (7) #define _BSD_VA_LIST_ char * /* va_list */ > (8) #endif /*__GNUC__*/ > > On my system, (1) is TRUE, (2) is FALSE, so in (5) _BSD_VA_LIST_ is > undefined. (which breaks building a kernel, and probably more) > > Placing a (7) before (5) solves the problem. > _BSD_VA_LIST_ is needed for non-GCC compilers as well. Please see attached for the correct patch. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --RnlQjJ0d97Da+TV1 Content-Type: message/rfc822 Content-Disposition: inline Date: Thu, 18 Oct 2001 12:20:08 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: "David E. O'Brien" <obrien@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/include ansi.h src/sys/i386/include ansi.h src/sys/ia64/include ansi.h src/sys/powerpc/include ansi.h src/sys/sparc64/include ansi.h Message-ID: <20011018122008.A99048@sunbay.com> References: <200110180027.f9I0Rd850796@freefall.freebsd.org> <20011018115810.A87594@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011018115810.A87594@sunbay.com>; from ru@FreeBSD.org on Thu, Oct 18, 2001 at 11:58:10AM +0300 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 18, 2001 at 11:58:10AM +0300, Ruslan Ermilov wrote: > The below change breaks 4.4-STABLE -> 5.0-CURRENT upgrade path: > [...] > : /usr/obj/CURRENT/usr/src/i386/usr/include/machine/ansi.h:78: syntax error before `__gnuc_va_list' > : /usr/obj/CURRENT/usr/src/i386/usr/include/machine/ansi.h:78: warning: type defaults to `int' in declaration of `__gnuc_va_list' > : /usr/obj/CURRENT/usr/src/i386/usr/include/machine/ansi.h:78: warning: data definition has no type or storage class > : *** Error code 1 [...] > In 4.4-STABLE, the following are defined: > > #define __GNUC__ 2 > #define __GNUC_MINOR__ 95 > > and _BSD_VA_LIST_ is undefined. The attached patch should fix this. > Also, the ia64/include/ansi.h doesn't have __GNUC__ version checks > thus making it impossible to cross-upgrade from 4.4-STABLE i386 to > 5.0-CURRENT ia64. Has this been considered? > The previous patch was bogus -- _BSD_VA_LIST_ is required for non-GCC compilers as well. The attached is believed to be the right version. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: sys/alpha/include/ansi.h =================================================================== RCS file: /home/ncvs/src/sys/alpha/include/ansi.h,v retrieving revision 1.18 diff -u -r1.18 ansi.h --- sys/alpha/include/ansi.h 2001/10/18 00:27:37 1.18 +++ sys/alpha/include/ansi.h 2001/10/18 09:18:09 @@ -72,11 +72,8 @@ #define _BSD_OFF_T_ long /* file offset */ #define _BSD_PID_T_ int /* process [group] */ -#if defined __GNUC__ -#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) #define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */ -#endif -typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #else typedef struct { char *__base; @@ -85,6 +82,10 @@ } __va_list; #define _BSD_VA_LIST_ __va_list /* va_list */ #endif /*__GNUC__*/ + +#ifdef __GNUC__ +typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ +#endif /* * The rune type above is declared to be an ``int'' instead of the more natural Index: sys/i386/include/ansi.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/ansi.h,v retrieving revision 1.28 diff -u -r1.28 ansi.h --- sys/i386/include/ansi.h 2001/10/18 00:27:38 1.28 +++ sys/i386/include/ansi.h 2001/10/18 09:18:09 @@ -71,14 +71,15 @@ #define _BSD_OFF_T_ __int64_t /* file offset */ #define _BSD_PID_T_ int /* process [group] */ -#if defined __GNUC__ -#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) #define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */ -#endif -typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #else #define _BSD_VA_LIST_ char * /* va_list */ #endif /*__GNUC__*/ + +#ifdef __GNUC__ +typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ +#endif /* * The rune type above is declared to be an ``int'' instead of the more natural Index: sys/ia64/include/ansi.h =================================================================== RCS file: /home/ncvs/src/sys/ia64/include/ansi.h,v retrieving revision 1.11 diff -u -r1.11 ansi.h --- sys/ia64/include/ansi.h 2001/10/18 00:27:38 1.11 +++ sys/ia64/include/ansi.h 2001/10/18 09:18:10 @@ -72,7 +72,7 @@ #define _BSD_OFF_T_ long /* file offset */ #define _BSD_PID_T_ int /* process [group] */ -#if defined __GNUC__ +#ifdef __GNUC__ #define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */ typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #else Index: sys/powerpc/include/ansi.h =================================================================== RCS file: /home/ncvs/src/sys/powerpc/include/ansi.h,v retrieving revision 1.10 diff -u -r1.10 ansi.h --- sys/powerpc/include/ansi.h 2001/10/18 00:27:38 1.10 +++ sys/powerpc/include/ansi.h 2001/10/18 09:18:12 @@ -71,11 +71,8 @@ #define _BSD_OFF_T_ __int64_t /* file offset */ #define _BSD_PID_T_ int /* process [group] */ -#if defined __GNUC__ -#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) #define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */ -#endif -typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #else typedef struct { char __gpr; @@ -86,6 +83,10 @@ } __va_list; #define _BSD_VA_LIST_ __va_list /* va_list */ #endif /*__GNUC__*/ + +#ifdef __GNUC__ +typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ +#endif /* * The rune type above is declared to be an ``int'' instead of the more natural Index: sys/sparc64/include/ansi.h =================================================================== RCS file: /home/ncvs/src/sys/sparc64/include/ansi.h,v retrieving revision 1.5 diff -u -r1.5 ansi.h --- sys/sparc64/include/ansi.h 2001/10/18 00:27:39 1.5 +++ sys/sparc64/include/ansi.h 2001/10/18 09:18:12 @@ -72,14 +72,15 @@ #define _BSD_OFF_T_ long /* file offset */ #define _BSD_PID_T_ int /* process [group] */ -#if defined __GNUC__ -#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) #define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */ -#endif -typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #else #define _BSD_VA_LIST_ char * /* va_list */ #endif /*__GNUC__*/ + +#ifdef __GNUC__ +typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ +#endif /* * The rune type above is declared to be an ``int'' instead of the more natural --oyUTqETQ0mS9luUI-- --RnlQjJ0d97Da+TV1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011018133729.A7667>
