From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78460 invoked by alias); 2 Sep 2017 10:40:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 78446 invoked by uid 89); 2 Sep 2017 10:40:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-22.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_PASS,UNSUBSCRIBE_BODY autolearn=ham version=3.3.2 spammy= X-HELO: zimbra.cs.ucla.edu Subject: Re: [PATCH 05/18] posix: Rewrite to use struct scratch_buffer instead of extend_alloca To: Adhemerval Zanella , libc-alpha@sourceware.org Cc: Florian Weimer , Gnulib bugs References: <1502463044-4042-1-git-send-email-adhemerval.zanella@linaro.org> <1502463044-4042-6-git-send-email-adhemerval.zanella@linaro.org> From: Paul Eggert Message-ID: Date: Sat, 02 Sep 2017 10:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1502463044-4042-6-git-send-email-adhemerval.zanella@linaro.org> Content-Type: multipart/mixed; boundary="------------C55B257E6C8F30337BF0D52E" X-SW-Source: 2017-09/txt/msg00119.txt.bz2 This is a multi-part message in MIME format. --------------C55B257E6C8F30337BF0D52E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 214 Adhemerval Zanella wrote: > + p = getpwnam (pwtmpbuf.data); That won't work on non-glibc platforms that lack getpwnam_r, as the argument should be 'name'. I installed the attached patch to Gnulib to fix this. --------------C55B257E6C8F30337BF0D52E Content-Type: text/x-patch; name="0001-glob-fix-typo-in-recent-change.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-glob-fix-typo-in-recent-change.patch" Content-length: 1213 >From 88855bf9f1cfc2e5165e4200bf62aa949e76db90 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 2 Sep 2017 03:37:46 -0700 Subject: [PATCH] glob: fix typo in recent change * lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]: Fix recently-introduced typo. --- ChangeLog | 4 ++++ lib/glob.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 867662d..4dd0367 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2017-09-02 Paul Eggert + glob: fix typo in recent change + * lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]: + Fix recently-introduced typo. + glob: don't save and restore errno unnecessarily * lib/glob.c (glob): Don't save and restore errno merely because we have getpwnam_r. diff --git a/lib/glob.c b/lib/glob.c index 8de2d5f..f1b30ee 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -658,7 +658,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), } } # else - p = getpwnam (pwtmpbuf.data); + p = getpwnam (name); # endif if (p != NULL) { -- 2.7.4 --------------C55B257E6C8F30337BF0D52E--