🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2447

Re: Frustrated trying to be portable

#2447
From: Richard Tobin
Date: Tue, 19 Feb 1991 18:18
31 lines
1955 bytes
In article <15240@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>No compiler should be advertised as conforming to the (ANSI/ISO) C standard
>unless it fully meets the requirements for a conforming implementation
>specified in the standard.

This is obviously true.

>There are two kinds of conforming implementation:
>hosted and standalone.  The one you are interested in would be a conforming
>hosted implementation.  Certainly such an implementation would have to
>provide <stdlib.h>, remove(), etc.

As far as I can tell, some of the library functions described in the
standard can be implemented portably (requiring in some cases a
particular operating system), whereas some others can't.  For example
the functions from <string.h> and <stdio.h> can, whereas those in
<stdarg.h> can't.

This isn't however the distinction between a hosted and freestanding
implementation, since a freestanding implementation doesn't have to
provide <setjmp.h> and perhaps other non-portable libraries.

A compiler that provided only the non-portably-implementable library
functions (and headers) might well be very useful in a hosted
environment.

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin@uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin
Technical Details
Message-ID: <4188@skye.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!uunet!mcsun!ukc!edcastle!aiai!richard
References: <1991Feb17.203337.20569@uokmax.ecn.uoknor.edu> <15240@smoke.brl.mil>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!uunet!mcsun!ukc!edcastle!aiai!richard
From: richard@aiai.ed.ac.uk (Richard Tobin)
Newsgroups: comp.std.c
Subject: Re: Frustrated trying to be portable
Message-ID: <4188@skye.ed.ac.uk>
Date: 19 Feb 91 18:18:43 GMT
References: <1991Feb17.203337.20569@uokmax.ecn.uoknor.edu> <15240@smoke.brl.mil>
Reply-To: richard@aiai.UUCP (Richard Tobin)
Organization: AIAI, University of Edinburgh, Scotland
Lines: 31