Re: libpq build problem with <io.h> on MS VC++

Tom Lane <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.patches
Message-ID <[email protected]>
Bruce Momjian <[email protected]> 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.