aboutsummaryrefslogtreecommitdiffstats
path: root/fileutil.cc
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2016-05-03 01:05:32 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2016-05-03 01:06:08 +0900
commit9f6343caff8c7c505dd9e1b5a22e2b60f3c0d94f (patch)
treee053ecf50f8dec9c5d5590b7e3d1130bdbf8e1ea /fileutil.cc
parent8082dcbc7822870a6bf5363b26aca96df0da5847 (diff)
downloadandroid_build_kati-9f6343caff8c7c505dd9e1b5a22e2b60f3c0d94f.tar.gz
android_build_kati-9f6343caff8c7c505dd9e1b5a22e2b60f3c0d94f.tar.bz2
android_build_kati-9f6343caff8c7c505dd9e1b5a22e2b60f3c0d94f.zip
Always sort glob results
This fixes issue #69. GNU make 3 sorts both for include and $(wildcard) while GNU make 4 doesn't.
Diffstat (limited to 'fileutil.cc')
-rw-r--r--fileutil.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/fileutil.cc b/fileutil.cc
index 0886def..0d3c2d6 100644
--- a/fileutil.cc
+++ b/fileutil.cc
@@ -157,7 +157,7 @@ class GlobCache {
vector<string>* files = p.first->second = new vector<string>;
if (strcspn(pat, "?*[\\") != strlen(pat)) {
glob_t gl;
- glob(pat, GLOB_NOSORT, NULL, &gl);
+ glob(pat, 0, NULL, &gl);
for (size_t i = 0; i < gl.gl_pathc; i++) {
files->push_back(gl.gl_pathv[i]);
}