Newsgroups: comp.sys.apple2.gno
Path: blue.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!math.ohio-state.edu!howland.reston.ans.net!wupost!waikato!comp.vuw.ac.nz!actrix.gen.nz!dempson
From: dempson@atlantis.actrix.gen.nz (David Empson)
Subject: Re: What's going on here?
Message-ID: <CzHwqA.GrH@actrix.gen.nz>
Nntp-Posting-Host: atlantis.actrix.gen.nz
Sender: news@actrix.gen.nz (News Administrator)
Organization: Actrix - New Zealand Internet Service Providers
Date: Sat, 19 Nov 1994 03:37:21 GMT
References: <9411190121.AA03147@fert2.fe.psu.edu>
Lines: 40

In article <9411190121.AA03147@fert2.fe.psu.edu>,
Jason A. Jeffries <jaj4922@fert2.fe.psu.edu> wrote:
> Any idea what is causing this?
> 
> Including :HD3:ORCA:libraries:ORCACDefs:fcntl.h
>   27 size_t          read(int, void *, size_t);
> 		     ^ type expected
> 		     ^ ';' expected
>   28 size_t          write(int, void *, size_t);
> 		     ^ duplicate symbol
> 		     ^ type expected
> 		     ^ ';' expected

For whatever reason, size_t is not defined.

My version of fcntl.h has the same definitions.  The official ORCA/C
1.3, 2.0 and 2.0.3 headers from ByteWorks use 'int' for the return
type and third parameter of these functions.

It basically means that the GNO-supplied fcntl.h has a bug.  It should
define size_t itself, or include another file which defines it.

You can get around this by including any of <stdio.h>, <stdlib.h> or
<stddef.h> before <fcntl.h>.  There may be other files that define
size_t, but these are the "official" ones that are supposed to define
it.

Alternatively, modify fcntl.h to include the definition, as follows:

#ifndef __size_t__
#define __size_t__ 1
typedef unsigned long size_t;
#endif

There are two underlines on either side of size_t in the #ifndef and
#define lines.
-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand
Newsgroups: comp.sys.apple2.gno
Path: blue.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!math.ohio-state.edu!howland.reston.ans.net!ix.netcom.com!netcom.com!bazyar
From: bazyar@netcom.com (Jawaid Bazyar)
Subject: Re: What's going on here?
Message-ID: <bazyarCzI8sI.D4q@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <9411190121.AA03147@fert2.fe.psu.edu>
Date: Sat, 19 Nov 1994 07:57:54 GMT
Lines: 20

jaj4922@fert2.fe.psu.edu (Jason A. Jeffries) writes:

>Any idea what is causing this?

>Including :HD3:ORCA:libraries:ORCACDefs:fcntl.h
>  27 size_t          read(int, void *, size_t);
>		     ^ type expected
>		     ^ ';' expected
>  28 size_t          write(int, void *, size_t);
>		     ^ duplicate symbol
>		     ^ type expected
>		     ^ ';' expected

  Add "#include <types.h>" before #include <fcntl.h>

-- 
 Jawaid Bazyar              |   Like UNIX? Like your Apple IIGS? Then ask
 Procyon, Inc.              |   me about GNO/ME for the Apple IIgs!   
 bazyar@netcom.com          |   P.O Box 620334
 --Apple II Forever!--      |   Littleton, CO 80162-0334   (303) 781-3273
