From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by sourceware.org (Postfix) with ESMTPS id 2BCC53857704 for ; Tue, 30 May 2023 11:43:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BCC53857704 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-565cdb77b01so39714017b3.0 for ; Tue, 30 May 2023 04:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685446987; x=1688038987; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CbYBhuI2FnOQyP5aMRWfrPu6T2awYs4xZ/Ow7/Kge0s=; b=TjyoiXOKJPS0R/OiAeWASWizd3xIKYj8+OpBPGZaxZEpehXTxIdoX3KAPjla5ahBnZ MxshMPxIPll6xRsFyX/8bqMt3VcK9+uEsrMeeYCwU2ulrKEGk+d8B3nmOMgZTrFlPtic giTKHkbqAR3OdHLxo2qxO9AVUtZZhBVPO6tIzwIo0VYhac4HSkDRQDJaj087+vmImLOa 49Uc8+iSdhdlLkS70HRlnH855a7yOQFRbFq3F+3prv2YnAROYC7mavxQCVFrS2ps1GRz c36HT3FE64/K9r7ouJSzrSj2S2ixOqsLYHiRVTu/9o2S8kJznracGmKR+IDtcnaUn58d 9HrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685446987; x=1688038987; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CbYBhuI2FnOQyP5aMRWfrPu6T2awYs4xZ/Ow7/Kge0s=; b=eMu1XXvqI1/CuPGc9B2Z6+uGtn5S9NLxXHOP/q22RYd9xsYL5LsxA72Z8eh0+f07Pq +DyjT3qp5Bznm76dUQqF2xpUVu0ThaGTMpHVwgKEbIGPmENcDAIf5pNqskGowrbbGv3k cWuyik0+d23zKiCMlYXvcuw+47UJ5OCgapGCLofV0JzNSV6o3QZzZcZidLtrysuPynxd CI+9K9IqAl+D2eEa/MmJmj9FvRV44riwWqUbKXNH7nRvDX0fXRTZKTRWb7jhHbPVYMUe IESTkdm529usXYsOE29g6M0NMn5VQ6yf8vaXMaenP6FYqZhfWJTcwPcHCJLiQLz/ZPty BspA== X-Gm-Message-State: AC+VfDzmJUAk0CFMDTmuu79mvvjPHLOV81reGlzEAZ8xe4bPMCqp1lE/ LuITVrjYLZlxIQ/YYGaZD6+avVKjqKNkCNH/UVD54ppoHzA= X-Google-Smtp-Source: ACHHUZ7Woj644uOC7BGdW4mu+hC1ELotHsTlVin4ICbRlNnUy9bRTaquip9QNI86+OqWFCHAAPsIlLWXjZi+Rc/rBGc= X-Received: by 2002:a0d:d54a:0:b0:561:aa98:1a99 with SMTP id x71-20020a0dd54a000000b00561aa981a99mr1774413ywd.45.1685446987395; Tue, 30 May 2023 04:43:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: marco atzeri Date: Tue, 30 May 2023 13:42:56 +0200 Message-ID: Subject: Re: set XATTR_SIZE_MAX and XATTR_LIST_MAX in cygwin/limits.h (was: python + XATTRs under cygwin?) To: Philippe Cerfon Cc: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, May 30, 2023 at 1:29=E2=80=AFPM Philippe Cerfon via Cygwin wrote: > > Just for the records: > > I've made a PR against CPython that would enable XATTRs with Cygwin: > https://github.com/python/cpython/pull/105075 > > and sent a patch against newlib, which is AFAICS the right place to > have the XATTR_*_MAX exported: > https://sourceware.org/pipermail/newlib/2023/020347.html > > Thanks, > Philippe > > On Tue, May 30, 2023 at 3:37=E2=80=AFAM Philippe Cerfon wrote: > > > > Hey. > > > > I did some further tests as described in detail at > > https://github.com/python/cpython/issues/90026#issuecomment-1567631574 > > and it turns out that Python's code would already support XATTRs on > > Cygwin if the necessary defines were in place. > > > > Currently, the most recent version of Python in cygwin is 3.9.9, which latest is 3.9.16 https://cygwin.com/packages/summary/python39-src.html > > uses the following check in cpython/Modules/posixmodule.c: > > #if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) && > > !defined(__FreeBSD_kernel__) && !defined(__GNU__) > > > > in order to determine whether the XATTR code should be compiled or not. > > > > In CPython=E2=80=99s master this was changed to: > > #if defined(HAVE_SYS_XATTR_H) && defined(__linux__) && > > !defined(__FreeBSD_kernel__) && !defined(__GNU__) > > > > I plan on making a PR against CPython, which would also set the > > necessary symbol, if __CYGWIN__ is defined. > > > > > > There are however two problems: > > 1) Compilation then fails, as the code needs the symbols > > XATTR_SIZE_MAX and XATTR_LIST_MAX, which on Linux are defined in > > linux/limits.h as: > > #define XATTR_SIZE_MAX 65536 /* size of an extended attribute > > value (64k) */ > > #define XATTR_LIST_MAX 65536 /* size of extended attribute > > namelist (64k) */ > > > > This would need to be added to cygwin/limits.h with whichever values > > are proper for Cygwin (not sure how to find out?) > > > > > > 2) I guess the changes in CPython won't be backported (and it's not > > even merged)... so Cygwin's Python maintainer will hopefully find the > > time to package newer versions. > > So there will probably quite some time, until it finally works in Pytho= n. > > > > > > Anyway, whom can I ask or (1)? > > > > > > Thanks, > > Philippe. I will look on that, but do not expect anything in short term Regards Marco