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

Re: Visual Studio 2010/Windows SDK 7.1 support

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Brar Piening <brar(at)gmx(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Visual Studio 2010/Windows SDK 7.1 support
Date: 2011-01-03 09:44:19
Message-ID: AANLkTikaaZqSCjBBht-Hx=md4=_Bq1hVepJOWyu0hR1C@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Jan 3, 2011 at 08:19, Brar Piening <brar(at)gmx(dot)de> wrote:
> Hi,
>
> i'v created a patch enables support for building PostgreSQL with Visual
> Studio 2010 or Microsoft Windows SDK for Windows 7 and .NET Framework 4
> (Windows SDK 7.1).
> You can grab it from http://www.piening.info/VS2010.patch

This patch does not apply at all to my repository. Every single hunk
fails - I have a feeling it might have double line-ending encodings or
something like that? Since you're using git (at least eh patch
indicates so), have you perhaps published a git branch somewhere that
I could try pulling from instead?

Or if not - just to be sure, you are basing this off the master branch, I hope?

> It's diffed against current head + running "perltidy -b -bl -nsfs -naws
> -l=100 -ole=unix *.pl *.pm" as described in the README file (which seems not
> to have been run before committing Mkvcbuild.pm the last time).

Yeah, it looks that way - it's missing the ordering of the contrib
arrays. I'll run it once for that now, and then please rebase your
patch on top of that - makes it easier to review it.

If you still see any changes on top of that, then there's something
strange going on..


> It is problably neither the perfect way to introduce VS2010 support (my perl
> is better than my C but probably still not what you are used to) nor is it
> my way to try to make you officially support VS 2010. But perhaps it's
> something you could start with once you decide to upgrade the msvc
> toolchain.

Oh, starting with a patch is definitely not the wrong way :-)

it does look like they changed the file format extensively this time
though - that's annoying, but hopefully  they will stick to the new
format this time...


> The SDK 7.1 build produces tons of warnings which are mostly macro
> redefinitions of EIDRM, EMSGSIZE, EAFNOSUPPORT, EWOULDBLOCK, ECONNRESET,
> EINPROGRESS, ENOBUFS, EPROTONOSUPPORT, ECONNREFUSED and EOPNOTSUPP which
> seem to have found their way into errno.h finally. Cutting those out of
> src\include\pg_config_os.h and src\interfaces\libpq\win32.h makes the
> project build pretty clean.
> I resisted the temptation to parse them out of those files during
> Mkvcbuild::mkvcbuild as this should probably be handled by some preprocessor
> defines.

Yes, it's good that you resisted that :-)

It should be done with something like
#if _MSC_VER >= 1400

(with 1400 replaced with whatever version is appropriate)

There's at elast one example in c.h already, and several others spread
through files and code.


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2011-01-03 10:00:37
Subject: Re: Recovery conflict monitoring
Previous:From: Simon RiggsDate: 2011-01-03 09:37:56
Subject: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid

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