Remove some code for old unsupported versions of MSVC

Started by Peter Eisentrautalmost 7 years ago3 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t41319
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 28, 2026 at 03:38 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t41319_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t41319_1 && git checkout t41319_1

Patchset v1 (message #1) is on t41319_1

Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

As of d9dd406fe281d22d5238d3c26a7182543c711e74, we require MSVC 2013,
which means _MSC_VER >= 1800. This means that conditionals about
older versions of _MSC_VER can be removed or simplified.

Previous code was also in some cases handling MinGW, where _MSC_VER is
not defined at all, incorrectly, such as in pg_ctl.c and win32_port.h,
leading to some compiler warnings. This should now be handled better.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

t41319_1
0001-Remove-some-code-for-old-unsupported-versions-of-MSV.patchtext/plain; charset=UTF-8; name=0001-Remove-some-code-for-old-unsupported-versions-of-MSV.patch; x-mac-creator=0; x-mac-type=0Download+235-358
#2Michael Paquier
michael@paquier.xyz
In reply to: Peter Eisentraut (#1)
Re: Remove some code for old unsupported versions of MSVC

On Fri, Oct 04, 2019 at 04:35:59PM +0200, Peter Eisentraut wrote:

As of d9dd406fe281d22d5238d3c26a7182543c711e74, we require MSVC 2013,
which means _MSC_VER >= 1800. This means that conditionals about
older versions of _MSC_VER can be removed or simplified.

Previous code was also in some cases handling MinGW, where _MSC_VER is
not defined at all, incorrectly, such as in pg_ctl.c and win32_port.h,
leading to some compiler warnings. This should now be handled better.

Thanks Peter for cleaning up this code. I have looked at it, did some
testing and it looks good to me. No spots are visibly missing.
--
Michael

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Michael Paquier (#2)
Re: Remove some code for old unsupported versions of MSVC

On 2019-10-07 08:52, Michael Paquier wrote:

On Fri, Oct 04, 2019 at 04:35:59PM +0200, Peter Eisentraut wrote:

As of d9dd406fe281d22d5238d3c26a7182543c711e74, we require MSVC 2013,
which means _MSC_VER >= 1800. This means that conditionals about
older versions of _MSC_VER can be removed or simplified.

Previous code was also in some cases handling MinGW, where _MSC_VER is
not defined at all, incorrectly, such as in pg_ctl.c and win32_port.h,
leading to some compiler warnings. This should now be handled better.

Thanks Peter for cleaning up this code. I have looked at it, did some
testing and it looks good to me. No spots are visibly missing.

pushed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services