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

r4506 - in glibc-package/branches/eglibc-2.13/debian: . patches/kfreebsd



Author: aurel32
Date: 2011-02-08 18:47:37 +0000 (Tue, 08 Feb 2011)
New Revision: 4506

Modified:
   glibc-package/branches/eglibc-2.13/debian/changelog
   glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-linuxthreads29.diff
   glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-sysdeps.diff
Log:
  * kfreebsd/local-sysdeps.diff, kfreebsd/local-linuxthreads29.diff: 
    update to revision 3258 (from glibc-bsd).



Modified: glibc-package/branches/eglibc-2.13/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/changelog	2011-02-08 08:51:37 UTC (rev 4505)
+++ glibc-package/branches/eglibc-2.13/debian/changelog	2011-02-08 18:47:37 UTC (rev 4506)
@@ -94,8 +94,8 @@
     ADJUNCT_AS_SHADOW to TRUE. This avoid NIS password leakage 
     (CVE-2010-0015), but can be changed to FALSE to accomomdate some
     NIS installations.  Closes: #566297, #566844.
-  * kfreebsd/local-sysdeps.diff: update to revision 3252 (from glibc-bsd)
-    Closes: #602776.
+  * kfreebsd/local-sysdeps.diff, kfreebsd/local-linuxthreads29.diff: 
+    update to revision 3258 (from glibc-bsd)  Closes: #602776.
   * debian/rules: split build-indep and build-arch targets.  Closes: 
     #611926.
   * sysdeps/sparc.mk, sysdeps/sparc64.mk: build with --enable-multi-arch.

Modified: glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-linuxthreads29.diff
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-linuxthreads29.diff	2011-02-08 08:51:37 UTC (rev 4505)
+++ glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-linuxthreads29.diff	2011-02-08 18:47:37 UTC (rev 4506)
@@ -68,3 +68,26 @@
  
  #include <sysdeps/generic/malloc-machine.h>
  
+--- glibc-2.9.orig/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
++++ glibc-2.9/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
+@@ -42,14 +42,14 @@
+ weak_extern (__pthread_internal_tsd_set)
+ # endif
+ 
+-#define __libc_tsd_define(CLASS, KEY)	CLASS void *__libc_tsd_##KEY##_data;
+-#define __libc_tsd_address(KEY) \
+-  __libc_maybe_call2 (pthread_internal_tsd_address,			\
++#define __libc_tsd_define(CLASS, TYPE, KEY)	CLASS TYPE __libc_tsd_##KEY##_data;
++#define __libc_tsd_address(TYPE, KEY) \
++  (TYPE *) __libc_maybe_call2 (pthread_internal_tsd_address,			\
+ 		      (_LIBC_TSD_KEY_##KEY), &__libc_tsd_##KEY##_data)
+-#define __libc_tsd_get(KEY) \
+-  __libc_maybe_call2 (pthread_internal_tsd_get,				\
++#define __libc_tsd_get(TYPE, KEY) \
++  (TYPE) __libc_maybe_call2 (pthread_internal_tsd_get,				\
+ 		      (_LIBC_TSD_KEY_##KEY), __libc_tsd_##KEY##_data)
+-#define __libc_tsd_set(KEY, VALUE) \
++#define __libc_tsd_set(TYPE, KEY, VALUE) \
+   __libc_maybe_call2 (pthread_internal_tsd_set,				\
+ 		      (_LIBC_TSD_KEY_##KEY, (VALUE)),			\
+ 		       (__libc_tsd_##KEY##_data = (VALUE), 0))

Modified: glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-sysdeps.diff	2011-02-08 08:51:37 UTC (rev 4505)
+++ glibc-package/branches/eglibc-2.13/debian/patches/kfreebsd/local-sysdeps.diff	2011-02-08 18:47:37 UTC (rev 4506)
@@ -5882,7 +5882,7 @@
 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 +   02111-1307 USA.  */
 +
-+#ifndef _SYS_STAT_H
++#if !defined _SYS_STAT_H && !defined _FCNTL_H
 +# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 +#endif
 +
@@ -15223,68 +15223,6 @@
 @@ -0,0 +1 @@
 +#include <linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c>
 --- /dev/null
-+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/libc-tsd.h
-@@ -0,0 +1,59 @@
-+/* libc-internal interface for thread-specific data.  LinuxThreads version.
-+   Copyright (C) 1997-2002, 2003, 2010 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public License as
-+   published by the Free Software Foundation; either version 2.1 of the
-+   License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+   Boston, MA 02111-1307, USA.  */
-+
-+#ifndef _BITS_LIBC_TSD_H
-+#define _BITS_LIBC_TSD_H 1
-+
-+#include <linuxthreads/descr.h>
-+#include <tls.h>
-+
-+#if USE_TLS && HAVE___THREAD
-+
-+/* When __thread works, the generic definition is what we want.  */
-+# include_next <bits/libc-tsd.h>
-+
-+#else
-+
-+# include <bits/libc-lock.h>
-+
-+# ifndef SHARED
-+extern void ** __pthread_internal_tsd_address (int);
-+extern void *__pthread_internal_tsd_get (int);
-+extern int __pthread_internal_tsd_set (int, const void *);
-+
-+weak_extern (__pthread_internal_tsd_address)
-+weak_extern (__pthread_internal_tsd_get)
-+weak_extern (__pthread_internal_tsd_set)
-+# endif
-+
-+#define __libc_tsd_define(CLASS, TYPE, KEY)	CLASS TYPE __libc_tsd_##KEY##_data;
-+#define __libc_tsd_address(TYPE, KEY) \
-+  (TYPE *) __libc_maybe_call2 (pthread_internal_tsd_address,			\
-+		      (_LIBC_TSD_KEY_##KEY), &__libc_tsd_##KEY##_data)
-+#define __libc_tsd_get(TYPE, KEY) \
-+  (TYPE) __libc_maybe_call2 (pthread_internal_tsd_get,				\
-+		      (_LIBC_TSD_KEY_##KEY), __libc_tsd_##KEY##_data)
-+#define __libc_tsd_set(TYPE, KEY, VALUE) \
-+  __libc_maybe_call2 (pthread_internal_tsd_set,				\
-+		      (_LIBC_TSD_KEY_##KEY, (VALUE)),			\
-+		       (__libc_tsd_##KEY##_data = (VALUE), 0))
-+
-+#endif
-+
-+#endif	/* bits/libc-tsd.h */
---- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/local_lim.h
 @@ -0,0 +1,48 @@
 +/* Minimum guaranteed maximum values for system limits.  FreeBSD version.
@@ -19133,7 +19071,7 @@
 +#endif
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ptsname.c
-@@ -0,0 +1,104 @@
+@@ -0,0 +1,111 @@
 +/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +
@@ -19180,14 +19118,10 @@
 +extern const char __libc_ptyname2[] attribute_hidden;
 +
 +
-+/* Store at most BUFLEN characters of the pathname of the slave pseudo
-+   terminal associated with the master FD is open on in BUF.
-+   Return 0 on success, otherwise an error number.  */
 +int
-+__ptsname_r (int fd, char *buf, size_t buflen)
++__ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
 +{
 +  int saved_errno = errno;
-+  struct stat64 st;
 +  char *p;
 +
 +  if (buf == NULL)
@@ -19198,11 +19132,11 @@
 +
 +  /* Don't call isatty (fd) - it usually fails with errno = EAGAIN.  */
 +
-+  if (__fxstat64 (_STAT_VER, fd, &st) < 0)
++  if (__fxstat64 (_STAT_VER, fd, stp) < 0)
 +    return errno;
 +
 +  /* Check if FD really is a master pseudo terminal.  */
-+  if (!(S_ISCHR (st.st_mode)))
++  if (!(S_ISCHR (stp->st_mode)))
 +    {
 +      __set_errno (ENOTTY);
 +      return ENOTTY;
@@ -19218,16 +19152,16 @@
 +  /* instead of strlen(_PATH_DEV) we use (sizeof (_PATH_DEV) - 1)  */
 +  p = __mempcpy (buf, _PATH_DEV, sizeof (_PATH_DEV) - 1);
 +  buflen -= (sizeof (_PATH_DEV) - 1);
-+  if(__sysctlbyname("kern.devname", p, &buflen, &st.st_rdev, sizeof (st.st_rdev)) < 0)
++  if(__sysctlbyname("kern.devname", p, &buflen, &stp->st_rdev, sizeof (stp->st_rdev)) < 0)
 +    return errno;
 +  p[0] = 't';
 +
-+  if (__xstat64 (_STAT_VER, buf, &st) < 0)
++  if (__xstat64 (_STAT_VER, buf, stp) < 0)
 +    return errno;
 +
 +  /* Check if the pathname we're about to return might be
 +     slave pseudo terminal of the given master pseudo terminal.  */
-+  if (!(S_ISCHR (st.st_mode)))
++  if (!(S_ISCHR (stp->st_mode)))
 +    {
 +      /* This really is a configuration problem.  */
 +      __set_errno (ENOTTY);
@@ -19237,6 +19171,17 @@
 +  __set_errno (saved_errno);
 +  return 0;
 +}
++
++
++/* Store at most BUFLEN characters of the pathname of the slave pseudo
++   terminal associated with the master FD is open on in BUF.
++   Return 0 on success, otherwise an error number.  */
++int
++__ptsname_r (int fd, char *buf, size_t buflen)
++{
++  struct stat64 st;
++  return __ptsname_internal (fd, buf, buflen, &st);
++}
 +weak_alias (__ptsname_r, ptsname_r)
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/pwrite.c


Reply to: