From patchwork Tue Aug 22 18:21:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 110693 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp3055790qge; Tue, 22 Aug 2017 11:21:26 -0700 (PDT) X-Received: by 10.84.131.130 with SMTP id d2mr91899pld.16.1503426086655; Tue, 22 Aug 2017 11:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503426086; cv=none; d=google.com; s=arc-20160816; b=dNSI67lfJ407HxVQ7F5xgmT4IEptUNL7Bkgln9jgLRib23rkZjK3XR84OmInpmooSC 3XbXsn1rQF0Fwxda9Z+sGWfewckNad55meyh4wuJxEdenJDcDQtP1HSR7OwFB49aIaVr 0BJb0MGpZfDHW3QQS5C0X214393t/i7i5jVMx8wYIOiEp8gl6NMIxLtIHx0/jhfkOpQI eBqAvd0VF3OvUvsrETym5nkrZs+g4YhIlcQydIBnlTWdTchgWrY6aeZ/qwYZVhSx05he /+ymLUtsp+N+xju90cXoQ0at0CJzoUag9SCEPDDLaYj2jnXGxy6uanZ5+e5LqFS7OC6i Q7/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=7w+aOgODD3PtKd+TSf4nKb0xfCQmsoY3vaee9UN4YIc=; b=vMjdRwYm0VavQLkev2rK+9m9QqkJVkB+7GOZn9AQWayha9dIxKpfmSsUI8ELR/xz+L T3TamrRayKvgPMJSukb8CtydDxXwNDTRwYK3wsqvfFJ8bQfAasSQa0JrEPzZ8iCyT+tm bp7+e4uKjeAeoUElemjjSHsNRsK3DlMWLR3Ns02riSCw/tjVczr5awuXulRJpCzh7A97 UGymmDWrIkWZxZaI+q7VgmUg6c/D/UGKuIMwnoZm53w15VQFrecx1DoSTqnaHNr7i3Ei ECwkY1dL5b5Lkbc1Aq1A6vmdBj8FkUWuCFw+qd/tNK/xbOfzl3/clD5I4peEBTbzv7KU rlwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=tLP2PbEd; spf=pass (google.com: domain of libc-alpha-return-83663-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-83663-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id i9si6576676pfd.230.2017.08.22.11.21.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Aug 2017 11:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-83663-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=tLP2PbEd; spf=pass (google.com: domain of libc-alpha-return-83663-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-83663-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=EIH9Qwe1pn64YNvVup34hb/4BRccMcTKBW/T4UMrEGFADTPg52VZF FOsepdKTifG63bNVIMHZlmrPnEhA19mMfLWv/XFDao9KmrGUSt9JHWaV+JBUguk7 MDVzU2/4bmHUHB2BDN+O5N4tfdYORTM6XPgYYW5vSXWUldxdplnjmY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=SFQ8SumqtsWwfWe3xdhqf3j0UVo=; b=tLP2PbEdbVwGRibdPpTd7tcAXjRT +jl/H170r/Yu2EHDJ16P7jIS0b+fXpKGPqpRMWApDPE0yFLDEeyClsnDkH3WY51C 2NTA6qTwcXuzoOdPgSKvKdiFv2mvFdJLMqrzglGcv7Ld2wvZN4tmkFZcPNf9ATgB 7U9wePbUORloQnw= Received: (qmail 69393 invoked by alias); 22 Aug 2017 18:21:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 69372 invoked by uid 89); 22 Aug 2017 18:21:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=BAYES_00, GIT_PATCH_2, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qk0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7w+aOgODD3PtKd+TSf4nKb0xfCQmsoY3vaee9UN4YIc=; b=psjblg7ZZGkZyF6nTXZ+DiwuDngTnX4YvUVeLPKDQ1BTqEGR8nsupJDeE2o1AYz4Fj zUeA4czJqYRl/6jeFqYxTF9KafT4gYiTOyle8abyNgMIWTYcoXFwqQrtDIMnn+eXTkIP rWjEliM22pxfG/+fLYvN5L3fjf55beNqhU5b5+yYNu8fT0QtQqoxESQmvfsvkat+WlSt HjgLcpYt/qXP4U0AlO1gaGb31Fk7oZV5sttNXYsITDhX80Q45PdOHZSJGBHfgT/2LaFJ 1LRA9KrpRNj6CMgFypmwfQQZ+RPpTS2PVWl5hPS/FSwqe/aLEIGDGf+Qb/mxgWch6ZVa 7KlQ== X-Gm-Message-State: AHYfb5jVKO+YBFDJfOBonHh97Y8xw7uOWJ12X4cLCelNhlBIlLaxqGYE 88i1T9BH/9G0QNfaX3UgRw== X-Received: by 10.55.36.212 with SMTP id k81mr113406qkk.80.1503426069579; Tue, 22 Aug 2017 11:21:09 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Paul Eggert Subject: [PATCH 0/3] posix: glob fixes and refactor (1st part) Date: Tue, 22 Aug 2017 15:21:01 -0300 Message-Id: <1503426064-2827-1-git-send-email-adhemerval.zanella@linaro.org> This is a subset from my previous patch for glob refactor [1] with the fixes that do not intend to change glob internal semantics or fix any issue. They are focus instead on sync with gnulib (with some code exceptions) and consolidate the implementation to simplify it. >From previous comments I also added a de-couple one for remove non unix code from glob.c implementation (since the idea is to gnulib to add simpler wrappers if required). [1] https://sourceware.org/ml/libc-alpha/2017-08/msg00440.html Adhemerval Zanella (3): posix: Sync glob with gnulib [BZ #1062] posix: De-couple code from gnulib posix: Consolidate glob implementation posix/Makefile | 2 +- posix/glob.c | 659 +++++++++------------ posix/glob_internal.h | 57 ++ posix/glob_pattern_p.c | 29 + posix/globfree.c | 37 ++ posix/globfree64.c | 27 + posix/globtest.c | 3 + sysdeps/gnu/glob64.c | 25 - sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/alpha/Makefile | 4 - sysdeps/unix/sysv/linux/alpha/{glob.c => glob64.c} | 11 - sysdeps/unix/sysv/linux/alpha/globfree.c | 36 ++ sysdeps/unix/sysv/linux/arm/glob64.c | 1 - sysdeps/unix/sysv/linux/glob.c | 23 + sysdeps/unix/sysv/linux/glob64.c | 55 ++ sysdeps/unix/sysv/linux/globfree.c | 23 + sysdeps/unix/sysv/linux/globfree64.c | 0 sysdeps/unix/sysv/linux/i386/alphasort64.c | 2 +- sysdeps/unix/sysv/linux/i386/getdents64.c | 2 +- sysdeps/unix/sysv/linux/i386/readdir64.c | 2 +- sysdeps/unix/sysv/linux/i386/readdir64_r.c | 2 +- sysdeps/unix/sysv/linux/i386/versionsort64.c | 2 +- sysdeps/unix/sysv/linux/m68k/glob64.c | 1 - sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c | 1 - sysdeps/unix/sysv/linux/{i386 => }/olddirent.h | 0 .../unix/sysv/linux/{i386/glob64.c => oldglob.c} | 51 +- sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/glob64.c | 20 + sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c | 2 + sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c | 1 - sysdeps/unix/sysv/linux/wordsize-64/glob64.c | 2 - sysdeps/unix/sysv/linux/x86_64/x32/glob.c | 1 - sysdeps/wordsize-64/glob.c | 8 - sysdeps/wordsize-64/glob64.c | 1 - 34 files changed, 607 insertions(+), 486 deletions(-) create mode 100644 posix/glob_internal.h create mode 100644 posix/glob_pattern_p.c create mode 100644 posix/globfree.c create mode 100644 posix/globfree64.c delete mode 100644 sysdeps/gnu/glob64.c rename sysdeps/unix/sysv/linux/alpha/{glob.c => glob64.c} (78%) create mode 100644 sysdeps/unix/sysv/linux/alpha/globfree.c delete mode 100644 sysdeps/unix/sysv/linux/arm/glob64.c create mode 100644 sysdeps/unix/sysv/linux/glob.c create mode 100644 sysdeps/unix/sysv/linux/glob64.c create mode 100644 sysdeps/unix/sysv/linux/globfree.c create mode 100644 sysdeps/unix/sysv/linux/globfree64.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/glob64.c delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c rename sysdeps/unix/sysv/linux/{i386 => }/olddirent.h (100%) rename sysdeps/unix/sysv/linux/{i386/glob64.c => oldglob.c} (63%) delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c create mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/glob64.c create mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c delete mode 100644 sysdeps/unix/sysv/linux/wordsize-64/glob64.c delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/glob.c delete mode 100644 sysdeps/wordsize-64/glob.c delete mode 100644 sysdeps/wordsize-64/glob64.c -- 2.7.4