Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2001 23:36:52 -0700
From:      Julian Elischer <julian@elischer.org>
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
Message-ID:  <3B89EA84.62FA4422@elischer.org>
References:  <20010827061439.E4ED97C1@starfruit.itojun.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B89EA84.62FA4422>