Article View: gnu.gcc.help
Article #49918Re: ungetc function
From: Fergus Henderson
Date: Mon, 06 Dec 1993 19:24
Date: Mon, 06 Dec 1993 19:24
32 lines
2262 bytes
2262 bytes
pollock@eggo.usf.edu (Wayne Pollock) writes: >In a previous article ICP%ANDESCOL.BITNET@mitvma.mit.edu (Gabriel Perez) writes: >>I have your compiler installed on a Solbourne (Sparc clone) machine; I >>am trying to install the f2c package from AT&T, but an error occurs >>because reportedly the ungetc function is not declared; I have tried >>including your stdio.h (which is supossed to be the proper header file >>according to the ANSI C documentation I got) but it does not work; can you >>please give me a hint on what is happenning? Thank you . > >The answer is simple: Gnu C (gcc) is NOT ANSI C! No, it's not that simple. The ANSI C standard defines two different sorts of conforming implementations: hosted implementations, and non-hosted implementations. GNU C _is_ a conforming non-hosted implementation, but isn't a conforming hosted implementation. That means that it doesn't provide the standard library. It does however do a reasonable job of letting you use whatever C library already exists on your system, and even fixes up the header files a bit. >It only will produce a >standard (ANSI) C compiler if it was built on a system that already has >a standard C compiler. Actually, all you need is a standard ANSI C library. You can use the GNU C Library `glibc' (eg. Linux uses glibc), although I have heard that at this stage it has not been ported to many of the platforms that gcc has been ported to (or is still fairly buggy on many platforms, or something). -- Fergus Henderson fjh@munta.cs.mu.OZ.AU
Technical Details
Message-ID:
<9334106.5550@mulga.cs.mu.OZ.AU>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!spool.mu.edu!sgiblab!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjhReferences:
<9312010211.AA27420@life.ai.mit.edu> <2dnsca$sc2@suntan.eng.usf.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,3600218bddf3d55d X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-12-06 23:21:51 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!spool.mu.edu!sgiblab!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: ungetc function Message-ID: <9334106.5550@mulga.cs.mu.OZ.AU> Sender: news@cs.mu.OZ.AU Organization: Computer Science, University of Melbourne, Australia References: <9312010211.AA27420@life.ai.mit.edu> <2dnsca$sc2@suntan.eng.usf.edu> Distribution: gnu Date: Mon, 6 Dec 1993 19:24:48 GMT Lines: 32