Preprocessor condition fix
Here is a one-line patch to fix a wrong preprocessor condition in
pg_regress, found because the VS 2015 compiler warns on the cast in the
32-bit branch where apparently earlier versions did not.
According to git grep, this is the only place where WIN64 is used
without the leading underscore.
--
Christian
Attachments:
0001-Fixed-preprocessor-condition-WIN64-_WIN64.patchtext/plain; charset=UTF-8; name=0001-Fixed-preprocessor-condition-WIN64-_WIN64.patchDownload
From 9bc9e8ed79747f7bf3e727c9f64f4a088de589fb Mon Sep 17 00:00:00 2001
From: Christian Ullrich <chris@chrullrich.net>
Date: Mon, 11 Apr 2016 15:47:20 +0200
Subject: [PATCH] Fixed preprocessor condition (WIN64 -> _WIN64).
---
src/test/regress/pg_regress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 1674445..2f6f56d 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -2386,7 +2386,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
postmaster_running = true;
-#ifdef WIN64
+#ifdef _WIN64
/* need a series of two casts to convert HANDLE without compiler warning */
#define ULONGPID(x) (unsigned long) (unsigned long long) (x)
#else
--
2.7.0.windows.1
Christian Ullrich <chris@chrullrich.net> writes:
Here is a one-line patch to fix a wrong preprocessor condition in
pg_regress, found because the VS 2015 compiler warns on the cast in the
32-bit branch where apparently earlier versions did not.
Pushed, thanks.
According to git grep, this is the only place where WIN64 is used
without the leading underscore.
Hm, my grep found another one ...
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Tom Lane wrote:
Christian Ullrich <chris@chrullrich.net> writes:
According to git grep, this is the only place where WIN64 is used
without the leading underscore.Hm, my grep found another one ...
Oh, sorry. I saw that one, but thought it was intentional because _WIN64
is defined automatically anyway.
--
Christian
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Christian Ullrich <chris@chrullrich.net> writes:
* Tom Lane wrote:
Hm, my grep found another one ...
Oh, sorry. I saw that one, but thought it was intentional because _WIN64
is defined automatically anyway.
Oh? Then we should not need that one (the /D switch in win32.mak) at all.
Should we just remove it?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Christian Ullrich <chris@chrullrich.net> writes:
* Tom Lane wrote:
Hm, my grep found another one ...
Oh, sorry. I saw that one, but thought it was intentional because _WIN64
is defined automatically anyway.Oh? Then we should not need that one (the /D switch in win32.mak) at all.
Should we just remove it?
We have both confirmed several times that nothing depends on it. I think it can go.
--
Christian
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Christian Ullrich <chris@chrullrich.net> writes:
* Tom Lane wrote:
Oh? Then we should not need that one (the /D switch in win32.mak) at all.
Should we just remove it?
We have both confirmed several times that nothing depends on it. I think it can go.
Done.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers