sys/queue.h

Gert Doering gert at greenie.muc.de
Tue Mar 12 19:48:02 EST 2002


Hi,

On Mon, Mar 11, 2002 at 09:47:54PM -0600, Ben Lindstrom wrote:
> But also a good time to look at the code and go, "is there a better
> way of doing this without all this hacking".

What about having *two* openbsd-compat/fake-queue.h files?  One that
has the basic things (TAILQ_FIRST, TAILQ_END, TAILQ_NEXT, ...) and the 
second one has only only TAILQ_FOREACH().

I see three kinds of operating systems here:

 - full <sys/queue.h>, with TAILQ_FOREACH
     (OpenBSD)
     -> include system file
 - working <sys/queue.h>, but lacking TAILQ_FOREACH
     (AIX, BSDI)
     -> include system file plus "openbsd-compat/fake-tailq.h"
 - no <sys/queue.h> at all, or an unusable one.
     (SCO3 - has queue.h, but has no TAILQ_* macros)
     -> include "openbsd-compat/fake-queue.h" plus "fake-tailq.h"
     
so the test "do we need to include openbsd-compat/fake-queue.h or not"
is a bit too binary for this threefold problem...

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert at greenie.muc.de
fax: +49-89-35655025                        gert.doering at physik.tu-muenchen.de



More information about the openssh-unix-dev mailing list