Subject: Re: Include order of system header files
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 05/19/2005 01:01:45
> I've been fixing such bugs in my own tree as I find them.  Some time
> back (years), I tried to interest NetBSD in such fixes but I was told
> in no uncertain terms that such things were not considered broken by
> NetBSD and thus would not be fixed.  Perhaps that position has changed
> since; I don't know.  I hope so.

Me too, for the few cases where I need to do some coding myself.
But from last time I brought this up, I was also told that this is a 
no-go, with no arguments that stuck to my mind.

FWIW, looking at a few systems (script attached below), here's what I see 
when pushing all files in /usr/include through the compiler:

 				#files	#broken
 	NetBSD 2.x/i386:	  1133	    622
 	Solaris 9/x86:		  1275	    453
 	SuSE Linux 8.2: 	  2912	   1634


  - Hubert


#!/bin/sh
#
# See which header files "compile" without errors  - HF
#
c=/tmp/inctest.$$.c
o=/tmp/inctest.$$.o
l=/tmp/inctest.$$.log

( cd /usr/include
find * -type f -print ) \
| while read fn
do
 	echo "#include <$fn>" >$c
 	gcc -c $c -o $o >$l 2>&1
 	nerrors=`wc -l <$l`
 	printf "%3d error-lines from %s\n" $nerrors $fn
done
rm $l $o $c

-- 
Genervt von Viren und von Viren versandten Spam-Mails?  -> www.NetBSD.de
Fed up from viruses & virus-originated spam mail?       -> www.NetBSD.org