From 824bcdf053bfb86570c7edda3c018626dc857a8b Mon Sep 17 00:00:00 2001 From: Philippe Cerfon Date: Tue, 30 May 2023 13:16:18 +0200 Subject: [PATCH] export XATTR_{NAME,SIZE,LIST}_MAX These are used for example by CPython. XATTR_NAME_MAX should correspond to MAX_EA_NAME_LEN and XATTR_SIZE_MAX to MAX_EA_VALUE_LEN. It's unclear whether Windows imposes a maximum number of EA's per file and which value should be used for XATTR_LIST_MAX, so for now Linux' value. Signed-off-by: Philippe Cerfon --- winsup/cygwin/include/cygwin/limits.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/winsup/cygwin/include/cygwin/limits.h b/winsup/cygwin/include/cygwin/limits.h index aefc7c7bd..939ab4f38 100644 --- a/winsup/cygwin/include/cygwin/limits.h +++ b/winsup/cygwin/include/cygwin/limits.h @@ -56,4 +56,11 @@ details. */ #define __PATH_MAX 4096 #define __PIPE_BUF 4096 +/* Keep in sync with MAX_EA_NAME_LEN respectively MAX_EA_VALUE_LEN in + * winsup/cygwin/ntea.cc but don not use values that exceed their Linux + * counterparts as defined in linux/limits.h. */ +#define XATTR_NAME_MAX 255 +#define XATTR_SIZE_MAX 65536 +#define XATTR_LIST_MAX 65536 + #endif /* _CYGWIN_LIMITS_H__ */ -- 2.40.1