Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!nuchat!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: What real non-UNIX 'C' compilers implement... Message-ID: <814@sugar.UUCP> Date: Thu, 24-Sep-87 23:41:59 EDT Article-I.D.: sugar.814 Posted: Thu Sep 24 23:41:59 1987 Date-Received: Sat, 26-Sep-87 18:23:48 EDT References: <672@sugar.UUCP> <3545@venera.isi.edu> <721@sugar.UUCP> <6445@brl-smoke.ARPA> Organization: Sugar Land UNIX - Houston, TX Lines: 36 > It made sense to move malloc() into the BA_OS section, even > though it's normally implemented as a library function that > invokes the sbrk() system call (which is not required by the > SVID). I guess, if you can have execlp() in "section 2", why not malloc(). > It makes somewhat less sense to have placed STDIO > routines in BA_OS rather than BA_LIB, but since both BA_OS > and BA_LIB are required for Base System conformance, it > really doesn't matter which section they're described in. Except that the O/S *manuals* follow the SVID. And except that it confuses people. "Hey, peter, how come they have read and fread?" "Well, fread is a library routine." "Oh. How do you tell which ones are library routines?" "read the manual. Library routines are section 3" "section 3? I don't have a section 3" "What? Let me look at that... they must be kidding". And it used to be you could find something by starting at "a" and searching from there. You only had to know if it was a system call, a program, a library routine, or a data structure (though the section 4/section 5 split was not always obvious). Now you have to guess whether someone thought "awk" was a programming language, a utility, or an administrative tool (the answer is "yes"). And as seen by the location of fread(), etc... it's not always obvious. Finally, I can easily imagine people implementing fread() in the kernel if they follow SVID literally. As far as I'm concerned, it's UNIX if it provides the system calls listed in section 2 of the Version 7 manual, with the exception of ptrace and chroot and a few others, and with gtty/stty perhaps replaced by ioctl. -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- 'U` Have you hugged your wolf today? -- Disclaimer: These aren't mere opinions... these are *values*.