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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(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 14:46:28
Message-ID: 200408171446.i7HEkS021200@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

Tom Lane wrote:
> 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?

Sure, should we do that? I see 12 mentions of io.h in the code, and we
already include some win32 includes in port.h.

--
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

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2004-08-17 14:55:06 Re: tablespace and sequences?
Previous Message Bruce Momjian 2004-08-17 14:44:20 Re: libpq build problem with <io.h> on MS VC++

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-08-17 15:15:36 Re: [PATCHES] GUC variables invisible to contrib/
Previous Message Bruce Momjian 2004-08-17 14:44:20 Re: libpq build problem with <io.h> on MS VC++