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

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



Author: ps-guest
Date: 2010-02-15 11:59:27 +0000 (Mon, 15 Feb 2010)
New Revision: 4199

Removed:
   glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
   glibc-package/trunk/debian/patches/series.kfreebsd-amd64
   glibc-package/trunk/debian/patches/series.kfreebsd-i386
Log:
* kfreebsd/local-sysdeps.diff: update to revision 2982 (from glibc-bsd).
* Drop kfreebsd/local-ftw.diff, use *at functions as other architectures,
    the 8.0 kernel supports them as native, 
    under previous kernels we have limited emulation.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2010-02-14 14:03:19 UTC (rev 4198)
+++ glibc-package/trunk/debian/changelog	2010-02-15 11:59:27 UTC (rev 4199)
@@ -18,7 +18,10 @@
   * scripts.in/nsscheck.sh: remove non-breaking space.  Closes: #569701.
 
   [ Petr Salinger]
-  * kfreebsd/local-sysdeps.diff: update to revision 2978 (from glibc-bsd).
+  * kfreebsd/local-sysdeps.diff: update to revision 2982 (from glibc-bsd).
+  * Drop kfreebsd/local-ftw.diff, use *at functions as other architectures,
+    the 8.0 kernel supports them as native, 
+    under previous kernels we have limited emulation.
 
  -- Aurelien Jarno <aurel32@debian.org>  Sun, 14 Feb 2010 15:03:02 +0100
 

Deleted: glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff
===================================================================
--- glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff	2010-02-14 14:03:19 UTC (rev 4198)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-ftw.diff	2010-02-15 11:59:27 UTC (rev 4199)
@@ -1,124 +0,0 @@
-
-disable usage of unimplemented *at functions
-revert to previous behaviour, inspired by
-	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     |    6 ++++++
- posix/glob.c |   31 +++----------------------------
- 2 files changed, 9 insertions(+), 28 deletions(-)
-
---- a/io/ftw.c
-+++ b/io/ftw.c
-@@ -338,6 +338,7 @@
-     {
-       assert (data->dirstreams[data->actdir] == NULL);
- 
-+#if 0
-       if (dfdp != NULL && *dfdp != -1)
- 	{
- 	  int fd = openat64_not_cancel_3 (*dfdp, data->dirbuf + data->ftw.base,
-@@ -347,6 +348,7 @@
- 	    close_not_cancel_no_status (fd);
- 	}
-       else
-+#endif      
- 	{
- 	  const char *name;
- 
-@@ -410,10 +412,12 @@
-   *((char *) __mempcpy (data->dirbuf + data->ftw.base, name, namlen)) = '\0';
- 
-   int statres;
-+#if 0  
-   if (dir->streamfd != -1)
-     statres = FXSTATAT (_STAT_VER, dir->streamfd, name, &st,
- 			(data->flags & FTW_PHYS) ? AT_SYMLINK_NOFOLLOW : 0);
-   else
-+#endif  
-     {
-       if ((data->flags & FTW_CHDIR) == 0)
- 	name = data->dirbuf;
-@@ -433,10 +437,12 @@
- 	flag = FTW_SLN;
-       else
- 	{
-+#if 0	
- 	  if (dir->streamfd != -1)
- 	    statres = FXSTATAT (_STAT_VER, dir->streamfd, name, &st,
- 				AT_SYMLINK_NOFOLLOW);
- 	  else
-+#endif	  
- 	    statres = LXSTAT (_STAT_VER, name, &st);
- 	  if (statres == 0 && S_ISLNK (st.st_mode))
- 	    flag = FTW_SLN;
---- a/posix/glob.c
-+++ b/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)

Modified: glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff	2010-02-14 14:03:19 UTC (rev 4198)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff	2010-02-15 11:59:27 UTC (rev 4199)
@@ -18306,7 +18306,7 @@
 +}
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/open.c
-@@ -0,0 +1,93 @@
+@@ -0,0 +1,63 @@
 +/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +
@@ -18358,36 +18358,6 @@
 +    fd = INLINE_SYSCALL (open, 3, file, oflag, mode);
 +    LIBC_CANCEL_RESET (oldtype);
 +  }
-+
-+#if 0
-+/* At least 8.0 kernel seems be fine and this workaround does not respect "sysctl vfs.timestamp_precision" */
-+
-+  if (fd >= 0 && (oflag & O_TRUNC))
-+    {
-+      /* Set the modification time.  The kernel ought to do this.  */
-+      int saved_errno = errno;
-+      struct timeval tv[2];
-+
-+      if (__gettimeofday (&tv[1], NULL) >= 0)
-+	{
-+	  struct stat statbuf;
-+
-+	  if (__fxstat (_STAT_VER, fd, &statbuf) >= 0)
-+	    {
-+	      tv[0].tv_sec = statbuf.st_atime;
-+	      tv[0].tv_usec = 0;
-+
-+#ifdef NOT_IN_libc
-+	      futimes (fd, tv);
-+#else
-+	      __futimes (fd, tv);
-+#endif
-+	    }
-+	}
-+      __set_errno (saved_errno);
-+    }
-+#endif
-+
 +  return fd;
 +}
 +libc_hidden_def (__libc_open)
@@ -18412,7 +18382,7 @@
 +strong_alias (__open_2, __open64_2)
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/openat.c
-@@ -0,0 +1,314 @@
+@@ -0,0 +1,189 @@
 +/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +
@@ -18569,140 +18539,15 @@
 +      mode = va_arg (arg, int);
 +      va_end (arg);
 +    }
-+
-+# ifndef __ASSUME_ATFCTS
-+  if (__have_atfcts >= 0)
-+# endif
++  
++  if (SINGLE_THREAD_P)
++    return __openat_nocancel(fd, file, oflag, mode);
++  else
 +    {
-+      if (SINGLE_THREAD_P)
-+	{
-+	  result = INLINE_SYSCALL (openat, 4, fd, file, oflag, mode);
-+	}
-+      else
-+	{
-+	  int oldtype = LIBC_CANCEL_ASYNC ();
-+	  result = INLINE_SYSCALL (openat, 4, fd, file, oflag, mode);
-+	  LIBC_CANCEL_RESET (oldtype);
-+	}
-+# ifndef __ASSUME_ATFCTS
-+      if (result == -1 && errno == ENOSYS)
-+	__have_atfcts = -1;
-+# endif
++      int oldtype = LIBC_CANCEL_ASYNC ();
++      result = __openat_nocancel(fd, file, oflag, mode);
++      LIBC_CANCEL_RESET (oldtype);
 +    }
-+
-+#ifndef __ASSUME_ATFCTS
-+  if (__have_atfcts < 0)
-+    {
-+      if (fd != AT_FDCWD && file[0] != '/')
-+	{
-+	  int mib[4];
-+	  size_t kf_len = 0;
-+	  char *kf_buf, *kf_bufp;
-+	  size_t filelen;
-+
-+	  if (fd < 0)
-+	    {
-+	      __set_errno (EBADF);
-+	      return -1;
-+	    }
-+
-+	  filelen = strlen (file);
-+	  if (__builtin_expect (filelen == 0, 0))
-+	    {
-+	      __set_errno (ENOENT);
-+	      return -1;
-+	    }
-+
-+	  mib[0] = CTL_KERN;
-+	  mib[1] = KERN_PROC;
-+	  mib[2] = KERN_PROC_FILEDESC;
-+	  mib[3] = __getpid ();
-+
-+	  if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
-+	    {
-+	      __set_errno (ENOSYS);
-+	      return -1;
-+	    }
-+
-+	  kf_buf = alloca (kf_len + filelen);
-+	  if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
-+	    {
-+	      __set_errno (ENOSYS);
-+	      return -1;
-+	    }
-+
-+	  kf_bufp = kf_buf;
-+	  while (kf_bufp < kf_buf + kf_len)
-+	    {
-+	      struct kinfo_file *kf =
-+		(struct kinfo_file *) (uintptr_t) kf_bufp;
-+
-+	      if (kf->kf_fd == fd)
-+		{
-+		  if (kf->kf_type != KF_TYPE_VNODE ||
-+		      kf->kf_vnode_type != KF_VTYPE_VDIR)
-+		    {
-+		      __set_errno (ENOTDIR);
-+		      return -1;
-+		    }
-+
-+		  strcat (kf->kf_path, "/");
-+		  strcat (kf->kf_path, file);
-+		  file = kf->kf_path;
-+		  break;
-+		}
-+	      kf_bufp += kf->kf_structsize;
-+	    }
-+
-+	  if (kf_bufp >= kf_buf + kf_len)
-+	    {
-+	      __set_errno (EBADF);
-+	      return -1;
-+	    }
-+	}
-+      if (SINGLE_THREAD_P)
-+	{
-+	  result = INLINE_SYSCALL (open, 3, file, oflag, mode);
-+	}
-+      else
-+	{
-+	  int oldtype = LIBC_CANCEL_ASYNC ();
-+	  result = INLINE_SYSCALL (open, 3, file, oflag, mode);
-+	  LIBC_CANCEL_RESET (oldtype);
-+	}
-+
-+    }
-+#endif
-+
-+#if 0
-+/* At least 8.0 kernel seems be fine and this workaround does not respect "sysctl vfs.timestamp_precision" */
-+
-+  if (result >= 0 && (oflag & O_TRUNC))
-+    {
-+      /* Set the modification time.  The kernel ought to do this.  */
-+      int saved_errno = errno;
-+      struct timeval tv[2];
-+
-+      if (__gettimeofday (&tv[1], NULL) >= 0)
-+	{
-+	  struct stat statbuf;
-+
-+	  if (__fxstat (_STAT_VER, result, &statbuf) >= 0)
-+	    {
-+	      tv[0].tv_sec = statbuf.st_atime;
-+	      tv[0].tv_usec = 0;
-+
-+#ifdef NOT_IN_libc
-+	      futimes (fd, tv);
-+#else
-+	      __futimes (fd, tv);
-+#endif
-+	    }
-+	}
-+      __set_errno (saved_errno);
-+    }
-+#endif
-+
 +  return result;
 +}
 +
@@ -23490,13 +23335,13 @@
 +      case _SC_NGROUPS_MAX:
 +	request[0] = CTL_KERN;
 +	request[1] = KERN_NGROUPS;
-+	if (sysctl(request, 2, &value, &len, NULL, 0) == -1)
++	if (__sysctl(request, 2, &value, &len, NULL, 0) == -1)
 +	    return NGROUPS_MAX;
 +	return (long)value;
 +      case _SC_ARG_MAX:
 +	request[0] = CTL_KERN;
 +	request[1] = KERN_ARGMAX;
-+	if (sysctl(request, 2, &value, &len, NULL, 0) == -1)
++	if (__sysctl(request, 2, &value, &len, NULL, 0) == -1)
 +	    return ARG_MAX;
 +	return (long)value;
 +    }

Modified: glibc-package/trunk/debian/patches/series.kfreebsd-amd64
===================================================================
--- glibc-package/trunk/debian/patches/series.kfreebsd-amd64	2010-02-14 14:03:19 UTC (rev 4198)
+++ glibc-package/trunk/debian/patches/series.kfreebsd-amd64	2010-02-15 11:59:27 UTC (rev 4199)
@@ -1,5 +1,4 @@
 kfreebsd/local-config_h_in.patch
-kfreebsd/local-ftw.diff
 kfreebsd/local-linuxthreads29.diff
 kfreebsd/local-memusage_no_mremap.diff
 kfreebsd/local-pthread_at_fork.diff

Modified: glibc-package/trunk/debian/patches/series.kfreebsd-i386
===================================================================
--- glibc-package/trunk/debian/patches/series.kfreebsd-i386	2010-02-14 14:03:19 UTC (rev 4198)
+++ glibc-package/trunk/debian/patches/series.kfreebsd-i386	2010-02-15 11:59:27 UTC (rev 4199)
@@ -1,5 +1,4 @@
 kfreebsd/local-config_h_in.patch
-kfreebsd/local-ftw.diff
 kfreebsd/local-linuxthreads29.diff
 kfreebsd/local-memusage_no_mremap.diff
 kfreebsd/local-pthread_at_fork.diff


Reply to: