Remove configure probe for dlopen, and refactor.
authorThomas Munro <tmunro@postgresql.org>
Thu, 4 Aug 2022 21:12:45 +0000 (09:12 +1200)
committerThomas Munro <tmunro@postgresql.org>
Thu, 4 Aug 2022 21:12:45 +0000 (09:12 +1200)
commitca1e85513e1c92afb80a74935cbbb6f7e4a3ccf9
tree30f8c430f3f63b856fda4e5f3553ec4fb04577e3
parent87e22f675fd81ba1d96b0b9a34bbf26d5ec532d5
Remove configure probe for dlopen, and refactor.

dlopen() is in SUSv2 and all targeted Unix systems have it.  We still
need replacement functions for Windows, but we don't need a configure
probe for that.

Since it's no longer needed by other operating systems, rename dlopen.c
to win32dlopen.c and move the declarations into win32_port.h.

Likewise, the macros RTLD_NOW and RTLD_GLOBAL now only need to be
defined on Windows, since all targeted Unix systems have 'em.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com
configure
configure.ac
src/backend/utils/fmgr/dfmgr.c
src/include/pg_config.h.in
src/include/port.h
src/include/port/win32_port.h
src/port/win32dlopen.c [moved from src/port/dlopen.c with 93% similarity]
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Solution.pm