mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
MinGW: Link with shell32.dll instead of shfolder.dll.
This improves consistency with the MSVC build. On buildfarm member narwhal, since commit846e91e022
, shfolder.dll:SHGetFolderPath() crashes when dblink calls it by way of pqGetHomeDirectory(). Back-patch to 9.4, where that commit first appeared. How it caused this regression remains a mystery. This is a partial revert of commit889f038129
, which adopted shfolder.dll for Windows NT 4.0 compatibility. PostgreSQL 8.2 dropped support for that operating system.
This commit is contained in:
@ -785,9 +785,11 @@ get_home_path(char *ret_path)
|
||||
char *tmppath;
|
||||
|
||||
/*
|
||||
* Note: We use getenv here because the more modern
|
||||
* SHGetSpecialFolderPath() will force us to link with shell32.lib which
|
||||
* eats valuable desktop heap.
|
||||
* Note: We use getenv() here because the more modern SHGetFolderPath()
|
||||
* would force the backend to link with shell32.lib, which eats valuable
|
||||
* desktop heap. XXX This function is used only in psql, which already
|
||||
* brings in shell32 via libpq. Moving this function to its own file
|
||||
* would keep it out of the backend, freeing it from this concern.
|
||||
*/
|
||||
tmppath = getenv("APPDATA");
|
||||
if (!tmppath)
|
||||
|
Reference in New Issue
Block a user