Skip to content

Commit

Permalink
pythongh-90026: support XATTRs on Cygwin (pythonGH-105075)
Browse files Browse the repository at this point in the history
  • Loading branch information
philcerf authored and aisk committed Feb 11, 2024
1 parent 2f2b82b commit 23c76e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Define ``USE_XATTRS`` on Cygwin so that XATTR-related functions in the :mod:`os` module become available.
12 changes: 9 additions & 3 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23c76e6

Please sign in to comment.