diff options
| -rw-r--r-- | configure.ac | 3 | ||||
| -rw-r--r-- | src/dired.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 8ff0e21fbf6..774f8e5eb92 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -5734,6 +5734,9 @@ case $opsys,$emacs_uname_r in | |||
| 5734 | AC_MSG_WARN([[building Emacs on Cygwin 1.5 is not supported.]]) | 5734 | AC_MSG_WARN([[building Emacs on Cygwin 1.5 is not supported.]]) |
| 5735 | echo | 5735 | echo |
| 5736 | ;; | 5736 | ;; |
| 5737 | cygwin,3.0.[[0-7]]'('*) | ||
| 5738 | AC_DEFINE([HAVE_CYGWIN_O_PATH_BUG], 1, | ||
| 5739 | [Define to 1 if opening a FIFO with O_PATH causes a hang.]);; | ||
| 5737 | esac | 5740 | esac |
| 5738 | 5741 | ||
| 5739 | # Remove any trailing slashes in these variables. | 5742 | # Remove any trailing slashes in these variables. |
diff --git a/src/dired.c b/src/dired.c index b8197d36a02..b700013f6a8 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -41,10 +41,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 41 | #include "buffer.h" | 41 | #include "buffer.h" |
| 42 | #include "coding.h" | 42 | #include "coding.h" |
| 43 | 43 | ||
| 44 | #ifdef __CYGWIN__ | ||
| 45 | # undef O_PATH /* Buggy in Cygwin 3.0.0 through 3.0.7. */ | ||
| 46 | #endif | ||
| 47 | |||
| 48 | #ifdef MSDOS | 44 | #ifdef MSDOS |
| 49 | #include "msdos.h" /* for fstatat */ | 45 | #include "msdos.h" /* for fstatat */ |
| 50 | #endif | 46 | #endif |
| @@ -941,7 +937,7 @@ file_attributes (int fd, char const *name, | |||
| 941 | 937 | ||
| 942 | int err = EINVAL; | 938 | int err = EINVAL; |
| 943 | 939 | ||
| 944 | #ifdef O_PATH | 940 | #if defined O_PATH && !defined HAVE_CYGWIN_O_PATH_BUG |
| 945 | int namefd = openat (fd, name, O_PATH | O_CLOEXEC | O_NOFOLLOW); | 941 | int namefd = openat (fd, name, O_PATH | O_CLOEXEC | O_NOFOLLOW); |
| 946 | if (namefd < 0) | 942 | if (namefd < 0) |
| 947 | err = errno; | 943 | err = errno; |