From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 13 19:26:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAFCC16A41F; Wed, 13 Jul 2005 19:26:36 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20E2043D49; Wed, 13 Jul 2005 19:26:36 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.91] ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j6DJQSms088450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Jul 2005 12:26:30 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <42D56C15.2070400@errno.com> Date: Wed, 13 Jul 2005 12:31:33 -0700 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050327) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Giorgos Keramidas References: <42D3E8D9.6020105@xbsd.org> <20050712221444.GA1180@gothmog.gr> In-Reply-To: <20050712221444.GA1180@gothmog.gr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Florent Thoumie Subject: Re: SIMPLEQ_* macros from OpenBSD sys/queue.h X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2005 19:26:36 -0000 Giorgos Keramidas wrote: > On 2005-07-12 17:59, Florent Thoumie wrote: > >>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 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 ? > > > OpenBSD tries to keep this header in sync with NetBSD, AFAICT from the > cvs logs in their tree. > > 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. > > If you have changes that depend on SIMPLEQ_* that could serve as a test > case that you can share, it would be nice too :-) 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 Not sure who's to blaim for this but it'd be nice to unify the names so drivers don't need portability shims like this. Sam