Subject: Re: Compiling NetBSD with another compiler.
To: None <>
From: Aleksey Cheusov <>
List: tech-userlevel
Date: 10/13/2007 18:44:18
> On Sat, Oct 13, 2007 at 06:03:28PM +0300, Aleksey Cheusov wrote:
 >> find /usr/obj/destdir/usr/include -type f |
 >> xargs egrep 'define[[:space:]]*[[:lower:]][[:lower:]_]+' |
 >> wc -l

> Most of that are kernel headers. A bunch of other cases are historic
> accidents. zlib uses it for symbol renaming. The actual violations
> visible to normal programs are a small part of that.

This doesn't matter. Many of them are visible.

 >> > Note that the headers are allowed to define a
 >> > macro for fgetc, but you can undefine it if you really want to use
 >> > it e.g. as member of a struct.
 >> fgetc doesn't need renaming.

> It doesn't at the moment. That might change. For the ctype macros it
> would make sense as they have run out of bits.
"640k is enough for everyone"(c) :)
32bit is enough for unicode.

The only REAL problem in using macros for A FEW functions is 
that some of them (1? 2? 3? I didn't count) should be declared
as functions (SUS and/or probably others). You skip my argument about that,
99.99% of programs don't depend on this, i.e. they don't #undef them,
don't use member named "sigfillset" etc.

Anyway, purists do not use C language at all ;). I guess they love haskell.

Best regards, Aleksey Cheusov.