Subject: Re: C-Compilers on a 2Meg-Machine Date: Mon, 11 Nov 1991 20:49:07 +0200 From: Linus Benedict Torvalds <torvalds@cc.helsinki.fi>
Robert Blum: "C-Compilers on a 2Meg-Machine" (Nov 11, 18:54):
>
> I recently ported CvW's C386 to Linux. I can do development on a 2Meg-System
> too. (BTW Linus, that caused the gcc-errors..)
Wow. Things are moving along...
> But C386 is non-ANSI. Now are we
> a) Giving it an ANSI front end ? (any gurus out there?)
> b) put an #ifdef _STDC_ in all includes
> c) Forget about the 2Meg-machines (NO, PLEASE NOT:-()
a) Not very easy (mild understatement).
b) I *HATE* unclear include-files
c) No way.
I'd like to propose a following change to /usr/include/*:
Add a directory "/usr/include/non-ansi", and to each file (example
ctype.h, cdiff type adding):
#ifndef _CTYPE_H
#define _CTYPE_H
+ #if !defined(__STDC__) && !defined(__GCC__)
+ #include <non-ansi/ctype.h>
+ #else
... old ctype.h unchanged (except for the bug-fix, see below)
+ #endif /* __STDC__ */
#endif /* _CTYPE_H */
That way we can keep the non-ansi headers distinct. Anybody got
something against this? I'd suggest Blum do all the hard work :-) and
set cdiffs somewhere? No? The non-ansi files could be a part of the C386
package, and not everyone would need them.
At the same time you can correct a bug in ctype.h (I don't remember who
noticed this one, but it sure wasn't me): tolower has a '+' where there
should be a '-'. I never used it, so I never noticed. Urgh.
Linus