Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andrew Francis <locust(at)familyhealth(dot)com(dot)au>,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:42:50
Message-ID: 29177.1092717770@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers-win32pgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2004-08-17 04:51:28
Subject: Re: libpq build problem with <io.h> on MS VC++
Previous:From: Bruce MomjianDate: 2004-08-17 04:33:58
Subject: Re: libpq build problem with <io.h> on MS VC++

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2004-08-17 04:51:28
Subject: Re: libpq build problem with <io.h> on MS VC++
Previous:From: Bruce MomjianDate: 2004-08-17 04:33:58
Subject: Re: libpq build problem with <io.h> on MS VC++

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group