diff options
author | 2011-09-17 07:25:06 +0000 | |
---|---|---|
committer | 2011-09-17 07:25:06 +0000 | |
commit | 313e8082dcb967a9463b98b4c8b62860af35c3c6 (patch) | |
tree | 0f3629bc68cc8f83c0af9be236396f0a728242f8 /sys-devel/make/files/make-3.82-glob-speedup.patch | |
parent | Initial import. (diff) | |
download | historical-313e8082dcb967a9463b98b4c8b62860af35c3c6.tar.gz historical-313e8082dcb967a9463b98b4c8b62860af35c3c6.tar.bz2 historical-313e8082dcb967a9463b98b4c8b62860af35c3c6.zip |
Punt broken glob build #383311 by Lars Wendler.
Package-Manager: portage-2.2.0_alpha58/cvs/Linux x86_64
Diffstat (limited to 'sys-devel/make/files/make-3.82-glob-speedup.patch')
-rw-r--r-- | sys-devel/make/files/make-3.82-glob-speedup.patch | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/sys-devel/make/files/make-3.82-glob-speedup.patch b/sys-devel/make/files/make-3.82-glob-speedup.patch deleted file mode 100644 index 79ca87eb60f5..000000000000 --- a/sys-devel/make/files/make-3.82-glob-speedup.patch +++ /dev/null @@ -1,89 +0,0 @@ -change from upstream to speed up by skipping unused globs - -https://bugs.gentoo.org/382845 - ---- a/read.c 2011/04/29 15:27:39 1.198 -+++ b/read.c 2011/05/02 00:18:06 1.199 -@@ -2901,6 +2901,7 @@ - const char *name; - const char **nlist = 0; - char *tildep = 0; -+ int globme = 1; - #ifndef NO_ARCHIVES - char *arname = 0; - char *memname = 0; -@@ -3109,32 +3110,40 @@ - } - #endif /* !NO_ARCHIVES */ - -- switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl)) -- { -- case GLOB_NOSPACE: -- fatal (NILF, _("virtual memory exhausted")); -- -- case 0: -- /* Success. */ -- i = gl.gl_pathc; -- nlist = (const char **)gl.gl_pathv; -- break; -- -- case GLOB_NOMATCH: -- /* If we want only existing items, skip this one. */ -- if (flags & PARSEFS_EXISTS) -- { -- i = 0; -- break; -- } -- /* FALLTHROUGH */ -- -- default: -- /* By default keep this name. */ -+ /* glob() is expensive: don't call it unless we need to. */ -+ if (!(flags & PARSEFS_EXISTS) || strpbrk (name, "?*[") == NULL) -+ { -+ globme = 0; - i = 1; - nlist = &name; -- break; -- } -+ } -+ else -+ switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl)) -+ { -+ case GLOB_NOSPACE: -+ fatal (NILF, _("virtual memory exhausted")); -+ -+ case 0: -+ /* Success. */ -+ i = gl.gl_pathc; -+ nlist = (const char **)gl.gl_pathv; -+ break; -+ -+ case GLOB_NOMATCH: -+ /* If we want only existing items, skip this one. */ -+ if (flags & PARSEFS_EXISTS) -+ { -+ i = 0; -+ break; -+ } -+ /* FALLTHROUGH */ -+ -+ default: -+ /* By default keep this name. */ -+ i = 1; -+ nlist = &name; -+ break; -+ } - - /* For each matched element, add it to the list. */ - while (i-- > 0) -@@ -3174,7 +3183,8 @@ - #endif /* !NO_ARCHIVES */ - NEWELT (concat (2, prefix, nlist[i])); - -- globfree (&gl); -+ if (globme) -+ globfree (&gl); - - #ifndef NO_ARCHIVES - if (arname) |