From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Francis <locust(at)familyhealth(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers-win32(at)postgresql(dot)org, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: libpq build problem with <io.h> on MS VC++ |
Date: | 2004-08-17 04:24:59 |
Message-ID: | 200408170424.i7H4Oxc26955@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-patches |
Andrew Francis wrote:
> Tom Lane wrote:
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >
> >>The only other option I can think of is to #undef those to defines,
> >>include io.h, then re-include port.h? Is that better?
> >
> > How about not #define'ing rename() etc in port.h in the first place?
> >
> > We could put
> > #ifdef WIN32
> > #define rename(x) pgrename(x)
> > #endif
> > into those very few .c files that need it.
>
> How about avoiding #define altogether, and:
>
> - Always use pgrename/pgunlink instead of rename/unlink
>
> - Provide stubs for non-Win32 systems
>
> #ifndef WIN32
> int pgrename(const char *from, const char *to) {
> return rename(from,to);
> }
> #endif
>
We could do it but we have avoided that for cases where Unix would just
be a pass-through.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-08-17 04:33:58 | Re: libpq build problem with <io.h> on MS VC++ |
Previous Message | Bruce Momjian | 2004-08-17 04:24:14 | Re: libpq build problem with <io.h> on MS VC++ |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-08-17 04:33:58 | Re: libpq build problem with <io.h> on MS VC++ |
Previous Message | Bruce Momjian | 2004-08-17 04:24:14 | Re: libpq build problem with <io.h> on MS VC++ |