Re: [HACKERS] Bug in postgresql-6.3.2 (AIX specific)

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Andreas Zeugswetter <andreas(dot)zeugswetter(at)telecom(dot)at>
Cc: "'hackers(at)postgresql(dot)org'" <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Bug in postgresql-6.3.2 (AIX specific)
Date: 1998-05-24 18:28:50
Message-ID: Pine.BSF.3.96.980524152622.26778b-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Ivar Helbekkmo 1998-05-24 18:47:01 Re: [HACKERS] Query cancel and OOB data
Previous Message Bruce Momjian 1998-05-24 17:35:16 Re: [HACKERS] Query cancel and OOB data