🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50911

error w/ fseek(fp,0,SEEK_SET)

#50911
From: Chris Russell
Date: Mon, 26 Jul 1993 18:53
24 lines
1567 bytes
I am using gcc 2.4.5 installed on a Sun SPARC running SunO/S 4.1.3 and
the Sun C 1.1 compiler.

When I attempt to compile (braindead) program foo.c:
   #include <stdio.h>
   main() {
     FILE *fp;
     fseek(fp, 0, SEEK_SET);
   }
using "gcc -ansi foo.c", I get the following error:
   `SEEK_SET' undeclared (first use this function)
This error does not occur when I use "acc foo.c" (Sun's ANSI C compiler).

What is wrong?  It appears that my #include's used by gcc are missing the
definition for SEEK_SET.  (SEEK_SET is defined by ANSI C section 4.9.9.2.)
I don't believe I received any errors or problems during installation of
gcc 2.4.5 (including the fixheaders pass).

Any suggestions would be greatly appreciated.

--
Chris Russell      | Custom software, networks, CASE tools, and consulting
Adaptive Solutions | Sun SPARC, SGI IRIS, HP Apollo, Macintosh, & PC
chris@acm.org      | 909/861-4048 | P.O. Box 5424 Diamond Bar, CA 91675-7424
Technical Details
Message-ID: <crussellCAsCHv.G42@netcom.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!csus.edu!netcom.com!crussell

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,a252afe242f0c881,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-07-26 12:24:11 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!csus.edu!netcom.com!crussell
From: crussell@netcom.com (Chris Russell)
Subject: error w/ fseek(fp,0,SEEK_SET)
Message-ID: <crussellCAsCHv.G42@netcom.com>
Organization: Adaptive Solutions, Custom Software & Support  909/861-4048
X-Newsreader: TIN [version 1.1 PL8]
Date: Mon, 26 Jul 1993 18:53:55 GMT
Lines: 24