Re: [pgsql-hackers-win32] libpq build problem with on MS VC++ - Mailing list pgsql-patches

From Tom Lane
Subject Re: [pgsql-hackers-win32] libpq build problem with on MS VC++
Date
Msg-id 28759.1092714997@sss.pgh.pa.us
Whole thread Raw
In response to Re: [pgsql-hackers-win32] libpq build problem with on MS VC++  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [pgsql-hackers-win32] libpq build problem with on MS VC++  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [pgsql-hackers-win32] libpq build problem with on MS VC++  (Andrew Francis <locust@familyhealth.com.au>)
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.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.  (I'm assuming that
forgetting to include this in a file that calls rename() will yield an
obvious build failure on Windows --- if not then the idea is no good.)

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] libpq build problem with on MS VC++
Next
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] libpq build problem with on MS VC++