From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47149 invoked by alias); 17 Aug 2017 20:05:23 -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 43831 invoked by uid 89); 17 Aug 2017 20:05:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-qt0-f177.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TtX6SAa+22/L0/5fV9e0wEmB5XSCWVRsWePRZ96Tul8=; b=TTKy+ZCUmi0kDSlVBjnJ/dL2AAmaszWireEhPlCxunzJWAGyn0QaCVKW8URB6aHh3y 4j/HluPI6aSWCXta9yMYjPWM1r+qrJCjzk9Rb4UrErlXCdWBNLipSivjrH5ibH7rWb+n zMvNDMGKYnakOdDGXaahsd6i4WS7RektNX718QX3Y/GIh+Ez8oiNs1IHxtBzWCICMsOH vw91CpToKsyjgu/p7jS6eT4W4PMIiaPKPoaFX4idNCENgKhhwbtfKAK+Qkvwgb0ROIwM SL4hCpBlk7fM0wYsobSwjPLR0l3NCg60YHt5iUFXzAnHmoVVykWFloT814TPkohhhgmt DVXQ== X-Gm-Message-State: AHYfb5jZwO4hseOtteELEyMpVXWFzzv4VxC3cyG3UXYeia5qPtBbqo0h ZnaFwRBE4kxcKpbv7CIZaw== X-Received: by 10.200.43.21 with SMTP id 21mr9660803qtu.178.1503000317329; Thu, 17 Aug 2017 13:05:17 -0700 (PDT) Subject: Re: [PATCH v2 00/18] posix: glob fixes and refactor To: Paul Eggert , Florian Weimer , libc-alpha@sourceware.org References: <1502463044-4042-1-git-send-email-adhemerval.zanella@linaro.org> <6e20ab52-4450-2488-3bb9-0c59144b0b17@cs.ucla.edu> From: Adhemerval Zanella Message-ID: <569c2432-9009-12f9-ed29-74160a58c0a7@linaro.org> Date: Thu, 17 Aug 2017 20:05: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: <6e20ab52-4450-2488-3bb9-0c59144b0b17@cs.ucla.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-08/txt/msg00817.txt.bz2 On 17/08/2017 16:51, Paul Eggert wrote: > On 08/17/2017 10:32 AM, Adhemerval Zanella wrote: >> My understanding from Florian comment is the 'decoupled' version would be the >> code with both win32/amiga/etc code striped and LIBC defines set to only glibc. >> Would it be acceptable for gnulib? > > We don't need Amiga code any more. MS-Windows support is still used, though. However, the current style in glob.c with the forest of ifdefs is pretty bad, and it'd be good to see it go. Instead, I'd rather have the Gnulib-specific stuff put into a section that is relatively independent of the rest of the code. To do that, I suggest that you just rip out all the MS-Windows code, and I'll do my best to reintroduce it in a cleaner way. Right, I will remove both amiga and win32 code in a subsequent patch to gnulib sync. > >> This would also remove the d_ino/d_type abstraction macros. > We'll still need some form of abstraction. For fts.c Gnulib is using something like the following, and we could do this sort of thing in glob.c too. It's not much of a burden to write 'D_INO (dp)' instead of 'dp->d_ino' in the mainline code. > > > #if defined _LIBC || defined D_INO_IN_DIRENT > # define D_INO(dp) (dp)->d_ino > #else > # define D_INO(dp) 0 > #endif I think it is feasible, I will check this out. > > By the way, I've lost track: have you looked at the Gnulib fixes for glob.c, and merged them into your glibc patch? > By [01/18] patch [1], I synced with 1dc82a77fa606e18edf (which is still latest gnulib glob version), with some exceptions: 1. Commit 44c637c (Properly initialize glob structure with GLOB_BRACE|GLOB_DOOFFS) which fixes BZ# 20707. 2. No inclusion of flexmember.h header and its usage on glob. The code is meant to be rewritten and header is not required in following patches in this set. 3. An additional define (GLOB_COMPAT_BUILD) to avoid building size_and_wrapv and gblo_use_alloca twice on some configurations (i368 compat code) due multiple inclusion. [1] https://sourceware.org/ml/libc-alpha/2017-08/msg00441.html