Skip to content

Commit 7810b69

Browse files
authored
gh-90026: support XATTRs on Cygwin (GH-105075)
1 parent 7bcf184 commit 7810b69

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Define ``USE_XATTRS`` on Cygwin so that XATTR-related functions in the :mod:`os` module become available.

Modules/posixmodule.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,15 @@ corresponding Unix manual entries for more information on calls.");
292292
# undef HAVE_SCHED_SETAFFINITY
293293
#endif
294294

295-
#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LINUX_LIMITS_H) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
296-
# define USE_XATTRS
297-
# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
295+
#if defined(HAVE_SYS_XATTR_H)
296+
# if defined(HAVE_LINUX_LIMITS_H) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
297+
# define USE_XATTRS
298+
# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
299+
# endif
300+
# if defined(__CYGWIN__)
301+
# define USE_XATTRS
302+
# include <cygwin/limits.h> // Needed for XATTR_SIZE_MAX and XATTR_LIST_MAX.
303+
# endif
298304
#endif
299305

300306
#ifdef USE_XATTRS

0 commit comments

Comments
 (0)