*BSD News Article 6187


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.hawaii.edu!ames!think.com!paperboy.osf.org!meissner
From: meissner@osf.org (Michael Meissner)
Subject: Re: 386BSD's non-standard C library
In-Reply-To: dean@ksr.com's message of 6 Oct 92 18:12:03 EDT
Message-ID: <MEISSNER.92Oct6231635@curley.osf.org>
Lines: 60
Sender: news@osf.org (USENET News System)
Organization: Open Software Foundation
References: <1992Sep24.031603.21009@minyos.xx.rmit.oz.au> <id.58NT.RE4@ferranti.com>
	<rcskb.718045970@minyos.xx.rmit.OZ.AU> <16591@ksr.com>
Date: Wed, 7 Oct 1992 03:16:39 GMT
Lines: 60

In article <16591@ksr.com> dean@ksr.com (Dean Anderson) writes:

| In article <rcskb.718045970@minyos.xx.rmit.OZ.AU> rcskb@minyos.xx.rmit.oz.au (Kendall Bennett) writes:
| 
| >Oh? That is my problem? I assume that since this is a new standard (first
| >proposed back in what - 1983?), and it is not supported on all systems
| 
| The standard was not accepted until 1989 or so.  My unapproved draft copy 
| is dated December 1988.

ANSI C was approved in December of 1989.  ISO C was approved in 1990
(December again I think).  ANSI and ISO C are technically the same.
POSIX came out in 1988 (trail use I think), and again in 1990.

| >I should not use it, but write my code in pre-historic K&R C with lotsa
| >#defines since non K&R system is ever comapatable with another?
| 
| If you want to be portable(ie, run on lots of systems), this is what 
| you have to do. Maybe you should just stick with DOS.  There are a 
| lot of those systems.

Now that it is three or four years from the approval, I am less and
less enthused about the crutches of supporting systems whose vendors
are asleep at the wheel.

	...

| Go ahead and write ansi and posix only code.  It will be a while before
| it will run on vast numbers of systems.  I personally don't like ansi
| C because it violated its charter to document the existing language as
| a standard.  I don't think that all the decisions were correct, and I
| don't think the community was permitted to test out the ideas well
| enough.  Innovation by committee usually produces very bad results.

Documenting the existing language was only one of the goals.  Another
was to fix things.  You can't satisfy conflicting goals completely.

| The point here is that not everyone has an ansi compiler.  Very little 
| code will work with an exclusively ansi compiler.  Some people cannot
| have both -traditional and -ansi built into their compiler.

Then complain to the vendor, write your own compiler, and/or use GCC.
As a compiler writer (who by the way has written a C front end from
scratch), I seriously doubt providing both traditional vs.  ansi
support in any non-toy compiler is all that much code.  Yeah, there
are some dark corners, and such, and it may make you keep a tiny bit
more state than if you have a traditional compiler or an ansi compiler
alone, but if the compiler vendor can't hack it, they are obviously in
the wrong profession.

| >>Not shortcuts, exactly. The library *predates* the standard. For example,
| >>the ANSI standard changed the behaviour of tolower for most compilers.

Actually in this case, it depends on whether you came from the BSD
universe or System V (the standard picked System V for the most part).
--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

You are in a twisty little passage of standards, all conflicting.