Re: AIX port current

Lists: pgsql-patches
From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pqsql-hackers(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: AIX port current
Date: 2003-10-21 08:24:39
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA496204A@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


> > #include <errno.h>
> > + #if defined(__CYGWIN__) || defined(WIN32)
> > #include <fcntl.h> /* ensure O_BINARY is available */
> > + #endif
>
> I don't feel that this will fly. The comment on the #include line is
> hopelessly out of touch with reality --- if you check the list of
> symbols defined in fcntl.h you will find a bunch that are
> used all over
> the place, eg SEEK_SET, O_RDONLY, O_CREAT, O_NDELAY, S_IRUSR. Perhaps
> we could #include <fcntl.h> in the various .c files that use these
> symbols rather than in c.h, but is that really a step
> forward? If there

(iirc the include was introduced with the windows port, no ?)
Actually, I think the files (at least from the main source) that need those symbols
have the include in the respective .c files, but ...

> are any such .c files that also need the conflicting AIX header, we're
> still screwed. Please propose another answer. Or get AIX to fix their
> broken headers.

Since it is only dynloader.h and plpython.c that has dlfcn.h do you think a
patch that #undef's the offending symbols before the dlfcn.h include is ok,
or is an #ifndef _AIX in c.h better ?

Andreas


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
Cc: pqsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: AIX port current
Date: 2003-10-21 13:37:31
Message-ID: 20920.1066743451@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

"Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at> writes:
>> I don't feel that this will fly.

> (iirc the include was introduced with the windows port, no ?)

Hmm, you are right; 7.3 c.h has

#ifdef __CYGWIN__
#include <errno.h>
#include <sys/fcntl.h> /* ensure O_BINARY is available */
#endif

so actually there has never been an assumption that c.h would include
<fcntl.h> generally. Okay, objection withdrawn.

regards, tom lane