diff options
| author | Ken Brown | 2019-06-29 15:03:34 -0400 |
|---|---|---|
| committer | Ken Brown | 2019-06-29 15:03:34 -0400 |
| commit | 0b2841f9fb0ffd8514b0fb99c5673adad6b07abb (patch) | |
| tree | 7ffe55bddf7d528262980d3737624d6760a9c3f5 /src | |
| parent | 74a5a332fee8a346cf65ed6656c1b08dc1df5fde (diff) | |
| download | emacs-0b2841f9fb0ffd8514b0fb99c5673adad6b07abb.tar.gz emacs-0b2841f9fb0ffd8514b0fb99c5673adad6b07abb.zip | |
Simplify workaround for Cygwin O_PATH bug
Suggested by Paul Eggert (Bug#36405#22).
* configure.ac (HAVE_CYGWIN_O_PATH_BUG): New AC_DEFINE, for Cygwin
versions 3.0.0 through 3.0.7.
* src/dired.c (O_PATH) [__CYGWIN__]: Remove #undef.
(file_attributes) [HAVE_CYGWIN_O_PATH_BUG]: Don't use O_PATH.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 6 |
1 files changed, 1 insertions, 5 deletions
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; |