From owner-cvs-src@FreeBSD.ORG Fri Mar 12 14:46:31 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05FD016A4CE; Fri, 12 Mar 2004 14:46:31 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB98643D1F; Fri, 12 Mar 2004 14:46:30 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id E456C5C7D4; Fri, 12 Mar 2004 14:46:30 -0800 (PST) Date: Fri, 12 Mar 2004 23:46:30 +0100 From: Maxime Henrion To: Ruslan Ermilov Message-ID: <20040312224630.GG35475@elvis.mu.org> References: <20040312214545.7F3C216A4FA@hub.freebsd.org> <20040312223315.GE4588@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040312223315.GE4588@ip.net.ua> User-Agent: Mutt/1.4.1i cc: Tom Rhodes cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/boot/arc/include arcfuncs.h src/sys/boot/i386/boot2 boot2.c src/sys/dev/aic7xxx/aicasm aicasm.c src/sys/dev/cx machdep.h src/sys/dev/ichsmb ichsmb.c src/sys/dev/iir iir.h src/sys/dev/isp ispvar.h src/sys/dev/mcd mcdreg.h ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2004 22:46:31 -0000 Ruslan Ermilov wrote: > On Fri, Mar 12, 2004 at 01:45:45PM -0800, Tom Rhodes wrote: > [...] > > Index: src/sys/dev/mcd/mcdreg.h > > > > -#ifdef __GNUC__ > > -#if __GNUC__ >= 2 > > +#if defined(__GNUC__) || defined(__INTEL_COMPILER) > > +#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) > > #pragma pack(1) > > #endif > > #endif > > > > -#ifdef __GNUC__ > > -#if __GNUC__ >= 2 > > +#if defined(__GNUC__) || defined(__INTEL_COMPILER) > > +#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) > > #pragma pack(4) > > #endif > > #endif > > > These ifdefs are broken. > > #if (defined(__GNUC__) && __GNUC >= 2) || defined(__INTEL_COMPILER) > > would be more correct. > > > Index: src/sys/dev/scd/scdreg.h > > -#ifdef __GNUC__ > > -#if __GNUC__ >= 2 > > +#if defined(__GNUC__) || defined(__INTEL_COMPILER) > > +#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) > > #pragma pack(1) > > #endif > > #endif > > > Ditto. > > > Index: src/sys/i386/i386/in_cksum.c > [...] > > +#if !defined(__GNUC__) || defined(__INTEL_COMPILER) > > > What, __INTEL_COMPILER can have __GNUC__ defined? > > > Index: src/sys/i386/include/_types.h > > diff -u src/sys/i386/include/_types.h:1.7 src/sys/i386/include/_types.h:1.8 > > --- src/sys/i386/include/_types.h:1.7 Sat Mar 29 21:24:52 2003 > > +++ src/sys/i386/include/_types.h Fri Mar 12 13:45:29 2004 > > @@ -113,12 +113,12 @@ > > /* > > * Unusual type definitions. > > */ > > -#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) > > +#if (defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER)) > > > Redundant surrounding parenthesis. > > > Index: src/sys/i386/include/in_cksum.h > [...] > > +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) > > > I think these are mutually exclusive already, no? > > > Index: src/sys/i386/include/stdarg.h > [...] > > -#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) > > +#if (defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER)) > > > Redundant parenthesis. > > > Index: src/sys/sys/cdefs.h > > -#ifndef __GNUC__ > > +#if !(defined(__GNUC__) || defined(__INTEL_COMPILER)) > > > Mechanical non-optimized changes? ;) > > > -#if !__GNUC_PREREQ__(2, 5) > > +#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) > > > Better than above. ;) It would be even better IMHO if you had used __GNUC_PREREQ__ in other files, to simplify all those tests. There is however one small nit with __GNUC_PREREQ__, that bde@ pointed to me in that in FreeBSD, we usually prefer calling this kind of macros __GNUC_PREREQ, ie without the underscores at the end. I left them in for now because I wanted to keep compatibility with OpenBSD (and NetBSD too IIRC), from which it was taken. If most people feel we should remove those, I'm not opposed to it either (this _doesn't_ mean "let's go for another bikshed", thanks). Cheers, Maxime