postgresql/config
Peter Eisentraut 8f3ec75de4 Enable Unix-domain sockets support on Windows
As of Windows 10 version 1803, Unix-domain sockets are supported on
Windows.  But it's not automatically detected by configure because it
looks for struct sockaddr_un and Windows doesn't define that.  So we
just make our own definition on Windows and override the configure
result.

Set DEFAULT_PGSOCKET_DIR to empty on Windows so by default no
Unix-domain socket is used, because there is no good standard
location.

In pg_upgrade, we have to do some extra tweaking to preserve the
existing behavior of not using Unix-domain sockets on Windows.  Adding
support would be desirable, but it needs further work, in particular a
way to select whether to use Unix-domain sockets from the command-line
or with a run-time test.

The pg_upgrade test script needs a fix.  The previous code passed
"localhost" to postgres -k, which only happened to work because
Windows used to ignore the -k argument value altogether.  We instead
need to pass an empty string to get the desired effect.

The test suites will continue to not use Unix-domain sockets on
Windows.  This requires a small tweak in pg_regress.c.  The TAP tests
don't need to be changed because they decide by the operating system
rather than HAVE_UNIX_SOCKETS.

Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com
2020-03-28 15:01:01 +01:00
..
ac_func_accept_argtypes.m4 Reorder configure tests for accept() in Windows 2019-03-04 14:42:12 -05:00
ax_prog_perl_modules.m4 Make configure check for IPC::Run when --enable-tap-tests is specified. 2017-06-15 15:56:12 -04:00
ax_pthread.m4 Update config/ax_pthread.m4 to latest upstream version. 2018-11-19 15:05:33 -05:00
c-compiler.m4 Assume that we have signed integral types and flexible array members. 2020-02-21 14:30:48 -05:00
c-library.m4 Enable Unix-domain sockets support on Windows 2020-03-28 15:01:01 +01:00
check_decls.m4 Fix configure's AC_CHECK_DECLS tests to work correctly with clang. 2018-11-19 12:01:47 -05:00
config.guess Update config.guess and config.sub 2019-04-27 14:25:00 +02:00
config.sub Update config.guess and config.sub 2019-04-27 14:25:00 +02:00
docbook.m4 Convert documentation to DocBook XML 2017-11-23 09:44:28 -05:00
general.m4
install-sh
libtool.m4
llvm.m4 Use better comment marker in Autoconf input 2019-02-09 15:55:17 +01:00
Makefile Install our "missing" script where PGXS builds can find it. 2015-12-11 16:15:05 -05:00
missing
perl.m4 configure: More use of AC_ARG_VAR 2019-01-18 08:38:34 +01:00
pkg.m4 ICU support 2017-03-23 15:28:48 -04:00
prep_buildtree Fix vpath build 2019-03-27 23:36:00 +01:00
programs.m4 Add configure probe for rl_completion_suppress_quote. 2020-01-23 18:20:57 -05:00
python.m4 Remove support for Python older than 2.6 2020-01-08 22:47:22 +01:00
tcl.m4 configure: More use of AC_ARG_VAR 2019-01-18 08:38:34 +01:00