Re: [HACKERS] zic with msvc

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] zic with msvc
Date: 2006-10-21 06:40:53
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0FCAE@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> >>> + #ifdef WIN32
> >>> + #define _WIN32_WINNT 0x0400
> >>> + #endif
> >>
> >> Hmm ... in pg_ctl.c I see
> >>
> >> #define _WIN32_WINNT 0x0500
> >>
> >> Is there a reason for these to be different? Are there
> other places
> >> that will need this (ie, maybe it should be in c.h instead?)
>
> > Not really. The default appears to be 0x0400 for MingW (or
> it wouldn't
> > have worked before), but 0x0350 or so for Visual C++.
> > If we define it to 0x0500 we pull in headers that will only work on
> > 2000 or newer.
>
> Hm. Actually, if the rest of the backend compiles without
> this, then I guess the real question is what's zic.c doing
> that needs it? pg_ctl.c has an excuse because it's doing
> weird MS-specific junk, but zic.c is supposed to be
> bog-standard portable code. It really shouldn't have
> anything that's further out there than you could find in ten
> other places in the backend.

Only almost. There is a small function to emulate link(), which uses
CopyFileEx(). That's the one.

//Magnus

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2006-10-21 08:52:37 Re: adminpack and pg_catalog
Previous Message Tom Lane 2006-10-21 05:13:03 Re: adminpack and pg_catalog

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-10-21 18:15:41 Re: 8.2 release notes for pgcrypto
Previous Message Tom Lane 2006-10-21 04:47:02 Re: [HACKERS] zic with msvc