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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29328 invoked from network); 10 Feb 2023 02:18:53 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2023 02:18:53 -0000 Received: (qmail 20013 invoked by uid 550); 10 Feb 2023 02:18:46 -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 19979 invoked from network); 10 Feb 2023 02:18:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=scZgxrsCpz85atvipwL4Zhf+0bOrJsF5bmhXYmGlLd8=; b=O39wihsIr8/HbCjYzYeJFZmeifkX+Y3IDkMoot0/39naQoLkfES7g9+HSrMbMRkmL/ klnxvdGYip2zx8HFI6VrEFdeA1peAVg3BNULe61svRhxkZJ5FGrOYtGefQN4gsPA8B3C 7spZfqyngIdF0T2jeQW7ZTliSt7cXN0O3rGbvBJ1zAhVHPDfzDEJSMVIxrOuECzRxWI4 8LrZ+zWM1HHlP3TfF8U7dCrIiJPStyQBgsUFuNWLifLImdZcU1P2ABV63tCrgiBn4SJ5 jCfy2svXWG2CsdujlxspHnqVVwQ78AUH1E5bBRyOeDe037gss/cyE59XkyqX5a4Ig03V CglA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=scZgxrsCpz85atvipwL4Zhf+0bOrJsF5bmhXYmGlLd8=; b=8C7sgh8avSmbvngEamXqrK98f4uqIVtFsVZBR3jsZpLuTLsYKtb7A7qd9XDh2eWzIi Am3ctE368qPagGIck+ojj6UOM+A+AHGa2idU0Sr1mEsVDEsB3Dl9xe0p/w3ScTmk+14b 5rTM2XrXwJ9jY9fdKKDXk+mzt7gXIgRdb52CqKz25v1ERx8mPhPyZIpK+UsHCDjdlZbn bPhZ4hTtew9lgfAijW9nkUnTW4D/eSbntSvXnfp3QuSQTCsJnWc2KAkblEqnQeLtl0oU jbHn5i9YoS1LtF/GaB1ZKDwTEoqDkL/kpv1mm9wRorVlbNWcoMR3WcQCTrN7wJun4tdA HIpw== X-Gm-Message-State: AO0yUKVqdIGpFDVOGNRAw0+CUjV+RwangAzBsz0/TN7ZBVEGMP9lTR3l frlxQnr6f+RU3vvuq3036c8u691Dr4kaCzqZVL8y7d2d X-Google-Smtp-Source: AK7set9hphXCh+zwN8NHAFMe6s18r8YhnUxG3fx+N63tkmyhDb4O1uk6XSKYQUAhaWdKhhwy7UZ1KNeJ/ev6TlyniHM= X-Received: by 2002:a05:6870:430a:b0:163:b85e:f1ca with SMTP id w10-20020a056870430a00b00163b85ef1camr1464749oah.262.1675995513031; Thu, 09 Feb 2023 18:18:33 -0800 (PST) MIME-Version: 1.0 References: <20230209204342.643785-1-brgl@bgdev.pl> <20230209211649.GX4163@brightrain.aerifal.cx> In-Reply-To: From: Khem Raj Date: Thu, 9 Feb 2023 18:18:07 -0800 Message-ID: To: musl@lists.openwall.com Cc: Rich Felker , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] [PATCH] search: provide twalk_r() On Thu, Feb 9, 2023 at 1:26 PM Bartosz Golaszewski wrote: > > 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. musl uses posix as its guiding light and sparingly implement other functions > > 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. maybe you should carry it as a fallback in your library and use it when building on libraries which do not provide it as a fall back. > > Bart