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

r5014 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2011-10-28 23:51:54 +0000 (Fri, 28 Oct 2011)
New Revision: 5014

Added:
   glibc-package/trunk/debian/patches/hurd-i386/tg-elfosabi_gnu.diff
   glibc-package/trunk/debian/patches/hurd-i386/tg-libc_once.diff
Removed:
   glibc-package/trunk/debian/patches/hurd-i386/submitted-ldsodefs.h.diff
   glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_once.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * patches/hurd-i386/{submitted-ldsodefs.h.diff, submitted-libc_once.diff}:
    Update to topgit version, and rename to 
    {tg-elfosabi_gnu.diff, tg-libc_once.diff}.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2011-10-28 23:48:19 UTC (rev 5013)
+++ glibc-package/trunk/debian/changelog	2011-10-28 23:51:54 UTC (rev 5014)
@@ -14,14 +14,15 @@
     submitted-ptr-mangle.diff, submitted-stat.diff,
     unsubmitted-tls-support.diff, unsubmitted-longjmp_chk.diff,
     unsubmitted-ptsname.diff, submitted-strtoul.diff,
-    unsubmitted-atomic-no-multiple_threads.diff, unsubmitted-i686.diff}:
+    unsubmitted-atomic-no-multiple_threads.diff, unsubmitted-i686.diff,
+    submitted-ldsodefs.h.diff, submitted-libc_once.diff}:
     Update to topgit version, and rename to 
-    tg-tlsdesc.sym.diff, tg-struct_stat.diff, tg-gscope.diff,
-    tg-tg-_dl_random.diff, bits_atomic.h_multiple_threads.diff,
-    tg-tg-dl-sysdep.c_SHARED.diff, __i686_defined.diff,
-    tg-tg-regenerate_errno.h.diff, tg-ptrmangle.diff, strtoul_PLT.diff,
-    tg-tg-tls.diff, tg-extern_inline.diff, tg-grantpt.diff, check_native.diff,
-    tg-tg-____longjmp_chk.diff.
+    {tg-tlsdesc.sym.diff, tg-struct_stat.diff, tg-gscope.diff,
+    tg-_dl_random.diff, tg-bits_atomic.h_multiple_threads.diff,
+    tg-dl-sysdep.c_SHARED.diff, tg-__i686_defined.diff,
+    tg-regenerate_errno.h.diff, tg-ptrmangle.diff, tg-strtoul_PLT.diff,
+    tg-tls.diff, tg-extern_inline.diff, tg-grantpt.diff, tg-check_native.diff,
+    tg-____longjmp_chk.diff, tg-elfosabi_gnu.diff, tg-libc_once.diff}.
   * patches/hurd-i386/submitted-libc_once.diff: Move kfreebsd part to
     patches/kfreebsd/submitted-libc_once.diff.
   * patches/hurd-i386/submitted-ldsodefs.h.diff: Move commited part to

Deleted: glibc-package/trunk/debian/patches/hurd-i386/submitted-ldsodefs.h.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/submitted-ldsodefs.h.diff	2011-10-28 23:48:19 UTC (rev 5013)
+++ glibc-package/trunk/debian/patches/hurd-i386/submitted-ldsodefs.h.diff	2011-10-28 23:51:54 UTC (rev 5014)
@@ -1,129 +0,0 @@
-http://sourceware.org/ml/libc-alpha/2011-06/msg00087.html
-
-binutils started emitting ELF files with ELFOSABI_GNU due to GNU-specific
-ELF extensions. We need to accept loading such binaries on hurd-i386 too.
-
-2011-06-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>
-
-        * sysdeps/mach/hurd/ldsodefs.h: New file, defines VALID_ELF_HEADER,
-        VALID_ELF_OSABI, VALID_ELF_ABIVERSION, MORE_ELF_HEADER_DATA, declares
-        _dl_non_dynamic_init.
-        * sysdeps/unix/sysv/linux/ldsodefs.h (VALID_ELF_OSABI,
-        VALID_ELF_ABIVERSION, MORE_ELF_HEADER_DATA): Use ELFOSABI_GNU instead of
-        ELFOSABI_LINUX.
-        * sysdeps/mach/hurd/powerpc/init-first.c (_dl_non_dynamic_init): Remove
-        declaration.
-	* sysdeps/mach/hurd/i386/init-first.c (_dl_non_dynamic_init): Likewise.
-
-t/elfosabi_gnu, except the first hook which is in cvs.
-
-diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
-index e79af1d..7c86609 100644
---- a/sysdeps/mach/hurd/i386/init-first.c
-+++ b/sysdeps/mach/hurd/i386/init-first.c
-@@ -37,9 +37,6 @@ extern void __init_misc (int, char **, char **);
- #ifdef USE_NONOPTION_FLAGS
- extern void __getopt_clean_environment (char **);
- #endif
--#ifndef SHARED
--extern void _dl_non_dynamic_init (void) internal_function;
--#endif
- extern void __libc_global_ctors (void);
- 
- unsigned int __hurd_threadvar_max;
-diff --git a/sysdeps/mach/hurd/ldsodefs.h b/sysdeps/mach/hurd/ldsodefs.h
-index e69de29..56e4b03 100644
---- a/sysdeps/mach/hurd/ldsodefs.h
-+++ b/sysdeps/mach/hurd/ldsodefs.h
-@@ -0,0 +1,52 @@
-+/* Run-time dynamic linker data structures for loaded ELF shared objects.
-+   Copyright (C) 2001, 2002, 2003, 2006, 2009, 2010, 2011 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; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifndef	_LDSODEFS_H
-+
-+#include <libc-abis.h>
-+
-+/* Get the real definitions.  */
-+#include_next <ldsodefs.h>
-+
-+/* Now define our stuff.  */
-+
-+/* Initialization which is normally done by the dynamic linker.  */
-+extern void _dl_non_dynamic_init (void) internal_function;
-+
-+/* Accept binaries which identify the binary as using Linux extensions.  */
-+#define VALID_ELF_HEADER(hdr,exp,size)	(memcmp (hdr, exp, size) == 0	\
-+					 || memcmp (hdr, expected2, size) == 0)
-+#define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_SYSV \
-+					 || osabi == ELFOSABI_GNU)
-+#define VALID_ELF_ABIVERSION(osabi,ver) \
-+  (ver == 0 || (osabi == ELFOSABI_GNU && ver < LIBC_ABI_MAX))
-+#define MORE_ELF_HEADER_DATA \
-+  static const unsigned char expected2[EI_PAD] =	\
-+  {							\
-+    [EI_MAG0] = ELFMAG0,				\
-+    [EI_MAG1] = ELFMAG1,				\
-+    [EI_MAG2] = ELFMAG2,				\
-+    [EI_MAG3] = ELFMAG3,				\
-+    [EI_CLASS] = ELFW(CLASS),				\
-+    [EI_DATA] = byteorder,				\
-+    [EI_VERSION] = EV_CURRENT,				\
-+    [EI_OSABI] = ELFOSABI_GNU				\
-+  }
-+
-+#endif /* ldsodefs.h */
-diff --git a/sysdeps/mach/hurd/powerpc/init-first.c b/sysdeps/mach/hurd/powerpc/init-first.c
-index 21b5054..2047cac 100644
---- a/sysdeps/mach/hurd/powerpc/init-first.c
-+++ b/sysdeps/mach/hurd/powerpc/init-first.c
-@@ -32,9 +32,6 @@ extern void __init_misc (int, char **, char **);
- #ifdef USE_NONOPTION_FLAGS
- extern void __getopt_clean_environment (char **);
- #endif
--#ifndef SHARED
--extern void _dl_non_dynamic_init (void) internal_function;
--#endif
- extern void __libc_global_ctors (void);
- 
- unsigned int __hurd_threadvar_max;
-diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h
-index 5d5b1b4..cf20217 100644
---- a/sysdeps/unix/sysv/linux/ldsodefs.h
-+++ b/sysdeps/unix/sysv/linux/ldsodefs.h
-@@ -58,9 +58,9 @@ extern void _dl_non_dynamic_init (void) internal_function;
- #define VALID_ELF_HEADER(hdr,exp,size)	(memcmp (hdr, exp, size) == 0	\
- 					 || memcmp (hdr, expected2, size) == 0)
- #define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_SYSV \
--					 || osabi == ELFOSABI_LINUX)
-+					 || osabi == ELFOSABI_GNU)
- #define VALID_ELF_ABIVERSION(osabi,ver) \
--  (ver == 0 || (osabi == ELFOSABI_LINUX && ver < LIBC_ABI_MAX))
-+  (ver == 0 || (osabi == ELFOSABI_GNU && ver < LIBC_ABI_MAX))
- #define MORE_ELF_HEADER_DATA \
-   static const unsigned char expected2[EI_PAD] =	\
-   {							\
-@@ -71,7 +71,7 @@ extern void _dl_non_dynamic_init (void) internal_function;
-     [EI_CLASS] = ELFW(CLASS),				\
-     [EI_DATA] = byteorder,				\
-     [EI_VERSION] = EV_CURRENT,				\
--    [EI_OSABI] = ELFOSABI_LINUX				\
-+    [EI_OSABI] = ELFOSABI_GNU				\
-   }
- 
- #endif /* ldsodefs.h */

Deleted: glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_once.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_once.diff	2011-10-28 23:48:19 UTC (rev 5013)
+++ glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_once.diff	2011-10-28 23:51:54 UTC (rev 5014)
@@ -1,66 +0,0 @@
-2007-10-28  Aurelien Jarno  <aurelien@aurel32.net>
-
-	* bits/libc-lock.h (__libc_once_get): New definiton.
-	* nptl/sysdeps/pthread/bits/libc-lock.h: Likewise.
-	* sysdeps/mach/bits/libc-lock.h: Likewise.
-	* sysdeps/mach/hurd/bits/libc-lock.h: Likewise.
-	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Use __libc_once_get
-	  instead of using implementational details.
-
-t/libc_once
-
----
- bits/libc-lock.h                              |    3 +++
- nptl/sysdeps/pthread/bits/libc-lock.h         |    3 +++
- sysdeps/mach/hurd/bits/libc-lock.h            |    4 ++++
- sysdeps/posix/getaddrinfo.c                   |    2 +-
- 5 files changed, 14 insertions(+), 1 deletion(-)
-
---- a/bits/libc-lock.h
-+++ b/bits/libc-lock.h
-@@ -98,6 +98,9 @@
-     }									      \
-   } while (0)
- 
-+/* Get once control variable.  */
-+#define __libc_once_get(ONCE_CONTROL) \
-+  ((ONCE_CONTROL) == 1)
- 
- /* Start a critical region with a cleanup function */
- #define __libc_cleanup_region_start(DOIT, FCT, ARG)			    \
---- a/nptl/sysdeps/pthread/bits/libc-lock.h
-+++ b/nptl/sysdeps/pthread/bits/libc-lock.h
-@@ -451,6 +451,9 @@
-     }									      \
-   } while (0)
- 
-+/* Get once control variable.  */
-+#define __libc_once_get(ONCE_CONTROL) \
-+  ((ONCE_CONTROL) != PTHREAD_ONCE_INIT)
- 
- /* Note that for I/O cleanup handling we are using the old-style
-    cancel handling.  It does not have to be integrated with C++ snce
---- a/sysdeps/mach/hurd/bits/libc-lock.h
-+++ b/sysdeps/mach/hurd/bits/libc-lock.h
-@@ -191,6 +191,10 @@
-     __libc_lock_unlock (ONCE_CONTROL.lock);				      \
-   } while (0)
- 
-+/* Get once control variable.  */
-+#define __libc_once_get(ONCE_CONTROL) \
-+  (!ONCE_CONTROL.done)
-+
- #ifdef _LIBC
- /* We need portable names for some functions.  E.g., when they are
-    used as argument to __libc_cleanup_region_start.  */
---- a/sysdeps/posix/getaddrinfo.c
-+++ b/sysdeps/posix/getaddrinfo.c
-@@ -2338,7 +2338,7 @@
- 	  __libc_lock_define_initialized (static, lock);
- 
- 	  __libc_lock_lock (lock);
--	  if (old_once && gaiconf_reload_flag)
-+	  if (__libc_once_get(old_once) && gaiconf_reload_flag)
- 	    gaiconf_reload ();
- 	  qsort_r (order, nresults, sizeof (order[0]), rfc3484_sort, &src);
- 	  __libc_lock_unlock (lock);

Copied: glibc-package/trunk/debian/patches/hurd-i386/tg-elfosabi_gnu.diff (from rev 5013, glibc-package/trunk/debian/patches/hurd-i386/submitted-ldsodefs.h.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-elfosabi_gnu.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-elfosabi_gnu.diff	2011-10-28 23:51:54 UTC (rev 5014)
@@ -0,0 +1,151 @@
+Subject: [PATCH] ELFOSABI_GNU
+
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+binutils started emitting ELF files with ELFOSABI_GNU due to GNU-specific
+ELF extensions. We need to accept loading such binaries on hurd-i386 too.
+
+2011-06-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+        * sysdeps/mach/hurd/ldsodefs.h: New file, defines VALID_ELF_HEADER,
+        VALID_ELF_OSABI, VALID_ELF_ABIVERSION, MORE_ELF_HEADER_DATA, declares
+        _dl_non_dynamic_init.
+        * sysdeps/unix/sysv/linux/ldsodefs.h (VALID_ELF_OSABI,
+        VALID_ELF_ABIVERSION, MORE_ELF_HEADER_DATA): Use ELFOSABI_GNU instead of
+        ELFOSABI_LINUX.
+        * sysdeps/mach/hurd/powerpc/init-first.c (_dl_non_dynamic_init): Remove
+        declaration.
+	* sysdeps/mach/hurd/i386/init-first.c (_dl_non_dynamic_init): Likewise.
+
+---
+
+This is Debian glibc svn r4778 of patches/hurd-i386/submitted-ldsodefs.h.diff.
+
+---
+
+<http://www.bddebian.com:8888/~hurd-web/toolchain/elfosabi_gnu/>
+
+---
+
+TODO.  Can unify GNU/Linux and GNU/Hurd files and put them into sysdeps/gnu/?
+TODO.  Correct some comment strings, s%Linux%GNU.
+
+ sysdeps/mach/hurd/i386/init-first.c    |    3 --
+ sysdeps/mach/hurd/ldsodefs.h           |   52 ++++++++++++++++++++++++++++++++
+ sysdeps/mach/hurd/powerpc/init-first.c |    3 --
+ sysdeps/unix/sysv/linux/ldsodefs.h     |    6 ++--
+ 4 files changed, 55 insertions(+), 9 deletions(-)
+
+diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
+index 60823bd..a55d8c4 100644
+--- a/sysdeps/mach/hurd/i386/init-first.c
++++ b/sysdeps/mach/hurd/i386/init-first.c
+@@ -37,9 +37,6 @@ extern void __init_misc (int, char **, char **);
+ #ifdef USE_NONOPTION_FLAGS
+ extern void __getopt_clean_environment (char **);
+ #endif
+-#ifndef SHARED
+-extern void _dl_non_dynamic_init (void) internal_function;
+-#endif
+ extern void __libc_global_ctors (void);
+ 
+ unsigned int __hurd_threadvar_max;
+diff --git a/sysdeps/mach/hurd/ldsodefs.h b/sysdeps/mach/hurd/ldsodefs.h
+new file mode 100644
+index 0000000..1f6d64f
+--- /dev/null
++++ b/sysdeps/mach/hurd/ldsodefs.h
+@@ -0,0 +1,52 @@
++/* Run-time dynamic linker data structures for loaded ELF shared objects.
++   Copyright (C) 2001, 2002, 2003, 2006, 2009, 2010, 2011 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; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef	_LDSODEFS_H
++
++#include <libc-abis.h>
++
++/* Get the real definitions.  */
++#include_next <ldsodefs.h>
++
++/* Now define our stuff.  */
++
++/* Initialization which is normally done by the dynamic linker.  */
++extern void _dl_non_dynamic_init (void) internal_function;
++
++/* Accept binaries which identify the binary as using Linux extensions.  */
++#define VALID_ELF_HEADER(hdr,exp,size)	(memcmp (hdr, exp, size) == 0	\
++					 || memcmp (hdr, expected2, size) == 0)
++#define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_SYSV \
++					 || osabi == ELFOSABI_GNU)
++#define VALID_ELF_ABIVERSION(osabi,ver) \
++  (ver == 0 || (osabi == ELFOSABI_GNU && ver < LIBC_ABI_MAX))
++#define MORE_ELF_HEADER_DATA \
++  static const unsigned char expected2[EI_PAD] =	\
++  {							\
++    [EI_MAG0] = ELFMAG0,				\
++    [EI_MAG1] = ELFMAG1,				\
++    [EI_MAG2] = ELFMAG2,				\
++    [EI_MAG3] = ELFMAG3,				\
++    [EI_CLASS] = ELFW(CLASS),				\
++    [EI_DATA] = byteorder,				\
++    [EI_VERSION] = EV_CURRENT,				\
++    [EI_OSABI] = ELFOSABI_GNU				\
++  }
++
++#endif /* ldsodefs.h */
+diff --git a/sysdeps/mach/hurd/powerpc/init-first.c b/sysdeps/mach/hurd/powerpc/init-first.c
+index 21b5054..2047cac 100644
+--- a/sysdeps/mach/hurd/powerpc/init-first.c
++++ b/sysdeps/mach/hurd/powerpc/init-first.c
+@@ -32,9 +32,6 @@ extern void __init_misc (int, char **, char **);
+ #ifdef USE_NONOPTION_FLAGS
+ extern void __getopt_clean_environment (char **);
+ #endif
+-#ifndef SHARED
+-extern void _dl_non_dynamic_init (void) internal_function;
+-#endif
+ extern void __libc_global_ctors (void);
+ 
+ unsigned int __hurd_threadvar_max;
+diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h
+index 5d5b1b4..cf20217 100644
+--- a/sysdeps/unix/sysv/linux/ldsodefs.h
++++ b/sysdeps/unix/sysv/linux/ldsodefs.h
+@@ -58,9 +58,9 @@ extern void _dl_non_dynamic_init (void) internal_function;
+ #define VALID_ELF_HEADER(hdr,exp,size)	(memcmp (hdr, exp, size) == 0	\
+ 					 || memcmp (hdr, expected2, size) == 0)
+ #define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_SYSV \
+-					 || osabi == ELFOSABI_LINUX)
++					 || osabi == ELFOSABI_GNU)
+ #define VALID_ELF_ABIVERSION(osabi,ver) \
+-  (ver == 0 || (osabi == ELFOSABI_LINUX && ver < LIBC_ABI_MAX))
++  (ver == 0 || (osabi == ELFOSABI_GNU && ver < LIBC_ABI_MAX))
+ #define MORE_ELF_HEADER_DATA \
+   static const unsigned char expected2[EI_PAD] =	\
+   {							\
+@@ -71,7 +71,7 @@ extern void _dl_non_dynamic_init (void) internal_function;
+     [EI_CLASS] = ELFW(CLASS),				\
+     [EI_DATA] = byteorder,				\
+     [EI_VERSION] = EV_CURRENT,				\
+-    [EI_OSABI] = ELFOSABI_LINUX				\
++    [EI_OSABI] = ELFOSABI_GNU				\
+   }
+ 
+ #endif /* ldsodefs.h */
+-- 
+tg: (0234227..) t/elfosabi_gnu (depends on: baseline)

Copied: glibc-package/trunk/debian/patches/hurd-i386/tg-libc_once.diff (from rev 5012, glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_once.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-libc_once.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-libc_once.diff	2011-10-28 23:51:54 UTC (rev 5014)
@@ -0,0 +1,106 @@
+From: Thomas Schwinge <thomas@schwinge.name>
+Subject: [PATCH] libc_once
+
+libc_once
+
+Needed for HEAD and glibc-2_7-branch.
+
+Patch originally by Thomas Schwinge.  Later rewritten by Debian's Aurelien
+Jarno because of upstream glibc code changes.
+
+Reported at <http://savannah.gnu.org/bugs/?18217> and
+<http://sourceware.org/bugzilla/show_bug.cgi?id=3748>, where it was rejected by
+Ulrich Drepper.  Roland promised to have a look.
+
+
+r2630 of debian/patches/hurd-i386/submitted-libc_once.diff.
+
+2006-12-18  Thomas Schwinge  <tschwinge@gnu.org>
+
+	* bits/libc-lock.h (__libc_once_else): New definiton.
+	* sysdeps/mach/bits/libc-lock.h: Likewise.
+	* sysdeps/mach/hurd/bits/libc-lock.h: Likewise.
+	* nptl/sysdeps/pthread/bits/libc-lock.h: Likewise.
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Use __libc_once_else and a
+	new local function instead of using implementational details.
+
+Date: 2007-10-28 19:40:34 +0000 (Sun, 28 Oct 2007)
+New Revision: 2630
+
+2007-10-28  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* bits/libc-lock.h (__libc_once_get): New definiton.
+	* linuxthreads/sysdeps/pthread/bits/libc-lock.h: Likewise
+	* nptl/sysdeps/pthread/bits/libc-lock.h: Likewise.
+	* sysdeps/mach/bits/libc-lock.h: Likewise.
+	* sysdeps/mach/hurd/bits/libc-lock.h: Likewise.
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Use __libc_once_get
+	  instead of using implementational details.
+
+glibc-2.8/debian/patches/hurd-i386/submitted-libc_once.diff 3151
+
+---
+ bits/libc-lock.h                              |    3 +++
+ nptl/sysdeps/pthread/bits/libc-lock.h         |    3 +++
+ sysdeps/mach/hurd/bits/libc-lock.h            |    4 ++++
+ sysdeps/posix/getaddrinfo.c                   |    2 +-
+ 4 files changed, 11 insertions(+), 1 deletions(-)
+
+diff --git a/bits/libc-lock.h b/bits/libc-lock.h
+index 3f9c211..a307f8c 100644
+--- a/bits/libc-lock.h
++++ b/bits/libc-lock.h
+@@ -98,6 +98,9 @@
+     }									      \
+   } while (0)
+ 
++/* Get once control variable.  */
++#define __libc_once_get(ONCE_CONTROL) \
++  ((ONCE_CONTROL) == 1)
+ 
+ /* Start a critical region with a cleanup function */
+ #define __libc_cleanup_region_start(DOIT, FCT, ARG)			    \
+diff --git a/nptl/sysdeps/pthread/bits/libc-lock.h b/nptl/sysdeps/pthread/bits/libc-lock.h
+index 0cad8aa..6e27427 100644
+--- a/nptl/sysdeps/pthread/bits/libc-lock.h
++++ b/nptl/sysdeps/pthread/bits/libc-lock.h
+@@ -377,6 +377,9 @@ typedef pthread_key_t __libc_key_t;
+     }									      \
+   } while (0)
+ 
++/* Get once control variable.  */
++#define __libc_once_get(ONCE_CONTROL) \
++  ((ONCE_CONTROL) != PTHREAD_ONCE_INIT)
+ 
+ /* Note that for I/O cleanup handling we are using the old-style
+    cancel handling.  It does not have to be integrated with C++ snce
+diff --git a/sysdeps/mach/hurd/bits/libc-lock.h b/sysdeps/mach/hurd/bits/libc-lock.h
+index 90e46e0..85336d6 100644
+--- a/sysdeps/mach/hurd/bits/libc-lock.h
++++ b/sysdeps/mach/hurd/bits/libc-lock.h
+@@ -188,6 +188,10 @@ struct __libc_once
+     __libc_lock_unlock (ONCE_CONTROL.lock);				      \
+   } while (0)
+ 
++/* Get once control variable.  */
++#define __libc_once_get(ONCE_CONTROL) \
++  (!ONCE_CONTROL.done)
++
+ #ifdef _LIBC
+ /* We need portable names for some functions.  E.g., when they are
+    used as argument to __libc_cleanup_region_start.  */
+diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
+index a5aafe9..00b3755 100644
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2604,7 +2604,7 @@ getaddrinfo (const char *name, const char *service,
+ 	  __libc_lock_define_initialized (static, lock);
+ 
+ 	  __libc_lock_lock (lock);
+-	  if (old_once && gaiconf_reload_flag)
++	  if (__libc_once_get(old_once) && gaiconf_reload_flag)
+ 	    gaiconf_reload ();
+ 	  qsort_r (order, nresults, sizeof (order[0]), rfc3484_sort, &src);
+ 	  __libc_lock_unlock (lock);
+-- 
+tg: (0234227..) t/libc_once (depends on: baseline)

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2011-10-28 23:48:19 UTC (rev 5013)
+++ glibc-package/trunk/debian/patches/series	2011-10-28 23:51:54 UTC (rev 5014)
@@ -105,7 +105,7 @@
 hurd-i386/unsubmitted-gcc-4.1-init-first.diff
 hurd-i386/submitted-posix_opt.h.diff
 hurd-i386/submitted-ioctl-decode-argument.diff
-hurd-i386/submitted-libc_once.diff
+hurd-i386/tg-libc_once.diff
 hurd-i386/tg-ptrmangle.diff
 hurd-i386/tg-struct_stat.diff
 hurd-i386/tg-strtoul_PLT.diff
@@ -146,7 +146,7 @@
 hurd-i386/unsubmitted-pthread_posix-option.diff
 hurd-i386/local-madvise_warn.diff
 hurd-i386/cvs-ldsodefs.h.diff
-hurd-i386/submitted-ldsodefs.h.diff
+hurd-i386/tg-elfosabi_gnu.diff
 hurd-i386/submitted-init-first.diff
 hurd-i386/submitted-hurdsig-fixes.diff
 hurd-i386/submitted-hurdsig-global-dispositions.diff


Reply to: