[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r3116 - in glibc-package/trunk/debian: . patches/kfreebsd



Author: ps-guest
Date: 2008-08-28 19:41:31 +0000 (Thu, 28 Aug 2008)
New Revision: 3116

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff
Log:
* extend kfreebsd/local-ftw.diff: do not use *at functions also in glob.c,
  this patch is applied only on kfreebsd, fixes globtest.out failure.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2008-08-28 13:47:08 UTC (rev 3115)
+++ glibc-package/trunk/debian/changelog	2008-08-28 19:41:31 UTC (rev 3116)
@@ -2,6 +2,8 @@
 
   [ Petr Salinger ]
   * kfreebsd/local-sysdeps.diff: update to revision 2310 (from glibc-bsd).
+  * extend kfreebsd/local-ftw.diff: do not use *at functions also in glob.c,
+    this patch is applied only on kfreebsd, fixes globtest.out failure.
   * any/local-linuxthreads-weak.diff: new patch to pass 
     stdio-common/scanf15.out test on linuxthreads platforms, 
     although it seems to be rather gcc 4.x bug, see GCC Bugzilla Bug 37266.

Modified: glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff
===================================================================
--- glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff	2008-08-28 13:47:08 UTC (rev 3115)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff	2008-08-28 19:41:31 UTC (rev 3116)
@@ -4,6 +4,7 @@
 	http://sourceware.org/ml/glibc-cvs/2006-q1/msg00636.html
 	http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/io/ftw.c.diff?cvsroot=glibc&r1=1.50&r2=1.51
 
+	http://sourceware.org/cgi-bin/cvsweb.cgi/libc/posix/glob.c.diff?cvsroot=glibc&r1=1.77&r2=1.78
 
 --- io/ftw.c~	2006-06-26 19:35:23.000000000 +0200
 +++ io/ftw.c	2006-06-26 19:35:23.000000000 +0200
@@ -49,3 +50,70 @@
  	    statres = LXSTAT (_STAT_VER, name, &st);
  	  if (statres == 0 && S_ISLNK (st.st_mode))
  	    flag = FTW_SLN;
+--- posix/glob.c
++++ posix/glob.c
+@@ -1222,42 +1222,21 @@
+    allocated with alloca to be recycled.  */
+ #if !defined _LIBC || !defined GLOB_ONLY_P
+ static int
+-__attribute_noinline__
+-link_exists2_p (const char *dir, size_t dirlen, const char *fname,
+-	       glob_t *pglob
+-# ifndef _LIBC
+-		, int flags
+-# endif
+-		)
++link_exists_p (const char *dir, size_t dirlen, const char *fname,
++	       glob_t *pglob, int flags)
+ {
+   size_t fnamelen = strlen (fname);
+   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);
+ 
+-# ifdef _LIBC
+-  return (*pglob->gl_stat) (fullname, &st) == 0;
+-# else
+   return ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
+ 	   ? (*pglob->gl_stat) (fullname, &st)
+ 	   : __stat64 (fullname, &st64)) == 0);
+-# endif
+ }
+-# ifdef _LIBC
+-#  define link_exists_p(dfd, dirname, dirnamelen, fname, pglob, flags) \
+-  (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)			      \
+-   ? link_exists2_p (dirname, dirnamelen, fname, pglob)			      \
+-   : ({ struct stat64 st64;						      \
+-       __fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0; }))
+-# else
+-#  define link_exists_p(dfd, dirname, dirnamelen, fname, pglob, flags) \
+-  link_exists2_p (dirname, dirnamelen, fname, pglob, flags)
+-# endif
+ #endif
+ 
+ 
+@@ -1332,10 +1311,6 @@
+ 	}
+       else
+ 	{
+-#ifdef _LIBC
+-	  int dfd = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
+-		     ? -1 : dirfd ((DIR *) stream));
+-#endif
+ 	  int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0)
+ 			   | ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
+ #if defined _AMIGA || defined VMS
+@@ -1394,7 +1369,7 @@
+ 		  /* If the file we found is a symlink we have to
+ 		     make sure the target file exists.  */
+ 		  if (!DIRENT_MIGHT_BE_SYMLINK (d)
+-		      || link_exists_p (dfd, directory, dirlen, name, pglob,
++		      || link_exists_p (directory, dirlen, name, pglob,
+ 					flags))
+ 		    {
+ 		      if (cur == names->count)


Reply to: