From owner-freebsd-net  Sun Aug 26 23:39: 7 2001
Delivered-To: freebsd-net@freebsd.org
Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9])
	by hub.freebsd.org (Postfix) with ESMTP id 62E6437B405
	for <net@freebsd.org>; Sun, 26 Aug 2001 23:39:03 -0700 (PDT)
	(envelope-from julian@elischer.org)
Received: from elischer.org (InterJet.elischer.org [192.168.1.1])
	by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA71828;
	Sun, 26 Aug 2001 23:58:12 -0700 (PDT)
Message-ID: <3B89EA84.62FA4422@elischer.org>
Date: Sun, 26 Aug 2001 23:36:52 -0700
From: Julian Elischer <julian@elischer.org>
X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386)
X-Accept-Language: en, hu
MIME-Version: 1.0
To: Jun-ichiro itojun Hagino <itojun@iijlab.net>
Cc: Keiichi SHIMA <keiichi@iij.ad.jp>, net@freebsd.org,
	users@ipv6.org, core@kame.net
Subject: Re: IPV6/KAME/protosw integration cleanup
References: <20010827061439.E4ED97C1@starfruit.itojun.org>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Sender: owner-freebsd-net@FreeBSD.ORG
Precedence: bulk
List-ID: <freebsd-net.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/> (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-net>
List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-net>
X-Loop: FreeBSD.org

Jun-ichiro itojun Hagino wrote:
> 
> >I have still not heard any reason for the varargs here..
> >except "it's needed for portability"..
> >portability with WHO?
> 
>         portability with other *BSD projects (NetBSD, OpenBSD, BSD/OS, MacOSX
>         maybe).

are you suggesting that BSD/OS and MacOS/X have varargs?
Varargs are inherrently incompatible with switch tables
unless there is a format key (e.g. as in printf())
(I think NetBSD must have been crazy when they did it)

> 
> >BSD4.4 certainly didn't have varargs there....
> 
>         4.4BSD did not have prototype in protosw.h, there's no varargs either.
>         freebsd added prototype on its own, and thus change/broke some of the
>         existing xx{in,out}put prototypes.  netbsd/openbsd added varargs, to
>         keep existing practices in 4.4BSD.

they were too lazy to fix the problems.

I agree that we should fix protosw if it is deficient, but not with varargs.!

>         see it for yourself.

>         http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/protosw.h
>         http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/protosw.h
>         http://cvsweb.netbsd.org/bsdweb.cgi/syssrc/sys/sys/protosw.h



so what's wrong with adding a 

#ifdef USE_VARARGS
 	xxx_input(struct mbuf *m, va_alist)
#else
	xxx_input(struct mbuf *m, int offset)
#endif

at least we'd get rid of the d*mned warning messages!
Are you not aware that most of the warning messages for a normal
kernel compile come from the KAME code?  I am on compile  number 157
for the KSE code. (in 3 weeks)

I must look at those messages EVERY compile to check that they are not hiding a
real
problem there when I change things.

It is damaging to your reputation, and it certainly hurts my professional
reputation to have people say "yes but FreeBSD kernel has lived for
over a year with the same warning messages in a simple kernel compile".
I HAVE had people say something like this to me.

(The second worst module is acpi from intel)


> itojun

-- 
+------------------------------------+       ______ _  __
|   __--_|\  Julian Elischer         |       \     U \/ / hard at work in 
|  /       \ julian@elischer.org     +------>x   USA    \ a very strange
| (   OZ    )                                \___   ___ | country !
+- X_.---._/    presently in San Francisco       \_/   \\
          v

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