From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by sourceware.org (Postfix) with ESMTPS id 168D8384607A for ; Thu, 27 Aug 2020 11:07:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 168D8384607A Received: by mail-ot1-x342.google.com with SMTP id n23so4021911otq.11 for ; Thu, 27 Aug 2020 04:07:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lKVUv5OebXlmdtMgDsMw360TSfUwKbgS1dumm0svhSE=; b=rPN2rLYl+kXORZxuIlSODk9U6Y8cpPBYhaqWa4XO9ctjNXgNmqCWhZ6NX0P2LXd5g5 3N6STUOCIRLX/QsVF8sTegsy8qpyC2WKfpkWJ6SfCf/478ROyIPTXlpIrocCyG+DouHQ JDhPfiPCDR/rSvlJGWX9+YUtAdLq0dZHnQ6Uaj+NfRHLlIwqF8jTDM7WHqyPRg9uWscJ 7oxCpC66NIaYetr6Y59O8BzIbJ+V0+3nOOUYG93ih4Q5u2BuZG4x+2SgF0oHXliH0v6+ MNx+wKi7FPDHpUTvv5UFsqkR93aYg9QnNKm4Qdkenb+E5/LJYV0LYX5fH7RI0NoJf6xd UCtA== X-Gm-Message-State: AOAM533r1ptW8kZrbJbuEECxXo0sT8Hxc+itE/RLqfbQNDG3rhUJxMso XZdYBfEegD1U1PaBo+rEgvvTlFlBiSnEdDrRed3JxSZR5ZZ5Rg== X-Google-Smtp-Source: ABdhPJwBwElqBr4qkQRA8tfsHColgAE7EH86+KJVlI5hCJPCmbBSuE1DSNLY5nz4IS3LTVHGZA86QZdGdO9gxI+3aCk= X-Received: by 2002:a05:6830:1644:: with SMTP id h4mr12282885otr.62.1598526464504; Thu, 27 Aug 2020 04:07:44 -0700 (PDT) MIME-Version: 1.0 References: <20200826210246.2830973-1-adhemerval.zanella@linaro.org> <61651bc1-1228-3dd8-be82-83d0407984e8@cs.ucla.edu> In-Reply-To: <61651bc1-1228-3dd8-be82-83d0407984e8@cs.ucla.edu> From: Adhemerval Zanella Date: Thu, 27 Aug 2020 08:07:33 -0300 Message-ID: Subject: Re: [PATCH 1/4] Sync getcwd with gnulib To: Paul Eggert Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 11:07:46 -0000 On Wed, Aug 26, 2020 at 7:39 PM Paul Eggert wrote: > > Thanks for looking into this. To help move this along from the Gnulib point of > view, I merged the Gnulib-relevant parts of those proposed glibc patches into > Gnulib, here: > > https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=615b43e1f914687b6ccd40c79a05626098a361d7 > > but this Gnulib patch has the following further changes to get this to work, and > these further changes should be in the glibc version too: > > > - It does not include pathmax.h header (glibc does not provide it). > > That #include can be moved into a previous "#if !_LIBC" section. > > > +# define __getcwd rpl_getcwd > > This should define __getcwd_generic, not __getcwd, since the function name changed. > > > > Also, here are some minor refactorings to the resulting getcwd-generic.c that > would improve readability. If you add these I plan to merge them into Gnulib too. > > * Prefer "#if _LIBC" to "#if !_LIBC", interchanging 'then' and 'else' parts. > > * Put those !_LIBC #defines in alphabetic order. Thanks, I will check the modifications you did on gnulib and add back on my patch.