From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26330 invoked from network); 9 Feb 2023 21:26:53 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 9 Feb 2023 21:26:53 -0000 Received: (qmail 15938 invoked by uid 550); 9 Feb 2023 21:26:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 15901 invoked from network); 9 Feb 2023 21:26:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1675977997; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=h+wt3ZRJqYm+05zjBx55YSXmt/AxizbtqpfTcSj3/ZU=; b=ttKTXCPYfzcPu/F7eP8oI4HBXkv+eeldqoJikhANe8V4pLRS0vI/dYdp1xnlnPuZmk m+XAUvvcMYnW7PhmEtFp7CxmpxEv80hC0y78AMPnR+MO4k9wWkbQxOVacy7uZFBVmvR5 kUETo/6fTxqRKJyXmnqLzgvHdxGKg2q2yeN+L9x9dhW5T9tulPyPoz7NeFQvPJcovNBF ZJywn3+6Elx1/Oh/tyQKyZcGi5v15EsKqBHqyodQKRZl4XIcFxXBflDNqoYbGJ5H34V5 BaHqyxs2YCfd3vkyI5ihaIj86zX1l7SmfTC9QcNK+7JMLV96p1Oo0Pt4aCTgzVUeKu4F md5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1675977997; h=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=h+wt3ZRJqYm+05zjBx55YSXmt/AxizbtqpfTcSj3/ZU=; b=zspOw8hX6MmTDd/QyUgI2ssddeWtsU2Pxy63D3Ps9ct9aVbauM8pRh66o537qmrB5l lA9uiRLAX4ALaqpjcrD/R+vusIVpWmFV1in6rDP8BIju/kpFibVqqgk2G9aOlomcEO/Y ix+XeqQcqc1FwU2xcElkEcmu3AYqI7zW6L2IXIVQNaj4JNgjquZlXUgrflgKqKqPHIz9 iWkr5wIw+tcs0wv4n/aqYu4k8Lej949ihMl47JmYJQJHcNhsYRSmRj3G1dY/wCEPtAnE 4habXwlr8K788DRbgST7iaWnbMMzlpNiS4/cKj7Ir7FtCJFamWHXNcK4TJVYCVOIMLds LkWw== X-Gm-Message-State: AO0yUKV6godYUA2xUE1ixyGZlT4OadJ0QXADWlFVhBPANX2sA+DpY2Kl qC25FhPkn7afgFghvCpy/HAEHvAr9gcqJwzQl2nv+Q== X-Google-Smtp-Source: AK7set/1N2/iuGgTofs8XFqs04qjonhntMrX4w6zHoQvN9VvuT63NUkkPciY2njtn3NFzLJBjt2lSpETA5dD3hoabxQ= X-Received: by 2002:a05:6122:61a:b0:401:c5:ad68 with SMTP id u26-20020a056122061a00b0040100c5ad68mr1389316vkp.25.1675977997567; Thu, 09 Feb 2023 13:26:37 -0800 (PST) MIME-Version: 1.0 References: <20230209204342.643785-1-brgl@bgdev.pl> <20230209211649.GX4163@brightrain.aerifal.cx> In-Reply-To: <20230209211649.GX4163@brightrain.aerifal.cx> From: Bartosz Golaszewski Date: Thu, 9 Feb 2023 22:26:26 +0100 Message-ID: To: Rich Felker Cc: musl@lists.openwall.com, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] [PATCH] search: provide twalk_r() On Thu, Feb 9, 2023 at 10:16 PM Rich Felker wrote: > > On Thu, Feb 09, 2023 at 09:43:42PM +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Provide a variant of twalk() that allows callers to pass custom user > > data to it without resorting to global variables. > > > > Signed-off-by: Bartosz Golaszewski > > Is there any precedent for this other than glibc, with matching > signature and behavior? Without that, it looks like it's subject to > the potential for conflicting definitions. > Not sure what you mean. GLibc IS the precedent. This function has only been around since glibc 2.30 (well, it's been 3 years) and requires _GNU_SOURCE. It's a relatively new function but without it, twalk() is quite useless. The background for this patch is: I have a low-level C library that I maintain for which I try to limit external dependencies and I used twalk_r() in the new version only to find out it doesn't build with musl. Bart