Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2005 21:43:07 +0200
From:      Florent Thoumie <flz@xbsd.org>
To:        Sam Leffler <sam@errno.com>
Cc:        freebsd-hackers@freebsd.org, Giorgos Keramidas <keramida@freebsd.org>
Subject:   Re: SIMPLEQ_* macros from OpenBSD sys/queue.h
Message-ID:  <1121283787.25962.7.camel@cream.xbsd.org>
In-Reply-To: <42D56C15.2070400@errno.com>
References:  <42D3E8D9.6020105@xbsd.org> <20050712221444.GA1180@gothmog.gr> <42D56C15.2070400@errno.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-BvQLNbzNCIrizSIGJy3J
Content-Type: text/plain; charset=iso8859-15
Content-Transfer-Encoding: quoted-printable

Le Mercredi 13 juillet 2005 =E0 12:31 -0700, Sam Leffler a =E9crit :
> Giorgos Keramidas wrote:
> > On 2005-07-12 17:59, Florent Thoumie <flz@xbsd.org> wrote:
> >=20
> >>I'm currently working on OpenBGPd port update and I'm facing a little
> >>problem that is actually quite painful to deal with.
> >>
> >>I need some macros from OpenBSD sys/queue.h which aren't present in
> >>FreeBSD. I can replace #include <sys/queue.h> with #include "queue.h"
> >>and copy the file in the working directory but this leads to having
> >>more than 10 patches.
> >>
> >>Yeah I'm using REINPLACE_CMD, but sometimes sys/queue.h is a hidden
> >>"dependency" (by hidden, I mean it's included by an included header
> >>file, and doesn't show up directly in the source file).
> >>
> >>So, could somebody consider merging these SIMPLEQ_* macros or even
> >>synchronize FreeBSD and OpenBSD versions ?
> >=20
> >=20
> > OpenBSD tries to keep this header in sync with NetBSD, AFAICT from the
> > cvs logs in their tree.
> >=20
> > I have the queue.h headers from all three on my disk and I'm already
> > looking at the differences, so if you don't mind waiting 1-2 days so
> > that I can run any changes through a buildworld I'll give it a try.
> >=20
> > If you have changes that depend on SIMPLEQ_* that could serve as a test
> > case that you can share, it would be nice too :-)
>=20
> trouble% grep STAILQ /sys/dev/ubsec/ubsec.c
> #define SIMPLEQ_HEAD            STAILQ_HEAD
> #define SIMPLEQ_ENTRY           STAILQ_ENTRY
> #define SIMPLEQ_INIT            STAILQ_INIT
> #define SIMPLEQ_INSERT_TAIL     STAILQ_INSERT_TAIL
> #define SIMPLEQ_EMPTY           STAILQ_EMPTY
> #define SIMPLEQ_FIRST           STAILQ_FIRST
> #define SIMPLEQ_REMOVE_HEAD     STAILQ_REMOVE_HEAD_UNTIL
> #define SIMPLEQ_FOREACH         STAILQ_FOREACH
>=20
> Not sure who's to blaim for this but it'd be nice to unify the names so=20
> drivers don't need portability shims like this.

	Not sure if we (or OpenBSD/NetBSD) will change STAILQ for=20
	SIMPLEQ (or the opposite), but having STAILQ_REMOVE_HEAD instead
	of STAILQ_REMOVE_HEAD_UNTIL would be nice so that there are no=20
	special case (actually, I just sed 's/SIMPLEQ/STAILQ' since it=20
	doesn't seem to use SIMPLEQ_REMOVE_HEAD).

--=20
Florent Thoumie
flz@xbsd.org

--=-BvQLNbzNCIrizSIGJy3J
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQBC1W7LMxEkbVFH3PQRAshJAJ41Bq7gsR5czTj34WEhL0IjPNdf/wCghU2z
m6trEgyMziZyjKYh8RiLbN8=
=E/ra
-----END PGP SIGNATURE-----

--=-BvQLNbzNCIrizSIGJy3J--




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