aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistvalidate.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-09-09 10:52:17 +0900
committerMichael Paquier <michael@paquier.xyz>2022-09-09 10:52:17 +0900
commit47bd0b3fa601642b6cfbe79ad956d4a9fc835ba1 (patch)
tree4f567f0cc8b572222846e3f2de2b204befa2e47c /src/backend/access/gist/gistvalidate.c
parentdf4a056619a7e9868ec43a15e2088ff8ccf94471 (diff)
downloadpostgresql-47bd0b3fa601642b6cfbe79ad956d4a9fc835ba1.tar.gz
postgresql-47bd0b3fa601642b6cfbe79ad956d4a9fc835ba1.zip
Replace load of functions by direct calls for some WIN32
This commit changes the following code paths to do direct system calls to some WIN32 functions rather than loading them from an external library, shaving some code in the process: - Creation of restricted tokens in pg_ctl.c, introduced by a25cd81. - QuerySecurityContextToken() in auth.c for SSPI authentication in the backend, introduced in d602592. - CreateRestrictedToken() in src/common/. This change is similar to the case of pg_ctl.c. Most of these functions were loaded rather than directly called because, as mentioned in the code comments, MinGW headers were not declaring them. I have double-checked the recent MinGW code, and all the functions changed here are declared in its headers, so this change should be safe. Note that I do not have a MinGW environment at hand so I have not tested it directly, but that MSVC was fine with the change. The buildfarm will tell soon enough if this change is appropriate or not for a much broader set of environments. A few code paths still use GetProcAddress() to load some functions: - LDAP authentication for ldap_start_tls_sA(), where I am not confident that this change would work. - win32env.c and win32ntdll.c where we have a per-MSVC version dependency for the name of the library loaded. - crashdump.c for MiniDumpWriteDump() and EnumDirTree(), where direct calls were not able to work after testing. Reported-by: Thomas Munro Reviewed-by: Justin Prysby Discussion: https://postgr.es/m/CA+hUKG+BMdcaCe=P-EjMoLTCr3zrrzqbcVE=8h5LyNsSVHKXZA@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistvalidate.c')
0 files changed, 0 insertions, 0 deletions