Re: problems with configure - Mailing list pgsql-hackers

From Tom Lane
Subject Re: problems with configure
Date
Msg-id 14639.973717317@sss.pgh.pa.us
Whole thread Raw
In response to Re: problems with configure  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: problems with configure  ("Martin A. Marques" <martin@math.unl.edu.ar>)
Re: problems with configure  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
"Martin A. Marques" <martin@math.unl.edu.ar> writes:
>>>> Is there any kind of info you would need that I could provide?
>> 
>> If you could put
>> #include <sys/types.h>
>> #include <sys/socket.h>
>> into a file temp.c, and then send the output of "gcc -E temp.c",
>> it might shed some light.

> There it goes!!

Well, that tells the tale all right: the critical lines are
typedef    uint32_t    socklen_t;
typedef    void        *Psocklen_t;
extern int accept(int, struct sockaddr *, Psocklen_t);

What brainless idiot decided it would be a good idea to declare
accept's last argument as void*, do you suppose?  (At least you
report that Solaris 8 no longer has this folly, so they did get
a clue eventually.)

Not sure what to do about this.  It will clearly not do to define
ACCEPT_TYPE_ARG3 as void.  Perhaps we need a special case for
Solaris 7: if we detect that accept() is declared with "void *",
assume that socklen_t is the thing to use.  Peter, any thoughts?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Location of client header files
Next
From: "Martin A. Marques"
Date:
Subject: Re: problems with configure