summaryrefslogtreecommitdiff
path: root/libc/misc/glob/glob64.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-07-04 10:59:15 +0000
committerEric Andersen <andersen@codepoet.org>2006-07-04 10:59:15 +0000
commitc3f8ec2942f0ccf54125c67442168cb983366987 (patch)
treebc30b54db26ca5ac3a7fba95aa959895cb2e0e32 /libc/misc/glob/glob64.c
parent06980c0e6d7f025cc891537f3b7670e3e86693a1 (diff)
gcc 4.1.x is apparently miscompiling gnu glob on mips. This ports the latest and
massivly bloated greatest from glibc. And fixes things so the gnu glob interface is no longer the default.
Diffstat (limited to 'libc/misc/glob/glob64.c')
-rw-r--r--libc/misc/glob/glob64.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/misc/glob/glob64.c b/libc/misc/glob/glob64.c
index d84f874d5..bc2ba682f 100644
--- a/libc/misc/glob/glob64.c
+++ b/libc/misc/glob/glob64.c
@@ -11,6 +11,8 @@
#include <sys/stat.h>
#define dirent dirent64
+#define __readdir(dirp) readdir64 (dirp)
+#define __readdir64(dirp) readdir64 (dirp)
#define glob_t glob64_t
#define glob(pattern, flags, errfunc, pglob) \
@@ -19,8 +21,10 @@
#undef stat
#define stat stat64
-#define lstat lstat64
+#undef __stat
+#define __stat(file, buf) stat64(file, buf)
+
+#define COMPILE_GLOB64 1
-#define __GLOB64 1
-
#include "glob.c"
+