Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!sdcsvax!ucsdhub!jack!man!nusdhub!rwhite From: rwhite@nusdhub.UUCP (Robert C. White Jr.) Newsgroups: comp.lang.c Subject: Re: System V manuals (was Re: What real non-UNIX 'C' compilers...) Message-ID: <129@nusdhub.UUCP> Date: Thu, 15-Oct-87 14:00:14 EDT Article-I.D.: nusdhub.129 Posted: Thu Oct 15 14:00:14 1987 Date-Received: Sat, 17-Oct-87 09:32:29 EDT References: <855@sugar.UUCP> <29930@sun.uucp> <867@sugar.UUCP> <30458@sun.uucp> <876@sugar.UUCP> Organization: National University, San Diego Lines: 31 Summary: handles and streams In article <876@sugar.UUCP>, peter@sugar.UUCP (Peter da Silva) writes: > Why does the SVID stick read() and fread() in the same place? I don't know about your system, but on mine you need to supply an int to read and a pointer to type FILE [ FILE *fn etc] The difference is that read() and its brethren use file to do all there opperations while fread() and it's brethren use streams. Apearently every stream has at least one file handle assoicated with it but the level and method that streams interact with the kernel are quite different than simple files. That is "any Transport Level Interface" [network, etc.] MUST be a stream when you open it. If you want to then use read() against it you must manually push a streams-module that will properly react to the read() calls. I guess what I am trying to say is that, on my system of corse, read() and fread() have a different scope. It is therefore approprate that they are listed as read(2) and fread(3S). If your system is not "UNIX" read may end up as a library refrence, but if it is a library on you computer I don't think it's standard. On the other hand, an "fread" type of system-call-primitive is NECESSARY to interact with the streams modules in the kernel. Since SVID includes streams definitions, I would assume that fread(2) will soon be the new standard, hence SVID may well say read(2) and fread(2) [or however they are designating these things]. Robert.