Subject: Extend workaround for Cygwin O_PATH bug
From: Ken Brown <[email-masked]>
To: [email-masked]
Date: Fri, 31 Jan 2020 11:14:47 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Commit 0b2841f9 introduced a workaround for a problem opening FIFOs with the 
O_PATH flag, in Cygwin versions 3.0.0 through 3.0.7.  It turns out that there 
are problems opening sockets and symlinks with O_PATH in versions 3.1.0 through 
3.1.2, so the workaround needs to be extended to these versions.

The attached patch does this.  The bug number still has to be filled in.

In GNU Emacs 27.0.60 (build 2, x86_64-pc-cygwin, GTK+ Version 3.22.28) of 2020-01-30
Repository revision: de411615344d1551d685e45b0739e1f738cf4afd
Repository branch: emacs-27

From a230864098711e94251b701888475385c77c016d Mon Sep 17 00:00:00 2001
From: Ken Brown <[email-masked]>
Date: Thu, 30 Jan 2020 21:58:33 -0500
Subject: [PATCH] Extend workaround for Cygwin O_PATH bug

* configure.ac (HAVE_CYGWIN_O_PATH_BUG): Extend to Cygwin versions
3.1.0 through 3.1.2.  (Bug#99999)
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 02ec57e6ab..3c47da6dcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5751,9 +5751,9 @@ AC_DEFUN
     AC_MSG_WARN([[building Emacs on Cygwin 1.5 is not supported.]])
            echo
 	   ;;
-  cygwin,3.0.[[0-7]]'('*)
+  cygwin,3.0.[[0-7]]'('* | cygwin,3.1.[[0-2]]'('*)
     AC_DEFINE([HAVE_CYGWIN_O_PATH_BUG], 1,
-      [Define to 1 if opening a FIFO with O_PATH causes a hang.]);;
+      [Define to 1 if opening a FIFO, socket, or symlink with O_PATH is buggy.]);;
 esac
 
 # Remove any trailing slashes in these variables.
-- 
2.21.0