Re: [HACKERS] AW: compilation problem on AIX - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] AW: compilation problem on AIX
Date
Msg-id 3613.908289538@sss.pgh.pa.us
Whole thread Raw
In response to AW: compilation problem on AIX  (Andreas Zeugswetter <andreas.zeugswetter@telecom.at>)
Responses RE: [HACKERS] AW: compilation problem on AIX  ("Taral" <taral@mail.utexas.edu>)
List pgsql-hackers
Andreas Zeugswetter <andreas.zeugswetter@telecom.at> writes:
> I would simply do:

> #ifndef size_t
> typedef int size_t
> #endif

> #ifndef socklen_t
> typedef size_t socklen_t
> #endif

That has no hope of working, since typedefs generally are not macros.

Marc had the right idea: a configure test is the only real way to
discover how getsockname() is declared.  A small problem is that
configure can only detect outright compilation failures, not warnings.
That's probably good enough, but people with nonstandard definitions
of getsockname may have to live with looking at warnings.

> and use socklen_t which is now standard for socket functions

It is?  The machines I have access to think the parameter is plain,
unvarnished "int".

            regards, tom lane

pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: [HACKERS] Dumping of views -- done!
Next
From: "Matthew N. Dodd"
Date:
Subject: Re: [HACKERS] dynamic libraries