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 29177.1092717770@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
Re: [pgsql-hackers-win32] libpq build problem with on MS VC++
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Andrew Francis wrote:
>> How about avoiding #define altogether, and:
>> - Always use pgrename/pgunlink instead of rename/unlink

> We could do it but we have avoided that for cases where Unix would just
> be a pass-through.

To put that in a more positive light: we like to think that our code is
Posix-compliant and runs in a Posix-compliant environment.  We're not
thrilled about introducing non-Posix-isms for the convenience of one
platform ... especially if there's no easy way to enforce that the
nonstandard coding convention be used.

Back on track: if rename() does exist under Windows then my idea is
unreliable.  Any other thoughts?  How about #including <io.h> in port.h
(for Windows only of course) before we #define these things?

            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: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] libpq build problem with on MS VC++