Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  3 Oct 2000 01:08:16 -0700 (PDT)
From:      hsu@FreeBSD.ORG (Jeffrey Hsu)
To:        current@FreeBSD.ORG
Subject:   Re: #include <struct.h> in <sys/queue.h>
Message-ID:  <20001003080816.9D03137B502@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
  > I think <struct.h> should have been removed when offsetof() became
  > standard.

At last count, offsetof() is defined in 11 different places in the kernel:
    alpha/alpha/machdep.c, line 234 
    dev/sym/sym_hipd.c, line 347 
    i386/i386/machdep.c, line 246 
    kern/sysv_sem.c, line 110 
    kern/uipc_usrreq.c, line 548 
    netinet/ip_compat.h, line 56 
    netinet/ip_fil.h, line 254 
    netinet6/icmp6.c, line 761 
    netinet6/in6_proto.c, line 126 
    netinet6/raw_ip6.c, line 348 
    pc98/i386/machdep.c, line 254 
If we unify it in one header file, I'd be happy to use that for STAILQ_LAST().

  > strbase() is now used in <sys/queue.h>.  It is
  > easy to implement directly using offsetof().  Unfortunately, if it is
  > implemented using offsetof(), then <sys/queue.h> will depend on
  > <stddef.h>.

So, what's the correct solution?


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001003080816.9D03137B502>