[comp.lang.c] ANSI standard and open

farren@hoptoad.uucp (Mike Farren) (06/30/87)

I have had a query from a friend who is a novice at C, and don't have the
knowledge to answer him, knowing little about the proposed ANSI
standard.  He says that in persuing H&S's discussion of the ANSI
standard, the low-level I/O functions (such as open(), read(), etc.)
do not seem to exist.  I have told him that to the best of my
knowledge, this does not mean that they are going to disappear, simply
that they weren't mentioned in the standard.  Am I correct?  What's
the real story?  Please reply by e-mail, as I get the feeling this is
a pretty dumb question...

-- 
----------------
                 "... if the church put in half the time on covetousness
Mike Farren      that it does on lust, this would be a better world ..."
hoptoad!farren       Garrison Keillor, "Lake Wobegon Days"

gwyn@brl-smoke.ARPA (Doug Gwyn ) (07/04/87)

In article <2343@hoptoad.uucp> farren@hoptoad.UUCP (Mike Farren) writes:
>...  He says that in persuing H&S's discussion of the ANSI
>standard, the low-level I/O functions (such as open(), read(), etc.)
>do not seem to exist.

I'm posting the response rather than mailing it, because this is an issue
worth understanding.

The (proposed) ANS for C (X3.159) limits itself to the "raw" language and
to that portion of the hosted run-time environment (library routines etc.)
that are believed to be usefully implementable on as wide a range of host
architectures and operating systems as possible.  The UNIX functions
open(), read(), etc. can be adequately implemented on some systems but not
on others.  Consequently the C standard will define the STDIO interface in
a way believed to be universally implementable, rather than a UNIX-like
set of primitive I/O functions.  The latter, however, are being
standardized by IEEE 1003.1 (POSIX), which has its scope specifically
limited to UNIX-like systems.  ANS X3.159-198x should be implementable on
any POSIX-supporting system, but not the converse.