Fix for SHGetSpecialFolderPath

Lists: pgsql-patches
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Fix for SHGetSpecialFolderPath
Date: 2005-01-24 21:01:25
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE4766DB@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Attached patch fixes the SHGetSpecialFolderPath issues on NT4. It does
this by using SHGetFolderPath instead of SHGetSpecialFolderPath, and
linking to shfolder.dll instead of shell32.dll. shfolder.dll exists as a
redistributable from Microsoft in case it is needed on a system, and
it's supported on all current windows platforms.

I have tested the patch on 2003, XP, 2000 and NT4, and it passes on all
of them (I verified that psqlrc.conf and pgpass.conf works - I'm
assuming the rest of the fiels work as well then since they use the same
function to get the file).

MingW and MSVC builds updated, haven't touched the Borland stuff.

Please consider for both 8.0.1 and HEAD. (and if some more win32 ppl can
test it, even better :P)

//Magnus

Attachment Content-Type Size
shfolder.patch application/octet-stream 6.7 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Fix for SHGetSpecialFolderPath
Date: 2005-01-26 19:24:38
Message-ID: 18153.1106767478@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> Attached patch fixes the SHGetSpecialFolderPath issues on NT4. It does
> this by using SHGetFolderPath instead of SHGetSpecialFolderPath, and
> linking to shfolder.dll instead of shell32.dll. shfolder.dll exists as a
> redistributable from Microsoft in case it is needed on a system, and
> it's supported on all current windows platforms.

Applied.

regards, tom lane