[Info-vax] The (now lost) future of Alpha.

Chris xxx.syseng.yyy at gfsys.co.uk
Mon Aug 6 18:27:07 EDT 2018


On 08/06/18 01:02, Arne Vajhøj wrote:
> On 8/5/2018 5:15 PM, Chris wrote:
>> On 08/05/18 19:16, Craig A. Berry wrote:
>>> But fopen, fwrite, fread, and fclose implemented in terms of open,
>>> write, read, and close, which are syscalls, not C library functions. I'm
>>> not sure whether a compiler would be more likely to use stdio or unix
>>> I/O, but just wanted to point out that it might well use things that are
>>> not in the C library. It doesn't matter as long as they are available,
>>> but it might play a role in what has to get done first when implementing
>>> a new compiler on a new OS port.
>>
>> Sorry, but that's rubbish. These functions have been part of the
>> standard C library for decades. Check K&R or Harbison & Steele if
>> you doubt that. Have you any idea just how rich the C library is these
>> days ?. if you pert to new hardware or os, you just need  a slip layer
>> between the library functions and the underlying hardware, irrespective
>> of what hw drivers or file system is in use at lower layers..
>
> Maybe we should start by agreeing on what "standard" means.
>
> If we defined "standard" to mean ISO/IEC 9899:1999 or ISO/IEC 9899:2011,
> then I don't believe open/write/read/close are there.
>
> At least I can not find them in C11 chapter 7 or appendix B.
>
> I have never experienced a C environment that did not have them,
> but that is different from being standard.
>
> They may qualify as "de facto standard".
>
> Arne


Perhaps it did originally develop in an ad hoc fashion, but have the
1988 edition of K&R in front of me and that has a whole appendix on
the standard C library, as does the first edition from 1979. If there
is a standard, then that book and the one from Harbison & Steele, "C,
a Reference Manual", are the primary definitions of it historically,
though i'm sure there will have been many changes since.

Really, all this stuff about syscalls and asm or not, is irrelevant.
Sure, the c libarary function with be making syscalls at kernel, file 
system and io sections, but at user interface level the C lib
is platform independent and pretty much consistent across all major
flavours of unix...

Chris



More information about the Info-vax mailing list