From owner-freebsd-current Sun Oct 20 17:53:32 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA08103 for current-outgoing; Sun, 20 Oct 1996 17:53:32 -0700 (PDT) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA08095; Sun, 20 Oct 1996 17:53:29 -0700 (PDT) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.0/CET-v2.1) with SMTP id AAA20517; Mon, 21 Oct 1996 00:53:27 GMT Date: Mon, 21 Oct 1996 09:53:27 +0900 (JST) From: Michael Hancock Reply-To: Michael Hancock To: phk@FreeBSD.ORG cc: current@FreeBSD.ORG Subject: Re: In-Reply-To: <24020.845822819@critter.tfs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk For a good explanation of why you only want to use typedefs for scalar types and function types see "Expert C Programming" by Van der Linden, SunPress. It's a biased book, but it does contain a lot of good stuff on C. Regards, Mike Hancock On Sun, 20 Oct 1996, Poul-Henning Kamp wrote: > As much as I like this file there's one detail that I hate: > > /* > * Singly-linked List definitions. > */ > #define SLIST_HEAD(name, type) \ > struct name { \ > - struct type *slh_first; /* first element */ \ > + type *slh_first; /* first element */ \ > } > > If I have something like this: > > typedef struct geom_req_s geom_req; > > struct geom_req_s { > ... > }; > > How can I add a any of the types from to this data-type > in a clean fashion ? All other use the typedef, but for the queues > I have to use the struct name. > > Is it too late to fix this oversight in ? >