Date: Sun, 6 Jun 2010 03:20:34 +0200 From: Luigi Rizzo <rizzo@iet.unipi.it> To: Randall Stewart <rrs@lakerest.net> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r208857 - head/sys/netinet Message-ID: <20100606012034.GA56426@onelab2.iet.unipi.it> In-Reply-To: <3A129572-D7A0-4211-AB71-21C808981C37@lakerest.net> References: <201006052139.o55LdrBK045695@svn.freebsd.org> <20100606004429.GC56080@onelab2.iet.unipi.it> <3A129572-D7A0-4211-AB71-21C808981C37@lakerest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 05, 2010 at 05:53:55PM -0700, Randall Stewart wrote: > Luigi: > > We on the SCTP team ;-) have always worked under the > constraint of "scrubbing out" with un-ifdef loads of stuff for > > - Windows > - MacOS-X > - User-Space Implementation > - Panda (translated IOS-XR) > > Now there is a HUGE amount of cruft that has some ugly ifdef's in it > which > I was told way back was a no-no.... (I was also told unifdef is your > friend ;-D) > > Anyway.. I would be more than glad to bring back the "full" code if > folks would all agree.. it actually makes it a lot easier when you > are debugging to have the precise line number instead of working between > two worlds ;-) > > But of course we would have to get agreement from quite a few folks... > but > I am game ;-) as a data point, i went through a similar problem when i ported ipfw+dummynet to linux and windows, and as you can see from the code in HEAD, the amount of OS-dependent code in the common files is minimal (much much less than in the first versions). Being ashamed of committing large #ifdef sections was a big motivator for trying to pack os-dependent parts in os-specific files and leave the core as clean as possible In the case of SCTP, i don't think anyone but the SCTP team would put hands or think of modifying the code, so if FreeBSD trusts your code (which obviously is the case), and as long as there no licensing issues (this is something you can tell us) I don't see why people should object on having the unscrubbed code. cheers luigi > R > On Jun 5, 2010, at 5:44 PM, Luigi Rizzo wrote: > > >On Sat, Jun 05, 2010 at 09:39:53PM +0000, Randall Stewart wrote: > >>Author: rrs > >>Date: Sat Jun 5 21:39:52 2010 > >>New Revision: 208857 > >>URL: http://svn.freebsd.org/changeset/base/208857 > >> > >>Log: > >> Purge out a Windows def that somehow slipped > >> past the scrubber. > > > >i wonder if it makes sense to scrub away the code for other OS. > >While I understand the rationale, seeing the whole code might have > >several advantages: > >- understand the constraints that other OS impose; > >- learn what APIs are available in other OS; > >- teach people how to write portable code; > > > >cheers > >luigi > > > > ------------------------------ > Randall Stewart > 803-317-4952 (cell)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100606012034.GA56426>