pgsql: Clean up warnings in MinGW builds.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up warnings in MinGW builds.
Date: 2017-11-16 22:57:43
Message-ID: E1eFT6N-0004jU-Nb@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clean up warnings in MinGW builds.

Experimentation with modern MinGW (specifically the 5.0.2 version packaged
for Fedora 26) shows that its version of sys/stat.h *does* provide S_IRGRP
and friends, contrary to the expectation of win32_port.h. This results in
an astonishing number of compiler warnings, and perhaps in incorrect code
--- I'm not sure if the nonzero values supplied by MinGW's header actually
do anything. Hence, adjust win32_port.h to only define these macros if
<sys/stat.h> doesn't.

This might be worth back-patching, but given the lack of complaints so
far, I'm not too excited about it.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/09a777447a858a01ac4d547d678ba295d9542c3b

Modified Files
--------------
src/include/port/win32_port.h | 70 +++++++++++++++++++++++++++++--------------
1 file changed, 47 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2017-11-17 01:43:34 pgsql: Provide DSM segment to ExecXXXInitializeWorker functions.
Previous Message Tom Lane 2017-11-16 21:23:14 pgsql: Make PL/Python handle domain-type conversions correctly.