From: | "Taral" <taral(at)mail(dot)utexas(dot)edu> |
---|---|
To: | "Peter Gucwa" <pg(at)softcomputer(dot)com>, "'Marc G(dot) Fournier'" <scrappy(at)hub(dot)org> |
Cc: | "'hackers(at)postgresql(dot)org'" <hackers(at)postgreSQL(dot)org> |
Subject: | RE: [HACKERS] compilation problem on AIX |
Date: | 1998-10-13 22:08:57 |
Message-ID: | 000001bdf6f6$12bb62a0$3b291f0a@taral |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > > getsockname(int s, struct sockaddr *name, socklen_t *namelen);
> >
> > Ok, so this gets tricky. In 4.2.1 it is size_t and in 4.3.1 it is as
> > above with socklen_t :-(
>
> If someone can make me a *short* code stub that fails to compile depending
> on which is used, I can add this to configure...
--- cut here ---
#include <sys/socket.h>
int getsockname(int, struct sockaddr *, socklen_t *);
int x() {return 0;}
--- cut here ---
If your compiler insists on size_t instead of socklen_t, this will fail with
an error.
My test (since linux doesn't care):
test.c:
extern int x(int);
extern int x(long);
% gcc -c test.c
~
test.c:3: conflicting types for `x'
test.c:1: previous declaration of `x'
% echo $?
~
1
Enjoy.
Taral
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Lee Green | 1998-10-13 22:39:01 | Re: [HACKERS] What about LIMIT in SELECT ? |
Previous Message | Jeff Hoffmann | 1998-10-13 21:56:48 | Re: [HACKERS] What about LIMIT in SELECT ? |