From patchwork Tue Aug 22 18:21:04 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: 110696 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp3056487qge; Tue, 22 Aug 2017 11:22:06 -0700 (PDT) X-Received: by 10.84.140.235 with SMTP id 98mr94523plt.30.1503426126716; Tue, 22 Aug 2017 11:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503426126; cv=none; d=google.com; s=arc-20160816; b=E08eg+5D4nKArzIvQjSwEq6++xdAm7mKgqAe9Jyvj6WdwkGk0MN9aJoLsIECNleykC iXtcrr16FwiL9QrZ/gDSuqaD45w0a+TBGs8oshesyuZkcePpLCdYDG0Rh3m9VvObIfv9 +jrL/0wh2imbN3ME/s1K3ozvB+FTd1eXkxqh9X6sD21QyxRKNM2BGWtkKfWQyfaZX1eI Gj/W1EZK106trkiA9s3qSv8DSCRvT1FMuHn54gny2RfqQG7j7g2q/mZcJz07eaioHJLR CEI14VgOSy1/lTG61AsSaC8dTL5iewkTqdyZu6A50jSof9dezregEeeOmjTNLU1y+EoL Ap0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=qM3EFX0AXyMeuU1j2JXP9I0Qirfga7a6p6xsSAp8m6U=; b=0SDvYGN0KPG0HSi2DkTj+3dBp7R4Xt+7Ba0B3aB4+TlUeCxest7LoTZ/3y2yLFG9oD oxnLj5V7TkAuSfaDlIcEpq3MIEwfgk00dZToYHJLxaoGWfuUlJgOGAYqLZH2ren2kVjd Dik5G43xRpZnUtJvN6G/Up3yEfD8zjee7m0o3zvJ8yaofv3hljYeepuefODkot6QB09O Xi/4ulE2Jm2wWzMZR6pN8aP++eIzMFj4fVTRxAMqqgIERQh4dkYpruDQMG8vqnl1PBgV 3SHqo8GQg9gGVAQRE9bCROZG0tSzJ72Xpd7jbRtcyp5BFTl+9cnK3TeF3kbVLfWqqiP/ Oi2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Bcwui+lt; spf=pass (google.com: domain of libc-alpha-return-83666-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-83666-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 s10si10061160plj.120.2017.08.22.11.22.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Aug 2017 11:22:06 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-83666-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=Bcwui+lt; spf=pass (google.com: domain of libc-alpha-return-83666-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-83666-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:in-reply-to :references; q=dns; s=default; b=dVaJaijtPSA8nu7NAxQK6y2IvgAf55M I3xWwKyZOZBMxvybAwwyq+or0yYCS2wkOfMaiQVhhVgsOb7eO5PYZFKqEACjalTh S1Z8ktFakpBBxALgsQIJxhKeeVbeQgG35dp4jAHe4vzqNgJx9ECMyHE+Rp+TO3/C Ua2XfCMBc3dw= 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:in-reply-to :references; s=default; bh=mNusTqq7yQPVaFT8kgwXFEtiq8k=; b=Bcwui +lt813p0eFwhyAzgWOXwWvMcyZNPEG3qlVzIBuPZ/fE2RTlQtQ91ErrZQwQWjNey C5ggvxjARrIryTGHjc/7hu/PzkPsrnvKsRRdB/8vIQ0TJE7Z3XSwB4fxnyUDx7+t 3SN9bmnknLuLlemUMsL+9sBT+hHPXp86JRnxMU= Received: (qmail 71191 invoked by alias); 22 Aug 2017 18:21:30 -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 70652 invoked by uid 89); 22 Aug 2017 18:21:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=ham version=3.3.2 spammy= X-HELO: mail-qk0-f175.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:in-reply-to :references; bh=qM3EFX0AXyMeuU1j2JXP9I0Qirfga7a6p6xsSAp8m6U=; b=hFIWzcULGwZxcUTIURjO+OY7xmlNoTrUGcoKE+dwXyMoZS0ICwj6zuv92h6T3Khe+7 zI0AwWROw+6oT9B1AaKoYK3f4ZuF55xkrtCOujGM3Rf/36WvEm6AJRHl2f+x0NvNzOk8 kvr8khbVa+OrwQEke8+moyKA/JghtorRWiLtTO61VYdaMMopQdT+sV7FRzmi6EobNgQf 7s92ayoikJvWvabo0juWWvRGa0OGEg75vwMWJc8pB6asUGcQyhH+CkSgK+rdwv168JUa cCLYUXet+X9dVFnU5opcJ6UzBZv38WgpXut9jDkEQ6wd2bzpwh7qClYAL65uC6IyKruW 0wFQ== X-Gm-Message-State: AHYfb5hYCpusdsApsauIag3wtg0iU+6Hn8xckchtdLCYymZtnO945LT+ if67bQWF0UBMEYdwSeS51g== X-Received: by 10.55.186.193 with SMTP id k184mr112187qkf.48.1503426075275; Tue, 22 Aug 2017 11:21:15 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Paul Eggert Subject: [PATCH 3/3] posix: Consolidate glob implementation Date: Tue, 22 Aug 2017 15:21:04 -0300 Message-Id: <1503426064-2827-4-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1503426064-2827-1-git-send-email-adhemerval.zanella@linaro.org> References: <1503426064-2827-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the glob implementation. The main changes are: * Remove specific defines required for multiple compilation in same unit (GLOB_ONLY_P, NO_GLOB_PATTERN_P and GLOB_COMPAT_BUILD). To allow using the same code to build compat version on Linux, extra units are used instead (oldglob.c). * Both globfree and GNU extension glob_pattern_p are now on their own files. This simplifies the creation of compat symbol when required. * Also similar to glob/glob64, a new globfree64 is file is added with an empty implementation as default. * On Linux all implementation now uses a default one with the exception of alpha (which requires specific versioning) and s390-32 (which different than other 32 bits with support for v2.1 symbol does not add a compat one). * Move i386 olddirent.h header to Linux default directory, since it is the only header with this name and it is shared among different architectures (and used on compat glob symbol as well). Checked on x86_64-linux-gnu and i686-linux-gnu. * posix/Makefile (routines): Add globfree, globfree64, and glob_pattern_p. * posix/glob.c: Remove GLOB_ONLY_P, GLOB_COMPAT_BUILD, and NO_GLOB_PATTERN_P define usage. (globfree): Move to its own file. (__glob_pattern_type): Likewise. (__glob_pattern_p): Likewise. * posix/glob_internal.h: New file. * posix/glob_pattern_p.c: Likewise. * posix/globfree.c: Likewise. * posix/globfree64.c: Likewise. * sysdeps/gnu/glob64.c: Remove file. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add oldglob. * sysdeps/unix/sysv/linux/alpha/Makefile [$(subdir) = posix] (sysdep_routines): Remove rule. * sysdeps/unix/sysv/linux/alpha/glob.c: Remove file. * sysdeps/unix/sysv/linux/arm/glob64.c: Likewise. * sysdeps/wordsize-64/glob.c: Likewise. * sysdeps/unix/sysv/linux/m68k/glob64.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/glob64.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/glob.c: Likewise. * sysdeps/wordsize-64/glob64.c: Likewise. * sysdeps/unix/sysv/linux/alpha/glob64.c: New file. * sysdeps/unix/sysv/linux/alpha/globfree.c: Likewise. * sysdeps/unix/sysv/linux/glob.c: Likewise. * sysdeps/unix/sysv/linux/glob64.c: Likewise. * sysdeps/unix/sysv/linux/globfree.c: Likewise. * sysdeps/unix/sysv/linux/globfree64.c: Likewise. * sysdeps/unix/sysv/linux/i386/alphasort64.c: include olddirent.h using relative path instead of absolute one. * sysdeps/unix/sysv/linux/i386/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/i386/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/i386/versionsort64.c: Likewise. * sysdeps/unix/sysv/linux/i386/olddirent.h: Move to ... * sysdeps/unix/sysv/linux/olddirent.h: ... here. * sysdeps/unix/sysv/linux/i386/glob64.c: Move to ... * sysdeps/unix/sysv/linux/oldglob.c: ... here. * sysdeps/unix/sysv/linux/i386/glob64.c: Remove file. * sysdeps/unix/sysv/linux/oldglob.c: New file. * sysdeps/unix/sysv/linux/s390/s390-32/glob64.c: New file. * sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c: Likewise. --- posix/Makefile | 2 +- posix/glob.c | 187 ++++++--------------- posix/glob_internal.h | 57 +++++++ posix/glob_pattern_p.c | 29 ++++ posix/globfree.c | 37 ++++ posix/globfree64.c | 27 +++ 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} | 53 ++---- 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 - 33 files changed, 384 insertions(+), 236 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} (62%) 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 diff --git a/posix/Makefile b/posix/Makefile index 9b534f0..0ff8f5c 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -45,7 +45,7 @@ routines := \ getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \ getresuid getresgid setresuid setresgid \ pathconf sysconf fpathconf \ - glob glob64 fnmatch regex \ + glob glob64 globfree globfree64 glob_pattern_p fnmatch regex \ confstr \ getopt getopt1 \ sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \ diff --git a/posix/glob.c b/posix/glob.c index d33f9ab..6abfb69 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -24,62 +24,63 @@ #include #include -#ifndef GLOB_ONLY_P -# include -# if !defined POSIX && defined _POSIX_VERSION -# define POSIX -# endif +#include +#if !defined POSIX && defined _POSIX_VERSION +# define POSIX +#endif -# include +#include -# include -# ifndef __set_errno -# define __set_errno(val) errno = (val) -# endif +#include +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif -# include -# include -# include -# include - -# ifdef _LIBC -# undef strdup -# define strdup(str) __strdup (str) -# define sysconf(id) __sysconf (id) -# define closedir(dir) __closedir (dir) -# define opendir(name) __opendir (name) -# define readdir(str) __readdir64 (str) -# define getpwnam_r(name, bufp, buf, len, res) \ +#include +#include +#include +#include + +#ifdef _LIBC +# undef strdup +# define strdup(str) __strdup (str) +# define sysconf(id) __sysconf (id) +# define closedir(dir) __closedir (dir) +# define opendir(name) __opendir (name) +# define readdir(str) __readdir64 (str) +# define getpwnam_r(name, bufp, buf, len, res) \ __getpwnam_r (name, bufp, buf, len, res) -# ifndef __stat64 -# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf) -# endif -# define struct_stat64 struct stat64 -# else /* !_LIBC */ -# define __getlogin_r(buf, len) getlogin_r (buf, len) -# define __stat64(fname, buf) stat (fname, buf) -# define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag) -# define struct_stat64 struct stat -# ifndef __MVS__ -# define __alloca alloca -# endif -# define __readdir readdir -# define __glob_pattern_p glob_pattern_p -# define COMPILE_GLOB64 -# endif /* _LIBC */ - -# include - -# ifdef _SC_GETPW_R_SIZE_MAX -# define GETPW_R_SIZE_MAX() sysconf (_SC_GETPW_R_SIZE_MAX) -# else -# define GETPW_R_SIZE_MAX() (-1) +# ifndef __stat64 +# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf) # endif -# ifdef _SC_LOGIN_NAME_MAX -# define GET_LOGIN_NAME_MAX() sysconf (_SC_LOGIN_NAME_MAX) -# else -# define GET_LOGIN_NAME_MAX() (-1) +# define struct_stat64 struct stat64 +#else /* !_LIBC */ +# define __getlogin_r(buf, len) getlogin_r (buf, len) +# define __stat64(fname, buf) stat (fname, buf) +# define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag) +# define struct_stat64 struct stat +# ifndef __MVS__ +# define __alloca alloca # endif +# define __readdir readdir +# define __glob_pattern_p glob_pattern_p +# define COMPILE_GLOB64 +#endif /* _LIBC */ + +#include + +#include + +#ifdef _SC_GETPW_R_SIZE_MAX +# define GETPW_R_SIZE_MAX() sysconf (_SC_GETPW_R_SIZE_MAX) +#else +# define GETPW_R_SIZE_MAX() (-1) +#endif +#ifdef _SC_LOGIN_NAME_MAX +# define GET_LOGIN_NAME_MAX() sysconf (_SC_LOGIN_NAME_MAX) +#else +# define GET_LOGIN_NAME_MAX() (-1) +#endif static const char *next_brace_sub (const char *begin, int flags) __THROWNL; @@ -148,8 +149,6 @@ readdir_result_might_be_dir (struct readdir_result d) D_INO_TO_RESULT (source) \ } -# endif /* !defined GLOB_ONLY_P */ - /* Call gl_readdir on STREAM. This macro can be overridden to reduce type safety if an old interface version needs to be supported. */ # ifndef GL_READDIR @@ -215,7 +214,6 @@ static bool size_add_wrapv (size_t a, size_t b, size_t *r); static bool glob_use_alloca (size_t alloca_used, size_t len); /* We must not compile this function twice. */ -# ifndef GLOB_COMPAT_BUILD static bool size_add_wrapv (size_t a, size_t b, size_t *r) { @@ -234,7 +232,6 @@ glob_use_alloca (size_t alloca_used, size_t len) return (!size_add_wrapv (alloca_used, len, &size) && __libc_use_alloca (size)); } -#endif /* GLOB_ONLY_P */ static int glob_in_dir (const char *pattern, const char *directory, int flags, int (*errfunc) (const char *, int), @@ -242,7 +239,6 @@ static int glob_in_dir (const char *pattern, const char *directory, extern int __glob_pattern_type (const char *pattern, int quote) attribute_hidden; -#ifndef GLOB_ONLY_P static int prefix_array (const char *prefix, char **array, size_t n) __THROWNL; static int collated_compare (const void *, const void *) __THROWNL; @@ -271,7 +267,6 @@ next_brace_sub (const char *cp, int flags) return *cp != '\0' ? cp : NULL; } -#endif /* !defined GLOB_ONLY_P */ /* Do glob searching for PATTERN, placing results in PGLOB. The bits defined above may be set in FLAGS. @@ -1255,26 +1250,6 @@ libc_hidden_def (glob) #endif -#ifndef GLOB_ONLY_P - -/* Free storage allocated in PGLOB by a previous `glob' call. */ -void -globfree (glob_t *pglob) -{ - if (pglob->gl_pathv != NULL) - { - size_t i; - for (i = 0; i < pglob->gl_pathc; ++i) - free (pglob->gl_pathv[pglob->gl_offs + i]); - free (pglob->gl_pathv); - pglob->gl_pathv = NULL; - } -} -# if defined _LIBC && !defined globfree -libc_hidden_def (globfree) -# endif - - /* Do a collated comparison of A and B. */ static int collated_compare (const void *a, const void *b) @@ -1331,71 +1306,23 @@ prefix_array (const char *dirname, char **array, size_t n) return 0; } - -/* We must not compile this function twice. */ -# ifndef NO_GLOB_PATTERN_P -int -__glob_pattern_type (const char *pattern, int quote) -{ - const char *p; - int ret = 0; - - for (p = pattern; *p != '\0'; ++p) - switch (*p) - { - case '?': - case '*': - return 1; - - case '\\': - if (quote) - { - if (p[1] != '\0') - ++p; - ret |= 2; - } - break; - - case '[': - ret |= 4; - break; - - case ']': - if (ret & 4) - return 1; - break; - } - - return ret; -} - -/* Return nonzero if PATTERN contains any metacharacters. - Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ -int -__glob_pattern_p (const char *pattern, int quote) -{ - return __glob_pattern_type (pattern, quote) == 1; -} -# ifdef _LIBC -weak_alias (__glob_pattern_p, glob_pattern_p) -# endif -# endif - - /* We put this in a separate function mainly to allow the memory allocated with alloca to be recycled. */ static int __attribute_noinline__ link_stat (const char *dir, size_t dirlen, const char *fname, glob_t *pglob -# if !defined _LIBC && !HAVE_FSTATAT +# ifndef _LIBC , int flags # endif ) { size_t fnamelen = strlen (fname); - char *fullname = __alloca (dirlen + 1 + fnamelen + 1); + char *fullname = (char *) __alloca (dirlen + 1 + fnamelen + 1); struct stat st; +# ifndef _LIBC + struct_stat64 st64; +# endif mempcpy (mempcpy (mempcpy (fullname, dir, dirlen), "/", 1), fname, fnamelen + 1); @@ -1431,8 +1358,6 @@ link_exists_p (int dfd, const char *dir, size_t dirlen, const char *fname, # endif return status == 0 || errno == EOVERFLOW; } -#endif /* !defined GLOB_ONLY_P */ - /* Like `glob', but PATTERN is a final pathname component, and matches are searched for in DIRECTORY. diff --git a/posix/glob_internal.h b/posix/glob_internal.h new file mode 100644 index 0000000..d989a98 --- /dev/null +++ b/posix/glob_internal.h @@ -0,0 +1,57 @@ +/* Shared definition for glob and glob_pattern_p. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef GLOB_INTERNAL_H +# define GLOB_INTERNAL_H + +static inline int +__glob_pattern_type (const char *pattern, int quote) +{ + const char *p; + int ret = 0; + + for (p = pattern; *p != '\0'; ++p) + switch (*p) + { + case '?': + case '*': + return 1; + + case '\\': + if (quote) + { + if (p[1] != '\0') + ++p; + ret |= 2; + } + break; + + case '[': + ret |= 4; + break; + + case ']': + if (ret & 4) + return 1; + break; + } + + return ret; +} + +#endif /* GLOB_INTERNAL_H */ diff --git a/posix/glob_pattern_p.c b/posix/glob_pattern_p.c new file mode 100644 index 0000000..6e451f2 --- /dev/null +++ b/posix/glob_pattern_p.c @@ -0,0 +1,29 @@ +/* Return nonzero if PATTERN contains any metacharacters. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include "glob_internal.h" + +/* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ +int +__glob_pattern_p (const char *pattern, int quote) +{ + return __glob_pattern_type (pattern, quote) == 1; +} +weak_alias (__glob_pattern_p, glob_pattern_p) diff --git a/posix/globfree.c b/posix/globfree.c new file mode 100644 index 0000000..4ebd142 --- /dev/null +++ b/posix/globfree.c @@ -0,0 +1,37 @@ +/* Frees the dynamically allocated storage from an earlier call to glob. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Free storage allocated in PGLOB by a previous `glob' call. */ +void +globfree (glob_t *pglob) +{ + if (pglob->gl_pathv != NULL) + { + size_t i; + for (i = 0; i < pglob->gl_pathc; ++i) + free (pglob->gl_pathv[pglob->gl_offs + i]); + free (pglob->gl_pathv); + pglob->gl_pathv = NULL; + } +} +#ifndef globfree +libc_hidden_def (globfree) +#endif diff --git a/posix/globfree64.c b/posix/globfree64.c new file mode 100644 index 0000000..cce288e --- /dev/null +++ b/posix/globfree64.c @@ -0,0 +1,27 @@ +/* Frees the dynamically allocated storage from an earlier call to glob. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Free storage allocated in PGLOB by a previous `glob' call. */ +void +globfree64 (glob64_t *pglob) +{ +} +libc_hidden_def (globfree64) diff --git a/sysdeps/gnu/glob64.c b/sysdeps/gnu/glob64.c deleted file mode 100644 index d1e4e6f..0000000 --- a/sysdeps/gnu/glob64.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include - -#define dirent dirent64 -#define __readdir(dirp) __readdir64 (dirp) - -#define glob_t glob64_t -#define glob(pattern, flags, errfunc, pglob) \ - glob64 (pattern, flags, errfunc, pglob) -#define globfree(pglob) globfree64 (pglob) - -#undef stat -#define stat stat64 -#undef __stat -#define __stat(file, buf) __xstat64 (_STAT_VER, file, buf) - -#define NO_GLOB_PATTERN_P 1 - -#define COMPILE_GLOB64 1 - -#include - -libc_hidden_def (glob64) -libc_hidden_def (globfree64) diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 9d6a2de..8847751 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -162,7 +162,7 @@ endif ifeq ($(subdir),posix) sysdep_headers += bits/initspin.h -sysdep_routines += sched_getcpu +sysdep_routines += sched_getcpu oldglob tests += tst-affinity tst-affinity-pid diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 47bd189..50f4fb1 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,7 +1,3 @@ -ifeq ($(subdir),posix) -sysdep_routines += oldglob -endif - ifeq ($(subdir),stdlib) gen-as-const-headers += ucontext-offsets.sym endif diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob64.c similarity index 78% rename from sysdeps/unix/sysv/linux/alpha/glob.c rename to sysdeps/unix/sysv/linux/alpha/glob64.c index 2d7d287..dd86d15 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob64.c @@ -16,36 +16,25 @@ . */ #define glob64 __no_glob64_decl -#define globfree64 __no_globfree64_decl -#include #include #include /* For Linux/Alpha we have to make the glob symbols versioned. */ #define glob(pattern, flags, errfunc, pglob) \ __new_glob (pattern, flags, errfunc, pglob) -#define globfree(pglob) \ - __new_globfree (pglob) /* We need prototypes for these new names. */ extern int __new_glob (const char *__pattern, int __flags, int (*__errfunc) (const char *, int), glob_t *__pglob); -extern void __new_globfree (glob_t *__pglob); #include #undef glob -#undef globfree #undef glob64 -#undef globfree64 versioned_symbol (libc, __new_glob, glob, GLIBC_2_1); -versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1); libc_hidden_ver (__new_glob, glob) -libc_hidden_ver (__new_globfree, globfree) weak_alias (__new_glob, glob64) -weak_alias (__new_globfree, globfree64) -libc_hidden_ver (__new_globfree, globfree64) diff --git a/sysdeps/unix/sysv/linux/alpha/globfree.c b/sysdeps/unix/sysv/linux/alpha/globfree.c new file mode 100644 index 0000000..9d159f1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/globfree.c @@ -0,0 +1,36 @@ +/* Frees the dynamically allocated storage from an earlier call to glob. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#define globfree64 __no_globfree64_decl + +#include +#include + +#define globfree(pglob) __new_globfree (pglob) +extern void __new_globfree (glob_t *__pglob); + +#include + +#undef globfree +#undef globfree64 + +versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1); +libc_hidden_ver (__new_globfree, globfree) + +weak_alias (__new_globfree, globfree64) +libc_hidden_ver (__new_globfree, globfree64) diff --git a/sysdeps/unix/sysv/linux/arm/glob64.c b/sysdeps/unix/sysv/linux/arm/glob64.c deleted file mode 100644 index 82a9a29..0000000 --- a/sysdeps/unix/sysv/linux/arm/glob64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/glob.c b/sysdeps/unix/sysv/linux/glob.c new file mode 100644 index 0000000..153ba8c --- /dev/null +++ b/sysdeps/unix/sysv/linux/glob.c @@ -0,0 +1,23 @@ +/* Find pathnames matching a pattern. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#ifndef __OFF_T_MATCHES_OFF64_T +# include +#endif diff --git a/sysdeps/unix/sysv/linux/glob64.c b/sysdeps/unix/sysv/linux/glob64.c new file mode 100644 index 0000000..6ff6611 --- /dev/null +++ b/sysdeps/unix/sysv/linux/glob64.c @@ -0,0 +1,55 @@ +/* Find pathnames matching a pattern. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#ifdef __OFF_T_MATCHES_OFF64_T +# define glob64 __no_glob64_decl +# include +# undef glob64 +weak_alias (glob, glob64) +#else +# include +# include +# include + +# define dirent dirent64 +# define __readdir(dirp) __readdir64 (dirp) + +# define glob_t glob64_t +# define glob(pattern, flags, errfunc, pglob) \ + __glob64 (pattern, flags, errfunc, pglob) +# define globfree(pglob) globfree64 (pglob) + +# undef stat +# define stat stat64 + +# define COMPILE_GLOB64 1 + +# include + +# include "shlib-compat.h" + +# ifdef GLOB_NO_OLD_VERSION +strong_alias (__glob64, glob64) +libc_hidden_def (glob64) +# else +versioned_symbol (libc, __glob64, glob64, GLIBC_2_2); +libc_hidden_ver (__glob64, glob64) +# endif +#endif diff --git a/sysdeps/unix/sysv/linux/globfree.c b/sysdeps/unix/sysv/linux/globfree.c new file mode 100644 index 0000000..d615510 --- /dev/null +++ b/sysdeps/unix/sysv/linux/globfree.c @@ -0,0 +1,23 @@ +/* Frees the dynamically allocated storage from an earlier call to glob. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#define globfree64 __no_globfree64_decl +#include +#undef globfree64 +weak_alias (globfree, globfree64) +libc_hidden_ver (globfree, globfree64) diff --git a/sysdeps/unix/sysv/linux/globfree64.c b/sysdeps/unix/sysv/linux/globfree64.c new file mode 100644 index 0000000..e69de29 diff --git a/sysdeps/unix/sysv/linux/i386/alphasort64.c b/sysdeps/unix/sysv/linux/i386/alphasort64.c index d5fd47a..04b29b6 100644 --- a/sysdeps/unix/sysv/linux/i386/alphasort64.c +++ b/sysdeps/unix/sysv/linux/i386/alphasort64.c @@ -30,7 +30,7 @@ versioned_symbol (libc, __alphasort64, alphasort64, GLIBC_2_2); #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -#include +#include int __old_alphasort64 (const struct __old_dirent64 **a, diff --git a/sysdeps/unix/sysv/linux/i386/getdents64.c b/sysdeps/unix/sysv/linux/i386/getdents64.c index e8b257f..2010bbf 100644 --- a/sysdeps/unix/sysv/linux/i386/getdents64.c +++ b/sysdeps/unix/sysv/linux/i386/getdents64.c @@ -28,7 +28,7 @@ #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -#include +#include #define __GETDENTS __old_getdents64 #define DIRENT_TYPE struct __old_dirent64 diff --git a/sysdeps/unix/sysv/linux/i386/readdir64.c b/sysdeps/unix/sysv/linux/i386/readdir64.c index de8669f..da3defd 100644 --- a/sysdeps/unix/sysv/linux/i386/readdir64.c +++ b/sysdeps/unix/sysv/linux/i386/readdir64.c @@ -31,7 +31,7 @@ versioned_symbol (libc, __readdir64, readdir64, GLIBC_2_2); #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -#include +#include #define __READDIR attribute_compat_text_section __old_readdir64 #define __GETDENTS __old_getdents64 diff --git a/sysdeps/unix/sysv/linux/i386/readdir64_r.c b/sysdeps/unix/sysv/linux/i386/readdir64_r.c index 344fd53..8c0262d 100644 --- a/sysdeps/unix/sysv/linux/i386/readdir64_r.c +++ b/sysdeps/unix/sysv/linux/i386/readdir64_r.c @@ -31,7 +31,7 @@ versioned_symbol (libc, __readdir64_r, readdir64_r, GLIBC_2_2); #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -#include +#include #define __READDIR_R attribute_compat_text_section __old_readdir64_r #define __GETDENTS __old_getdents64 diff --git a/sysdeps/unix/sysv/linux/i386/versionsort64.c b/sysdeps/unix/sysv/linux/i386/versionsort64.c index 3e1c6ea..87f2f95 100644 --- a/sysdeps/unix/sysv/linux/i386/versionsort64.c +++ b/sysdeps/unix/sysv/linux/i386/versionsort64.c @@ -30,7 +30,7 @@ versioned_symbol (libc, __versionsort64, versionsort64, GLIBC_2_2); #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) -#include +#include int __old_versionsort64 (const struct __old_dirent64 **a, diff --git a/sysdeps/unix/sysv/linux/m68k/glob64.c b/sysdeps/unix/sysv/linux/m68k/glob64.c deleted file mode 100644 index 82a9a29..0000000 --- a/sysdeps/unix/sysv/linux/m68k/glob64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c deleted file mode 100644 index 33918ea..0000000 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c +++ /dev/null @@ -1 +0,0 @@ -/* glob64 is in glob.c */ diff --git a/sysdeps/unix/sysv/linux/i386/olddirent.h b/sysdeps/unix/sysv/linux/olddirent.h similarity index 100% rename from sysdeps/unix/sysv/linux/i386/olddirent.h rename to sysdeps/unix/sysv/linux/olddirent.h diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/oldglob.c similarity index 62% rename from sysdeps/unix/sysv/linux/i386/glob64.c rename to sysdeps/unix/sysv/linux/oldglob.c index e825b7c..8b04c3c 100644 --- a/sysdeps/unix/sysv/linux/i386/glob64.c +++ b/sysdeps/unix/sysv/linux/oldglob.c @@ -1,5 +1,5 @@ -/* Two glob variants with 64-bit support, for dirent64 and __olddirent64. - Copyright (C) 1998-2017 Free Software Foundation, Inc. +/* Find pathnames matching a pattern. Compatibility version. + Copyright (C) 2017 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,62 +16,33 @@ License along with the GNU C Library; if not, see . */ -#include #include -#include - -#define dirent dirent64 -#define __readdir(dirp) __readdir64 (dirp) - -#define glob_t glob64_t -#define glob(pattern, flags, errfunc, pglob) \ - __glob64 (pattern, flags, errfunc, pglob) -#define globfree(pglob) globfree64 (pglob) - -#undef stat -#define stat stat64 -#undef __stat -#define __stat(file, buf) __xstat64 (_STAT_VER, file, buf) - -#define NO_GLOB_PATTERN_P 1 - -#define COMPILE_GLOB64 1 - -#include - #include "shlib-compat.h" -libc_hidden_def (globfree64) - -versioned_symbol (libc, __glob64, glob64, GLIBC_2_2); -libc_hidden_ver (__glob64, glob64) - -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) \ + && !defined(GLOB_NO_OLD_VERSION) -#include +#include int __old_glob64 (const char *__pattern, int __flags, int (*__errfunc) (const char *, int), glob64_t *__pglob); libc_hidden_proto (__old_glob64); -#undef dirent +#define glob_t glob64_t +#define globfree(pglob) globfree64 (pglob) +#undef stat +#define stat stat64 + #define dirent __old_dirent64 -#undef GL_READDIR -# define GL_READDIR(pglob, stream) \ +#define GL_READDIR(pglob, stream) \ ((struct __old_dirent64 *) (pglob)->gl_readdir (stream)) -#undef __readdir #define __readdir(dirp) __old_readdir64 (dirp) -#undef glob #define glob(pattern, flags, errfunc, pglob) \ __old_glob64 (pattern, flags, errfunc, pglob) #define convert_dirent __old_convert_dirent -#define glob_in_dir __old_glob_in_dir -#define GLOB_ATTRIBUTE attribute_compat_text_section -#define GLOB_ONLY_P 1 - -#define GLOB_COMPAT_BUILD 1 +#define GLOB_ATTRIBUTE attribute_compat_text_section #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c deleted file mode 100644 index 82a9a29..0000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/glob64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/glob64.c b/sysdeps/unix/sysv/linux/s390/s390-32/glob64.c new file mode 100644 index 0000000..b00dc54 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/s390-32/glob64.c @@ -0,0 +1,20 @@ +/* Find pathnames matching a pattern. S390-32 Linux version. + Copyright (C) 2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#define GLOB_NO_OLD_VERSION +#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c b/sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c new file mode 100644 index 0000000..56d7d12 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c @@ -0,0 +1,2 @@ +#define GLOB_NO_OLD_VERSION +#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c b/sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c deleted file mode 100644 index 82a9a29..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/wordsize-64/glob64.c b/sysdeps/unix/sysv/linux/wordsize-64/glob64.c deleted file mode 100644 index eab7703..0000000 --- a/sysdeps/unix/sysv/linux/wordsize-64/glob64.c +++ /dev/null @@ -1,2 +0,0 @@ -/* This file is here so sysdeps/gnu/glob64.c doesn't take precedence. */ -#include diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/glob.c b/sysdeps/unix/sysv/linux/x86_64/x32/glob.c deleted file mode 100644 index e542747..0000000 --- a/sysdeps/unix/sysv/linux/x86_64/x32/glob.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/wordsize-64/glob.c b/sysdeps/wordsize-64/glob.c deleted file mode 100644 index 082faf1..0000000 --- a/sysdeps/wordsize-64/glob.c +++ /dev/null @@ -1,8 +0,0 @@ -#define glob64 __no_glob64_decl -#define globfree64 __no_globfree64_decl -#include -#undef glob64 -#undef globfree64 -weak_alias (glob, glob64) -weak_alias (globfree, globfree64) -libc_hidden_ver (globfree, globfree64) diff --git a/sysdeps/wordsize-64/glob64.c b/sysdeps/wordsize-64/glob64.c deleted file mode 100644 index 33918ea..0000000 --- a/sysdeps/wordsize-64/glob64.c +++ /dev/null @@ -1 +0,0 @@ -/* glob64 is in glob.c */