> 	int accept(int s, struct sockaddr *addr, int *addrlen);
>
> So AIX has the last parameter defined as size_t, huh?  

Yes, and this is consistently done with all size parameters. (therefore also with fread, fwrite ...)
But only if _NONSTD_TYPES is not defined. I don't know where that would come from.
(it's not in any /usr/include header)

typedef unsigned long   size_t;

#ifdef  _NONSTD_TYPES
extern int      fread();
#else
extern size_t   fread(void *, size_t, size_t, FILE *);
#endif

Andreas


Fri, 22 May 1998 14:25:44 +0200
Andreas Zeugswetter <andreas.zeugswetter@telecom.at>
Re: [HACKERS] Bug in postgresql-6.3.2 (AIX specific)
On Fri, 22 May 1998, Andreas Zeugswetter wrote:

> > 	int accept(int s, struct sockaddr *addr, int *addrlen);
> >
> > So AIX has the last parameter defined as size_t, huh?  
> 
> Yes, and this is consistently done with all size parameters. (therefore also with fread, fwrite ...)
> But only if _NONSTD_TYPES is not defined. I don't know where that would come from.
> (it's not in any /usr/include header)
> 
> typedef unsigned long   size_t;
> 
> #ifdef  _NONSTD_TYPES
> extern int      fread();
> #else
> extern size_t   fread(void *, size_t, size_t, FILE *);
> #endif

Hrmmm...just checked, and, under FreeBSD:

> grep fread *.h
stdio.h:size_t   fread __P((void *, size_t, size_t, FILE *));

where size_t is defined to be an unsigned int, vs long on AIX...

i sort of suspect that the use of size_t is more the norm then the
exception, if you all check your fread defines...?

Marc G. Fournier                                
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 


Sun, 24 May 1998 15:28:50 -0300 (ADT)
The Hermit Hacker <scrappy@hub.org>
Re: [HACKERS] Bug in postgresql-6.3.2 (AIX specific)