[COMMITTERS] pgsql: Refine win32env.c cosmetics.

2016-12-03 Thread Noah Misch
Refine win32env.c cosmetics. Replace use of plain 0 as a null pointer constant. In comments, update terminology and lessen redundancy. Back-patch to 9.2 (all supported versions) for the convenience of back-patching the next two commits. Christian Ullrich and Noah Misch, reviewed (in earlier ver

[COMMITTERS] pgsql: Remove wrong CloseHandle() call.

2016-12-03 Thread Noah Misch
Remove wrong CloseHandle() call. In accordance with its own documentation, invoke CloseHandle() only when directed in the documentation for the function that furnished the handle. GetModuleHandle() does not so direct. We have been issuing this call only in the rare event that a CRT DLL contains

[COMMITTERS] pgsql: Refine win32env.c cosmetics.

2016-12-03 Thread Noah Misch
Refine win32env.c cosmetics. Replace use of plain 0 as a null pointer constant. In comments, update terminology and lessen redundancy. Back-patch to 9.2 (all supported versions) for the convenience of back-patching the next two commits. Christian Ullrich and Noah Misch, reviewed (in earlier ver

[COMMITTERS] pgsql: Refine win32env.c cosmetics.

2016-12-03 Thread Noah Misch
Refine win32env.c cosmetics. Replace use of plain 0 as a null pointer constant. In comments, update terminology and lessen redundancy. Back-patch to 9.2 (all supported versions) for the convenience of back-patching the next two commits. Christian Ullrich and Noah Misch, reviewed (in earlier ver

[COMMITTERS] pgsql: Refine win32env.c cosmetics.

2016-12-03 Thread Noah Misch
Refine win32env.c cosmetics. Replace use of plain 0 as a null pointer constant. In comments, update terminology and lessen redundancy. Back-patch to 9.2 (all supported versions) for the convenience of back-patching the next two commits. Christian Ullrich and Noah Misch, reviewed (in earlier ver

[COMMITTERS] pgsql: Remove wrong CloseHandle() call.

2016-12-03 Thread Noah Misch
Remove wrong CloseHandle() call. In accordance with its own documentation, invoke CloseHandle() only when directed in the documentation for the function that furnished the handle. GetModuleHandle() does not so direct. We have been issuing this call only in the rare event that a CRT DLL contains

[COMMITTERS] pgsql: Make pgwin32_putenv() visit debug CRTs.

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() visit debug CRTs. This has no effect in the most conventional case, where no relevant DLL uses a debug build. For an example where it does matter, given a debug build of MIT Kerberos, the krb_server_keyfile parameter usually had no effect. Since nobody wants a Heisenbug, ba

[COMMITTERS] pgsql: Refine win32env.c cosmetics.

2016-12-03 Thread Noah Misch
Refine win32env.c cosmetics. Replace use of plain 0 as a null pointer constant. In comments, update terminology and lessen redundancy. Back-patch to 9.2 (all supported versions) for the convenience of back-patching the next two commits. Christian Ullrich and Noah Misch, reviewed (in earlier ver

[COMMITTERS] pgsql: Make pgwin32_putenv() visit debug CRTs.

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() visit debug CRTs. This has no effect in the most conventional case, where no relevant DLL uses a debug build. For an example where it does matter, given a debug build of MIT Kerberos, the krb_server_keyfile parameter usually had no effect. Since nobody wants a Heisenbug, ba

[COMMITTERS] pgsql: Remove wrong CloseHandle() call.

2016-12-03 Thread Noah Misch
Remove wrong CloseHandle() call. In accordance with its own documentation, invoke CloseHandle() only when directed in the documentation for the function that furnished the handle. GetModuleHandle() does not so direct. We have been issuing this call only in the rare event that a CRT DLL contains

[COMMITTERS] pgsql: Make pgwin32_putenv() visit debug CRTs.

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() visit debug CRTs. This has no effect in the most conventional case, where no relevant DLL uses a debug build. For an example where it does matter, given a debug build of MIT Kerberos, the krb_server_keyfile parameter usually had no effect. Since nobody wants a Heisenbug, ba

[COMMITTERS] pgsql: Remove wrong CloseHandle() call.

2016-12-03 Thread Noah Misch
Remove wrong CloseHandle() call. In accordance with its own documentation, invoke CloseHandle() only when directed in the documentation for the function that furnished the handle. GetModuleHandle() does not so direct. We have been issuing this call only in the rare event that a CRT DLL contains

[COMMITTERS] pgsql: Refine win32env.c cosmetics.

2016-12-03 Thread Noah Misch
Refine win32env.c cosmetics. Replace use of plain 0 as a null pointer constant. In comments, update terminology and lessen redundancy. Back-patch to 9.2 (all supported versions) for the convenience of back-patching the next two commits. Christian Ullrich and Noah Misch, reviewed (in earlier ver

[COMMITTERS] pgsql: Make pgwin32_putenv() visit debug CRTs.

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() visit debug CRTs. This has no effect in the most conventional case, where no relevant DLL uses a debug build. For an example where it does matter, given a debug build of MIT Kerberos, the krb_server_keyfile parameter usually had no effect. Since nobody wants a Heisenbug, ba

[COMMITTERS] pgsql: Make pgwin32_putenv() visit debug CRTs.

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() visit debug CRTs. This has no effect in the most conventional case, where no relevant DLL uses a debug build. For an example where it does matter, given a debug build of MIT Kerberos, the krb_server_keyfile parameter usually had no effect. Since nobody wants a Heisenbug, ba

[COMMITTERS] pgsql: Make pgwin32_putenv() visit debug CRTs.

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() visit debug CRTs. This has no effect in the most conventional case, where no relevant DLL uses a debug build. For an example where it does matter, given a debug build of MIT Kerberos, the krb_server_keyfile parameter usually had no effect. Since nobody wants a Heisenbug, ba

[COMMITTERS] pgsql: Remove wrong CloseHandle() call.

2016-12-03 Thread Noah Misch
Remove wrong CloseHandle() call. In accordance with its own documentation, invoke CloseHandle() only when directed in the documentation for the function that furnished the handle. GetModuleHandle() does not so direct. We have been issuing this call only in the rare event that a CRT DLL contains

[COMMITTERS] pgsql: Remove wrong CloseHandle() call.

2016-12-03 Thread Noah Misch
Remove wrong CloseHandle() call. In accordance with its own documentation, invoke CloseHandle() only when directed in the documentation for the function that furnished the handle. GetModuleHandle() does not so direct. We have been issuing this call only in the rare event that a CRT DLL contains

[COMMITTERS] pgsql: Make pgwin32_putenv() follow DLL loading and unloading.

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() follow DLL loading and unloading. Until now, the first putenv() call of a given postgres.exe process would cache the set of loaded CRTs. If a CRT unloaded after that call, the next putenv() would crash. That risk was largely theoretical, because the first putenv() precedes

[COMMITTERS] pgsql: Document recipe for testing compatibility with old Perl.

2016-12-03 Thread Noah Misch
Document recipe for testing compatibility with old Perl. Craig Ringer, reviewed by Kyotaro HORIGUCHI and Michael Paquier. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/d61aa6ae655a37d757b68d20ad18a4683c280c14 Modified Files -- src/test/perl/README | 18

[COMMITTERS] pgsql: Make pgwin32_putenv() probe every known CRT, regardless of compi

2016-12-03 Thread Noah Misch
Make pgwin32_putenv() probe every known CRT, regardless of compiler. This extends to MinGW builds the provision for MSVC-built libraries to see putenv() effects. Doing so repairs, for example, the handling of the krb_server_keyfile parameter when linked with MSVC-built MIT Kerberos. Like the pre