From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by sourceware.org (Postfix) with ESMTPS id 770F03858D37 for ; Mon, 17 Aug 2020 10:40:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 770F03858D37 Received: by mail-pl1-x642.google.com with SMTP id g15so3401155plj.6 for ; Mon, 17 Aug 2020 03:40:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=CTj9V7nct/PKkbb9cCUIyBT14REgXYswssd2AC3Kxac=; b=RRcS9EXP9oiyPujzI1ezIDGrQf8ubZuC1p+3hS5K6km+/PTovE2yGJP8GdEa87i1gV d7l2TOpKcmdM9u/7lVZiLeAEJdRbrhESjD3V4XwKxz+2GLFV+i10lVRREcBr+xV9LPvz urAF12SWr1PlUczAJsiYEaKuO+kwR+gdw9hzfUj1Fg7itLAm4BDLtqbk/2c8XcioGDlI UJu295j/tFEVbb/o5GuSq61Xd89vATGdcQ3LgnSZ+gNEPVsWAOHfHj2CAVPkHEE1858m +goz5PkxqK5OL5yLJmc0mYZi/eYI6rp6WiyFDj/xWCyRNHq5cHw6r7FcWPvkJD4nJRgR sU8g== X-Gm-Message-State: AOAM5327T9rYYh1duyhvKKbLPCRE6mb1UzP21eQa/WFIFPCU3gqlPu45 qgWIgAmT9esmr9esjC/PTbRnSvoIF0sENQ== X-Google-Smtp-Source: ABdhPJxA/FOnkBtpvnknodt7OgBij79nW2e6t4Lmm7FWIzE+scAzbGuBnQ303Ny9qxRQIvGiBIsjFg== X-Received: by 2002:a17:90b:1949:: with SMTP id nk9mr11383401pjb.185.1597660829467; Mon, 17 Aug 2020 03:40:29 -0700 (PDT) Received: from [192.168.1.5] ([117.247.218.239]) by smtp.gmail.com with ESMTPSA id 63sm18789543pfu.196.2020.08.17.03.40.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2020 03:40:29 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Eshan Dhawan Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] Added FTW.H Methods Date: Mon, 17 Aug 2020 16:10:25 +0530 Message-Id: References: <20200817094238.GD3272@calimero.vinschen.de> Cc: Joel Sherrill , joel@rtems.com In-Reply-To: <20200817094238.GD3272@calimero.vinschen.de> To: newlib@sourceware.org X-Mailer: iPhone Mail (17G68) X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Aug 2020 10:40:32 -0000 > On 17-Aug-2020, at 3:12 PM, Corinna Vinschen wrote: >=20 > =EF=BB=BFOn Aug 13 08:11, Joel Sherrill wrote: >>> On Thu, Aug 13, 2020 at 3:17 AM Corinna Vinschen via Newlib < >>> newlib@sourceware.org> wrote: >>>=20 >>> On Aug 13 03:08, Eshan dhawan via Newlib wrote: >>>> Signed-off-by: Eshan dhawan >>>> --- >>>> newlib/configure.host | 2 +- >>>> newlib/libc/include/ftw.h | 64 ++++++++++++++ >>>> newlib/libc/posix/Makefile.am | 2 +- >>>> newlib/libc/posix/ftw.c | 36 ++++++++ >>>> newlib/libc/posix/nftw.c | 154 ++++++++++++++++++++++++++++++++++ >>>> 5 files changed, 256 insertions(+), 2 deletions(-) >>>> create mode 100644 newlib/libc/include/ftw.h >>>> create mode 100644 newlib/libc/posix/ftw.c >>>> create mode 100644 newlib/libc/posix/nftw.c >>>=20 >>> Why do we need _FTW_ENABLE_? >>>=20 >>> What do we need the foo64 variants for? WHile newlib defines >>> _LARGEFILE64_SOURCE for __linux__ and __RDOS__, it's not used >>> anywhere else in newlib itself. >>>=20 >>> Also, there's a ftw/nftw implementation in Cygwin already. Did you >>> check it for inclusion into newlib, or to drop the Cygwin version in >>> favor of a new newlib versions? We could at least share a common >>> header, but then we will have to use the flag values already used in >>> the Cygwin implementation for backward compatibility. >>>=20 >>=20 >> We went straight to *BSD for implementations and didn't look at Cygwin. >=20 > Cygwin's ftw is OpenBSD. Which BSD is this ftw taken from? It=E2=80=99s taken from MUSL Libc=20 >=20 >> I've asked Eshan to replace the implementation with the Cygwin one. >> Hopefully that's easy and allows one more piece of shared software. >=20 > It's not *that* easy because OpenBSD's/Cygwin's ftw(3) uses fts(3) under > the hood. That=E2=80=99s the same reason We couldn=E2=80=99t use FTW from BSD=20 >=20 > While sharing code is good, your implementation is more compact, which > speaks for your code. >=20 > However, I'd like to ask for ftw.h compatibility at least, so perhaps > Cygwin can use this other ftw, too at one point. >=20 > But even then, there's still the _FTW_ENABLE_ and _LARGEFILE64_SOURCE > stuff I asked about. _FTW_ENABLE_ was there because the FTW implementation required pthread_setca= ncelstate () >=20 >=20 > Thanks, > Corinna >=20