Deutsch   English   Français   Italiano  
<ve7sad$31th1$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.arch
Subject: Re: 80286 protected mode
Date: Thu, 10 Oct 2024 08:30:37 +0200
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <ve7sad$31th1$2@dont-email.me>
References: <2024Oct6.150415@mips.complang.tuwien.ac.at>
 <memo.20241006163428.19028W@jgd.cix.co.uk>
 <2024Oct7.093314@mips.complang.tuwien.ac.at>
 <7c8e5c75ce0f1e7c95ec3ae4bdbc9249@www.novabbs.org>
 <2024Oct8.092821@mips.complang.tuwien.ac.at> <ve5ek3$2jamt$1@dont-email.me>
 <be506ccef76d682d13205c69c761a086@www.novabbs.org>
 <ve6oiq$2pag3$1@dont-email.me> <ve6tv7$2q6d5$1@dont-email.me>
 <f99b0767aa4dd9ae8c34abc6b4d56c7c@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 10 Oct 2024 08:30:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a48c12dce33700a9986218db92a85cb4";
	logging-data="3208737"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+LnYwHBB54tD7TQk/XhZepROpE6ut8a5Q="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:gFoD5CWV9O5E2KEYdyYX3q9pBFc=
Content-Language: en-GB
In-Reply-To: <f99b0767aa4dd9ae8c34abc6b4d56c7c@www.novabbs.org>
Bytes: 2792

On 10/10/2024 02:33, MitchAlsup1 wrote:
> On Wed, 9 Oct 2024 21:52:39 +0000, Stephen Fuld wrote:
> 
>> On 10/9/2024 1:20 PM, David Brown wrote:
>>>
>>> There are lots of parts of the standard C library that cannot be written
>>> completely in portable standard C.  (How would you write a function that
>>> handles files?
> 
> Do you mean things other than open(), close(), read(), write(), lseek()
> ??
> 

The C standard library provides functions like fopen(), fclose(), 
fwrite(), etc.  It provides them because programs often need such 
functionality, and you cannot write them yourself in portable standard 
C.  (As Stephen pointed out, C could have had them built into the 
language - for many good reasons, C did not go that route.)

The functions you list here are the POSIX names - not the C standard 
library names.  Those POSIX functions cannot be implemented in portable 
standard C either if you exclude making wrappers around the standard 
library functions.

In both cases - implementing the standard library functions or 
implementing the POSIX functions - you need something beyond standard C, 
such as a way to call OS API's.

>>> You need non-portable OS calls.)  That's why these
>>> things are in the standard library in the first place.