From owner-cvs-all Sun Sep 22 23:25:25 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 759FA37B401; Sun, 22 Sep 2002 23:25:20 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34DAE43E81; Sun, 22 Sep 2002 23:25:16 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 606A32A7D6; Sun, 22 Sep 2002 23:25:12 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Alfred Perlstein Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/pci tsunamireg.h src/sys/boot/ia64/skiload main.c src/sys/i386/include npx.h src/sys/ia64/include reg.h signal.h src/sys/sys cdefs.h In-Reply-To: <20020923061917.GG6262@elvis.mu.org> Date: Sun, 22 Sep 2002 23:25:12 -0700 From: Peter Wemm Message-Id: <20020923062512.606A32A7D6@canning.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > * Peter Wemm [020922 22:55] wrote: > > peter 2002/09/22 22:55:11 PDT > > > > Modified files: > > sys/alpha/pci tsunamireg.h > > sys/boot/ia64/skiload main.c > > sys/i386/include npx.h > > sys/ia64/include reg.h signal.h > > sys/sys cdefs.h > > Log: > > At great personal risk, add a __packed and __aligned(x) define that > > expand to __attribute__((packed)) and __attribute__((aligned(x))) > > respectively. Replace the handful of gcc-ism's that use > > __attribute__((aligned(16))) etc around the kernel with __aligned(16). > > > > There are over 400 __attribute__((packed)) to deal with, that can come > > later. I just want to use __packed in new code rather than add more > > gcc-ism's. > > I really like what you've done, however don't you think that the > places that do not have __packed/__aligned shouldn't have it defined > to nothing... therefore you can add: > > #ifndef __packed > #error you must define __packed or bad things will happen > #endif > #ifndef __aligned > #error you must define __aligned or bad things will happen > #endif > > Otherwise people may get compiled but very broken code > which most likely will be in critical things like device > drivers. I agree, sort of. But we need a lint case because the correct thing there is to define them to nothing. However, I think we should restrict this to inside #ifdef _KERNEL where we do control things. Otherwise things like bcc or tendra will blow up on a simple #include for a userland application that doesn't use any of these things. Maybe the correct thing is to leave them undefined and let the compiler cause the compile to blow up if they're used when they shouldn't be? That would solve the tendra and bcc etc cases. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message