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

r1967 - in glibc-package/branches/glibc-2.5/debian: . patches patches/any



Author: aurel32
Date: 2007-02-09 20:23:53 +0100 (Fri, 09 Feb 2007)
New Revision: 1967

Added:
   glibc-package/branches/glibc-2.5/debian/patches/any/local-notls.diff
Removed:
   glibc-package/branches/glibc-2.5/debian/patches/any/local-__thread.diff
Modified:
   glibc-package/branches/glibc-2.5/debian/changelog
   glibc-package/branches/glibc-2.5/debian/patches/series
Log:
  * Change any/local-__thread.diff into any/local-notls.diff.
  * Update any/local-notls.diff (make glibc buildable without TLS support)
    from Petr Salinger and Aurelien Jarno.


Modified: glibc-package/branches/glibc-2.5/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.5/debian/changelog	2007-02-09 05:05:46 UTC (rev 1966)
+++ glibc-package/branches/glibc-2.5/debian/changelog	2007-02-09 19:23:53 UTC (rev 1967)
@@ -98,8 +98,9 @@
     a symlink to /usr/include for compatibility reasons.
   * patches/all/local-pthread-manpages.diff: update to fix a typo in
     pthread_detach(3).  Closes: #98852.
-  * Update any/local-__thread.diff (make glibc buildable without __thread support)
-    from Petr Saliner.
+  * Change any/local-__thread.diff into any/local-notls.diff.
+  * Update any/local-notls.diff (make glibc buildable without TLS support)
+    from Petr Salinger and Aurelien Jarno.
   * hurd-i386/submitted-trivia.diff: new patch from Thomas Schwinge (make glibc 
     partly buildable on Hurd).
   * hurd-i386/submitted-stat.diff: new patch from Thomas Schwinge (update

Deleted: glibc-package/branches/glibc-2.5/debian/patches/any/local-__thread.diff
===================================================================
--- glibc-package/branches/glibc-2.5/debian/patches/any/local-__thread.diff	2007-02-09 05:05:46 UTC (rev 1966)
+++ glibc-package/branches/glibc-2.5/debian/patches/any/local-__thread.diff	2007-02-09 19:23:53 UTC (rev 1967)
@@ -1,135 +0,0 @@
-# DP: Description: Fix build when __thread is not available.
-# DP: Dpatch author: Michael Banck <mbanck@debian.org>
-# DP: Patch author: Thomas Schwinge
-# DP: Upstream status: Rejected
-# DP: Date: 2005-08-28
-
-2007-02-06  Petr Salinger  <petr.salinger@seznam.cz>
-
-        inet/inet_ntoa.c: Only use __thread if USE___THREAD.
-
-2005-08-28  Thomas Schwinge  <schwinge@nic-nac-project.de>
-
-	malloc/memusage.c: Only use __thread if USE___THREAD.
-
-
-Index: malloc/memusage.c
-===================================================================
-RCS file: /cvs/glibc/libc/malloc/memusage.c,v
-retrieving revision 1.12
-diff -u -r1.12 memusage.c
---- malloc/memusage.c	20 Aug 2005 01:12:37 -0000	1.12
-+++ malloc/memusage.c	27 Aug 2005 23:43:02 -0000
-@@ -83,7 +83,11 @@
- static memusage_cntr_t decreasing_mremap;
- static memusage_size_t current_heap;
- static memusage_size_t peak_use[3];
-+#if USE___THREAD
- static __thread uintptr_t start_sp;
-+#else
-+static uintptr_t start_sp;
-+#endif
- 
- /* A few macros to make the source more readable.  */
- #define peak_heap	peak_use[0]
---- inet/inet_ntoa.c	2006-04-09 07:50:08.000000000 +0200
-+++ inet/inet_ntoa.c	2007-02-06 22:59:37.000000000 +0100
-@@ -21,10 +21,14 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <arpa/inet.h>
-+#include <tls.h>
- 
- /* The interface of this function is completely stupid, it requires a
-    static buffer.  We relax this a bit in that we allow one buffer for
-    each thread.  */
-+   
-+#if USE_TLS && HAVE___THREAD
-+
- static __thread char buffer[18];
- 
- 
-@@ -37,3 +41,83 @@
- 
-   return buffer;
- }
-+
-+#else
-+#include <bits/libc-lock.h>
-+
-+/* The interface of this function is completely stupid, it requires a
-+   static buffer.  We relax this a bit in that we allow at least one
-+   buffer for each thread.  */
-+
-+/* This is the key for the thread specific memory.  */
-+static __libc_key_t key;
-+
-+/* If nonzero the key allocation failed and we should better use a
-+   static buffer than fail.  */
-+static char local_buf[18];
-+static char *static_buf;
-+
-+/* Destructor for the thread-specific data.  */
-+static void init (void);
-+static void free_key_mem (void *mem);
-+
-+
-+char *
-+inet_ntoa (struct in_addr in)
-+{
-+  __libc_once_define (static, once);
-+  char *buffer;
-+  unsigned char *bytes;
-+
-+  /* If we have not yet initialized the buffer do it now.  */
-+  __libc_once (once, init);
-+
-+  if (static_buf != NULL)
-+    buffer = static_buf;
-+  else
-+    {
-+      /* We don't use the static buffer and so we have a key.  Use it
-+	 to get the thread-specific buffer.  */
-+      buffer = __libc_getspecific (key);
-+      if (buffer == NULL)
-+	{
-+	  /* No buffer allocated so far.  */
-+	  buffer = malloc (18);
-+	  if (buffer == NULL)
-+	    /* No more memory available.  We use the static buffer.  */
-+	    buffer = local_buf;
-+	  else
-+	    __libc_setspecific (key, buffer);
-+	}
-+    }
-+
-+  bytes = (unsigned char *) &in;
-+  __snprintf (buffer, 18, "%d.%d.%d.%d",
-+	      bytes[0], bytes[1], bytes[2], bytes[3]);
-+
-+  return buffer;
-+}
-+
-+
-+/* Initialize buffer.  */
-+static void
-+init (void)
-+{
-+  if (__libc_key_create (&key, free_key_mem))
-+    /* Creating the key failed.  This means something really went
-+       wrong.  In any case use a static buffer which is better than
-+       nothing.  */
-+    static_buf = local_buf;
-+}
-+
-+
-+/* Free the thread specific data, this is done if a thread terminates.  */
-+static void
-+free_key_mem (void *mem)
-+{
-+  free (mem);
-+  __libc_setspecific (key, NULL);
-+}
-+
-+#endif
-+

Copied: glibc-package/branches/glibc-2.5/debian/patches/any/local-notls.diff (from rev 1958, glibc-package/branches/glibc-2.5/debian/patches/any/local-__thread.diff)
===================================================================
--- glibc-package/branches/glibc-2.5/debian/patches/any/local-__thread.diff	2007-02-08 14:25:07 UTC (rev 1958)
+++ glibc-package/branches/glibc-2.5/debian/patches/any/local-notls.diff	2007-02-09 19:23:53 UTC (rev 1967)
@@ -0,0 +1,147 @@
+# DP: Description: Fix build when TLS is not available.
+# DP: Upstream status: Submitted parts have been rejected. Parts 
+                       submitted would very probably be rejected.
+
+2007-02-09  Aurelien Jarno  <aurelien@aurel32.net>
+
+        resolv/gai_sigqueue.c: Include <pthread.h>.
+
+2007-02-06  Petr Salinger  <petr.salinger@seznam.cz>
+
+        inet/inet_ntoa.c: Only use __thread if USE___THREAD.
+
+2005-08-28  Thomas Schwinge  <schwinge@nic-nac-project.de>
+
+	malloc/memusage.c: Only use __thread if USE___THREAD.
+
+
+Index: malloc/memusage.c
+===================================================================
+RCS file: /cvs/glibc/libc/malloc/memusage.c,v
+retrieving revision 1.12
+diff -u -r1.12 memusage.c
+--- malloc/memusage.c	20 Aug 2005 01:12:37 -0000	1.12
++++ malloc/memusage.c	27 Aug 2005 23:43:02 -0000
+@@ -83,7 +83,11 @@
+ static memusage_cntr_t decreasing_mremap;
+ static memusage_size_t current_heap;
+ static memusage_size_t peak_use[3];
++#if USE___THREAD
+ static __thread uintptr_t start_sp;
++#else
++static uintptr_t start_sp;
++#endif
+ 
+ /* A few macros to make the source more readable.  */
+ #define peak_heap	peak_use[0]
+--- inet/inet_ntoa.c	2006-04-09 07:50:08.000000000 +0200
++++ inet/inet_ntoa.c	2007-02-06 22:59:37.000000000 +0100
+@@ -21,10 +21,14 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <arpa/inet.h>
++#include <tls.h>
+ 
+ /* The interface of this function is completely stupid, it requires a
+    static buffer.  We relax this a bit in that we allow one buffer for
+    each thread.  */
++   
++#if USE_TLS && HAVE___THREAD
++
+ static __thread char buffer[18];
+ 
+ 
+@@ -37,3 +41,83 @@
+ 
+   return buffer;
+ }
++
++#else
++#include <bits/libc-lock.h>
++
++/* The interface of this function is completely stupid, it requires a
++   static buffer.  We relax this a bit in that we allow at least one
++   buffer for each thread.  */
++
++/* This is the key for the thread specific memory.  */
++static __libc_key_t key;
++
++/* If nonzero the key allocation failed and we should better use a
++   static buffer than fail.  */
++static char local_buf[18];
++static char *static_buf;
++
++/* Destructor for the thread-specific data.  */
++static void init (void);
++static void free_key_mem (void *mem);
++
++
++char *
++inet_ntoa (struct in_addr in)
++{
++  __libc_once_define (static, once);
++  char *buffer;
++  unsigned char *bytes;
++
++  /* If we have not yet initialized the buffer do it now.  */
++  __libc_once (once, init);
++
++  if (static_buf != NULL)
++    buffer = static_buf;
++  else
++    {
++      /* We don't use the static buffer and so we have a key.  Use it
++	 to get the thread-specific buffer.  */
++      buffer = __libc_getspecific (key);
++      if (buffer == NULL)
++	{
++	  /* No buffer allocated so far.  */
++	  buffer = malloc (18);
++	  if (buffer == NULL)
++	    /* No more memory available.  We use the static buffer.  */
++	    buffer = local_buf;
++	  else
++	    __libc_setspecific (key, buffer);
++	}
++    }
++
++  bytes = (unsigned char *) &in;
++  __snprintf (buffer, 18, "%d.%d.%d.%d",
++	      bytes[0], bytes[1], bytes[2], bytes[3]);
++
++  return buffer;
++}
++
++
++/* Initialize buffer.  */
++static void
++init (void)
++{
++  if (__libc_key_create (&key, free_key_mem))
++    /* Creating the key failed.  This means something really went
++       wrong.  In any case use a static buffer which is better than
++       nothing.  */
++    static_buf = local_buf;
++}
++
++
++/* Free the thread specific data, this is done if a thread terminates.  */
++static void
++free_key_mem (void *mem)
++{
++  free (mem);
++  __libc_setspecific (key, NULL);
++}
++
++#endif
++
+--- resolv/gai_sigqueue.c	2007-02-09 20:15:02.000000000 +0100
++++ resolv/gai_sigqueue.c	2007-02-09 20:16:02.000000000 +0100
+@@ -19,6 +19,7 @@
+ #include <aio.h>
+ #include <errno.h>
+ #include <signal.h>
++#include <pthread.h>
+ 
+ #include <gai_misc.h>
+ 

Modified: glibc-package/branches/glibc-2.5/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.5/debian/patches/series	2007-02-09 05:05:46 UTC (rev 1966)
+++ glibc-package/branches/glibc-2.5/debian/patches/series	2007-02-09 19:23:53 UTC (rev 1967)
@@ -97,7 +97,7 @@
 any/cvs-itoa-c.diff -p1
 any/cvs-lt-update.diff -p0
 any/cvs-zdump-64-bit.diff -p1
-any/local-__thread.diff -p0
+any/local-notls.diff -p0
 any/local-asserth-decls.diff -p0
 #any/local-base.diff -p0	# g: suspended
 any/local-bashisms.diff



Reply to: