From owner-freebsd-questions Thu Oct 12 9:54:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 472DF37B66E for ; Thu, 12 Oct 2000 09:54:38 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e9CGs2K07301; Thu, 12 Oct 2000 09:54:02 -0700 (PDT) Date: Thu, 12 Oct 2000 09:54:02 -0700 From: Alfred Perlstein To: Karganov Konstantin Cc: freebsd-questions@FreeBSD.ORG Subject: Re: undefined macro in sys/socket.h Message-ID: <20001012095402.G272@fw.wintelcom.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: ; from kostik@balrog.po.cs.msu.su on Thu, Oct 12, 2000 at 08:02:12PM +0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Karganov Konstantin [001012 09:08] wrote: > > sys/socket.h uses macro ALIGN() and neither defines it nor includes > correct header ( machine/param.h ?) > It's a bug or a feature? > > (Surely it's not a problem to include it manually, but... > ...isn't it the thing '#include' was desighned for?) #include shouldn't be a catch-all for such things, for instance one needs to include sys/types.h before including sys/socket.h. I'm not sure about the machine/param.h issue for ALIGN, I have this in my code that uses filedescriptor passing: /* solaris needs this to show proper fields */ #define _XPG4_2 #include #include #include #ifdef __FreeBSD__ #include #endif #if defined(SOLARIS) || defined(AIX4) #include #else #include #endif *shrug*, seems to do the trick pretty portably. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message