gh-90026: support XATTRs on Cygwin (GH-105075)

This commit is contained in:
Philippe Cerfon 2023-11-03 10:37:46 +01:00 committed by GitHub
parent 7bcf184dac
commit 7810b6981a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1 @@
Define ``USE_XATTRS`` on Cygwin so that XATTR-related functions in the :mod:`os` module become available.

View File

@ -292,9 +292,15 @@ corresponding Unix manual entries for more information on calls.");
# undef HAVE_SCHED_SETAFFINITY
#endif
#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LINUX_LIMITS_H) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
# define USE_XATTRS
# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
#if defined(HAVE_SYS_XATTR_H)
# if defined(HAVE_LINUX_LIMITS_H) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
# define USE_XATTRS
# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
# endif
# if defined(__CYGWIN__)
# define USE_XATTRS
# include <cygwin/limits.h> // Needed for XATTR_SIZE_MAX and XATTR_LIST_MAX.
# endif
#endif
#ifdef USE_XATTRS