From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id E54143858C27 for ; Tue, 30 May 2023 01:37:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E54143858C27 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-pg1-x535.google.com with SMTP id 41be03b00d2f7-53f9a376f3eso895055a12.0 for ; Mon, 29 May 2023 18:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685410667; x=1688002667; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UfGfR7GVbyGB8aPoW+44iY1lrGqIdFTCAG0tihGqfKU=; b=p2qOjm11sv19fjgDxwD8kX/ntmzKIbHyfhIwZugEW/FKfeidoEwdFyLGPwYk2om8Sa 1a7KvouUPTMGplHtuvhJkWGp8pV/5bjX0FMHUG8wmCjNtxWJIRaQ2G8dXAsjtWYi/Atu /NxCApwsGY/kx49gN/Eidg0dj4CwrTFpOP3XRgEBzOXECvMhe+xnRXQg6OKZ4YqWT8cF hEtxC+BzWdMggdhuizJdNYTAwKII0BG6J8rVGa83+IyzG2UkIBqFujjvKY+Gmtvy/U+x KdFrOlMACtGko7INORr9loDmAplZc1lg57ZX8QPzRbeZlKqwpsuRnmv4VABm6h/qp7tX shCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685410667; x=1688002667; h=content-transfer-encoding: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=UfGfR7GVbyGB8aPoW+44iY1lrGqIdFTCAG0tihGqfKU=; b=es/CcuMZaICdnLZcGAOtkpNMAkLqOwXHutrP4Eg44UyKSKuUqYleE6Bvw3elOXlYa9 Nf7QxsmJFnj8n/5YXumuikYKEydZGT4yTP6IHqQQhZ+ZOq2TIeygM+sJQrk2BigR2uzr sXcwTtN3MG0SeSRrO3zKO9H3S3N3VbhXa/u3z2pDI7OQcow/vQGYmcv3oMWcaSw2SsPG NPYa1sEgNPcdANUEZPNQEJQ/5r7F+A318OywleR+w+KPjCNEgkx+bk3rW9MQIu8HzxZo wDrVgadY6iwncYhpMhg7l8NA1JPrxi5D+z1UwCpEBGUlE3/joK6YFgvwkIq2bk0q6V9k x0yg== X-Gm-Message-State: AC+VfDxBvQlM3txH/kiuCLWC+iXFxe6xWS/82jwvIbc/Hf0Y3U38IGyZ 95Gs+7EByNcwzBhsCoYJ7VobytaqS+6aRGC49HhujmhBtTM= X-Google-Smtp-Source: ACHHUZ6RiSG3clKpoykBzCIaBaPmJqmgEpNn5zQySSYwHZCu/B0PnHxGuvwfkQlyybd0Bwzu6RqehfaY+ApIXHc7GDg= X-Received: by 2002:a05:6a20:3cab:b0:103:377e:439e with SMTP id b43-20020a056a203cab00b00103377e439emr701037pzj.60.1685410666879; Mon, 29 May 2023 18:37:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Philippe Cerfon Date: Tue, 30 May 2023 03:37:36 +0200 Message-ID: Subject: Re: set XATTR_SIZE_MAX and XATTR_LIST_MAX in cygwin/limits.h (was: python + XATTRs under cygwin?) To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.3 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: 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 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 Python. Anyway, whom can I ask or (1)? Thanks, Philippe.