Browse Source

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.

Eric Andersen 19 years ago
parent
commit
c3f8ec2942
3 changed files with 681 additions and 156 deletions
  1. 1 2
      extra/Configs/Config.in
  2. 673 151
      libc/misc/glob/glob.c
  3. 7 3
      libc/misc/glob/glob64.c

+ 1 - 2
extra/Configs/Config.in

@@ -1200,7 +1200,7 @@ config UCLIBC_HAS_GLOB
 config UCLIBC_HAS_GNU_GLOB
 	bool "Support gnu glob() interface"
 	depends on UCLIBC_HAS_GLOB
-	default y
+	default n
 	help
 	  The gnu glob interface is somewhat larger (weighing in at about 4,2k) than
 	  it's SuSv3 counterpart (and is out of date). It is an old copy from glibc and
@@ -1208,7 +1208,6 @@ config UCLIBC_HAS_GNU_GLOB
 
 	  Answer Y if you want to include full gnu glob() instead of the smaller SUSv3
 	  compatible glob().
-	  It is only default, because it is the old/stable version.
 
 	  Most people will answer N.
 

File diff suppressed because it is too large
+ 673 - 151
libc/misc/glob/glob.c


+ 7 - 3
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"
+

Some files were not shown because too many files changed in this diff