From e9282e953205a2f3125fc8d1052bc01cb77cd2a3 Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Fri, 8 Jan 2016 11:48:39 -0300
Subject: [PATCH] Blind attempt at a Cygwin fix

Further portability fix for a967613911f7.  Mingw- and MSVC-based builds
appear to be working fine, but Cygwin needs an extra tweak whereby the
new win32security.c file is explicitely added to the list of files to
build in pgport, per Cygwin members brolga and lorikeet.

Author: Michael Paquier
---
 configure    | 6 ++++++
 configure.in | 1 +
 2 files changed, 7 insertions(+)

diff --git a/configure b/configure
index 3dd1b152c6c..ab213a12c1a 100755
--- a/configure
+++ b/configure
@@ -13075,6 +13075,12 @@ if test "$PORTNAME" = "cygwin"; then
  ;;
 esac
 
+  case " $LIBOBJS " in
+  *" win32security.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
+ ;;
+esac
+
 fi
 
 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
diff --git a/configure.in b/configure.in
index 93984822e47..41402dfaa49 100644
--- a/configure.in
+++ b/configure.in
@@ -1596,6 +1596,7 @@ fi
 # Cygwin needs only a bit of that
 if test "$PORTNAME" = "cygwin"; then
   AC_LIBOBJ(dirmod)
+  AC_LIBOBJ(win32security)
 fi
 
 AC_CHECK_DECLS([sys_siglist], [], [],
-- 
GitLab