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

r6147 - in glibc-package/branches/glibc-2.19/debian/patches: any hurd-i386



Author: aurel32
Date: 2014-06-11 21:38:12 +0000 (Wed, 11 Jun 2014)
New Revision: 6147

Added:
   glibc-package/branches/glibc-2.19/debian/patches/any/cvs-resolv-reuse-fd.diff
   glibc-package/branches/glibc-2.19/debian/patches/any/submitted-argp-attribute.diff
   glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-gai_misc.diff
   glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-posix_thread.diff
Log:
Add missing files from previous commits


Added: glibc-package/branches/glibc-2.19/debian/patches/any/cvs-resolv-reuse-fd.diff
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/any/cvs-resolv-reuse-fd.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.19/debian/patches/any/cvs-resolv-reuse-fd.diff	2014-06-11 21:38:12 UTC (rev 6147)
@@ -0,0 +1,16 @@
+2014-06-03  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #15946]
+	* resolv/res_send.c (send_dg): Reload file descriptor after
+	calling reopen.
+
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -1410,6 +1410,7 @@ send_dg(res_state statp,
+ 					retval = reopen (statp, terrno, ns);
+ 					if (retval <= 0)
+ 						return retval;
++					pfd[0].fd = EXT(statp).nssocks[ns];
+ 				}
+ 			}
+ 			goto wait;

Added: glibc-package/branches/glibc-2.19/debian/patches/any/submitted-argp-attribute.diff
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/any/submitted-argp-attribute.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.19/debian/patches/any/submitted-argp-attribute.diff	2014-06-11 21:38:12 UTC (rev 6147)
@@ -0,0 +1,111 @@
+2014-06-03  Ondřej Bílka  <neleai@seznam.cz>
+
+	* argp/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Define.
+	(argp_error, argp_failure): Use _GL_ATTRIBUTE_FORMAT.
+	* argp/argp.h (__argp_fmtstream_printf): Likewise.
+
+diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h
+index 1ed2834..fc07d91 100644
+--- a/argp/argp-fmtstream.h
++++ b/argp/argp-fmtstream.h
+@@ -29,17 +29,16 @@
+ #include <string.h>
+ #include <unistd.h>
+ 
+-#ifndef __attribute__
+-/* This feature is available in gcc versions 2.5 and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+-#  define __attribute__(Spec) /* empty */
+-# endif
+-/* The __-protected variants of `format' and `printf' attributes
+-   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || __STRICT_ANSI__
+-#  define __format__ format
+-#  define __printf__ printf
+-# endif
++/* The __attribute__ feature is available in gcc versions 2.5 and later.
++   The __-protected variants of the attributes 'format' and 'printf' are
++   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
++   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
++   gnulib and libintl do '#define printf __printf__' when they override
++   the 'printf' function.  */
++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
++# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
++#else
++# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+ #endif
+ 
+ #if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)
+@@ -130,10 +127,10 @@ extern void argp_fmtstream_free (argp_fmtstream_t __fs);
+ 
+ extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
+ 					const char *__fmt, ...)
+-     __attribute__ ((__format__ (printf, 2, 3)));
++     _GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
+ extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
+ 				      const char *__fmt, ...)
+-     __attribute__ ((__format__ (printf, 2, 3)));
++     _GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
+ 
+ extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+ extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+diff --git a/argp/argp.h b/argp/argp.h
+index 0868228..6a1cc1b 100644
+--- a/argp/argp.h
++++ b/argp/argp.h
+@@ -35,17 +35,16 @@
+ # define __NTH(fct) fct __THROW
+ #endif
+ 
+-#ifndef __attribute__
+-/* This feature is available in gcc versions 2.5 and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+-#  define __attribute__(Spec) /* empty */
+-# endif
+-/* The __-protected variants of `format' and `printf' attributes
+-   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || __STRICT_ANSI__
+-#  define __format__ format
+-#  define __printf__ printf
+-# endif
++/* The __attribute__ feature is available in gcc versions 2.5 and later.
++   The __-protected variants of the attributes 'format' and 'printf' are
++   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
++   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
++   gnulib and libintl do '#define printf __printf__' when they override
++   the 'printf' function.  */
++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
++# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
++#else
++# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+ #endif
+ 
+ /* GCC 2.95 and later have "__restrict"; C99 compilers have
+@@ -503,10 +500,10 @@ extern void __argp_usage (const struct argp_state *__state);
+    message, then exit (1).  */
+ extern void argp_error (const struct argp_state *__restrict __state,
+ 			const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 2, 3)));
++     _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
+ extern void __argp_error (const struct argp_state *__restrict __state,
+ 			  const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 2, 3)));
++    _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
+ 
+ /* Similar to the standard gnu error-reporting function error(), but will
+    respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
+@@ -519,11 +516,11 @@ extern void __argp_error (const struct argp_state *__restrict __state,
+ extern void argp_failure (const struct argp_state *__restrict __state,
+ 			  int __status, int __errnum,
+ 			  const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 4, 5)));
++     _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
+ extern void __argp_failure (const struct argp_state *__restrict __state,
+ 			    int __status, int __errnum,
+ 			    const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 4, 5)));
++     _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
+ 
+ /* Returns true if the option OPT is a valid short option.  */
+ extern int _option_is_short (const struct argp_option *__opt) __THROW;
+

Added: glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-gai_misc.diff
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-gai_misc.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-gai_misc.diff	2014-06-11 21:38:12 UTC (rev 6147)
@@ -0,0 +1,63 @@
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Subject: [PATCH] t/gai_misc
+
+Add a hurd version of threaded gai_misc.h
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+---
+ sysdeps/mach/hurd/gai_misc.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 44 insertions(+)
+
+diff --git a/sysdeps/mach/hurd/gai_misc.h b/sysdeps/mach/hurd/gai_misc.h
+new file mode 100644
+index 0000000..ee8117f
+--- /dev/null
++++ b/sysdeps/mach/hurd/gai_misc.h
+@@ -0,0 +1,44 @@
++#include <signal.h>
++#include <pthread.h>
++
++#define gai_start_notify_thread __gai_start_notify_thread
++#define gai_create_helper_thread __gai_create_helper_thread
++
++extern inline void
++__gai_start_notify_thread (void)
++{
++  sigset_t ss;
++  sigemptyset (&ss);
++  sigprocmask(SIG_SETMASK, &ss, NULL);
++}
++
++extern inline int
++__gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
++			    void *arg)
++{
++  pthread_attr_t attr;
++
++  /* Make sure the thread is created detached.  */
++  pthread_attr_init (&attr);
++  pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
++
++  /* The helper thread needs only very little resources.  */
++  (void) pthread_attr_setstacksize (&attr, 0x10000);
++
++  /* Block all signals in the helper thread.  To do this thoroughly we
++     temporarily have to block all signals here.  */
++  sigset_t ss;
++  sigset_t oss;
++  sigfillset (&ss);
++  sigprocmask(SIG_SETMASK, &ss, &oss);
++
++  int ret = pthread_create (threadp, &attr, tf, arg);
++
++  /* Restore the signal mask.  */
++  sigprocmask(SIG_SETMASK, &oss, NULL);
++
++  (void) pthread_attr_destroy (&attr);
++  return ret;
++}
++
++#include_next <gai_misc.h>
+-- 
+tg: (9a079e2..) t/gai_misc (depends on: baseline)

Added: glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-posix_thread.diff
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-posix_thread.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.19/debian/patches/hurd-i386/tg-posix_thread.diff	2014-06-11 21:38:12 UTC (rev 6147)
@@ -0,0 +1,111 @@
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Subject: [PATCH] t/posix_thread
+
+Declare that we have a libpthread.
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+---
+ sysdeps/mach/hurd/Makefile         |  4 ++++
+ sysdeps/mach/hurd/bits/posix_opt.h | 40 +++++++++++++++++++++++++-------------
+ 2 files changed, 31 insertions(+), 13 deletions(-)
+
+diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
+index 68aedb6..4a6ee36 100644
+--- a/sysdeps/mach/hurd/Makefile
++++ b/sysdeps/mach/hurd/Makefile
+@@ -167,6 +167,10 @@ $(objpfx)librtld.map: $(rpcuserlibs:.so=_pic.a)
+ CFLAGS-dl-load.c = -DEXTERNAL_MAP_FROM_FD
+ endif
+ 
++ifeq ($(subdir),posix)
++CFLAGS-confstr.c += -DLIBPTHREAD_VERSION='"libpthread 0.3"'
++endif
++
+ # Override the generic Makeconfig values so we link against the RPC libs.
+ link-libc-static := -Wl,--start-group \
+ 		    $(patsubst %,$(common-objpfx)%.a,\
+diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
+index 940e376..24ef55c 100644
+--- a/sysdeps/mach/hurd/bits/posix_opt.h
++++ b/sysdeps/mach/hurd/bits/posix_opt.h
+@@ -71,24 +71,38 @@
+ /* XPG4.2 shared memory is supported.  */
+ #define _XOPEN_SHM      1
+ 
+-/* We do not have the POSIX threads interface.  */
+-#define _POSIX_THREADS	-1
++/* Tell we have POSIX threads.  */
++#define _POSIX_THREADS	200112L
+ 
+ /* We have the reentrant functions described in POSIX.  */
+ #define _POSIX_REENTRANT_FUNCTIONS      1
+ #define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
+ 
+-/* These are all things that won't be supported when _POSIX_THREADS is not.  */
++/* We do not provide priority scheduling for threads.  */
+ #define _POSIX_THREAD_PRIORITY_SCHEDULING	-1
+-#define _POSIX_THREAD_ATTR_STACKSIZE		-1
+-#define _POSIX_THREAD_ATTR_STACKADDR		-1
++
++/* We support user-defined stack sizes.  */
++#define _POSIX_THREAD_ATTR_STACKSIZE	200112L
++
++/* We support user-defined stacks.  */
++#define _POSIX_THREAD_ATTR_STACKADDR	200112L
++
++/* We do not support priority inheritence.  */
+ #define _POSIX_THREAD_PRIO_INHERIT		-1
++
++/* We do not support priority protection.  */
+ #define _POSIX_THREAD_PRIO_PROTECT		-1
++
+ #ifdef __USE_XOPEN2K8
++/* We do not support priority inheritence for robust mutexes.  */
+ # define _POSIX_THREAD_ROBUST_PRIO_INHERIT	-1
++
++/* We do not support priority protection for robust mutexes.  */
+ # define _POSIX_THREAD_ROBUST_PRIO_PROTECT	-1
+ #endif
+-#define _POSIX_SEMAPHORES			-1
++
++/* We support POSIX.1b semaphores.  */
++#define _POSIX_SEMAPHORES			200112L
+ 
+ /* Real-time signals are not yet supported.  */
+ #define _POSIX_REALTIME_SIGNALS	-1
+@@ -121,17 +135,17 @@
+ /* GNU libc provides regular expression handling.  */
+ #define _POSIX_REGEXP	1
+ 
+-/* Reader/Writer locks are not available.  */
+-#define _POSIX_READER_WRITER_LOCKS	-1
++/* Reader/Writer locks are available.  */
++#define _POSIX_READER_WRITER_LOCKS	200112L
+ 
+ /* We have a POSIX shell.  */
+ #define _POSIX_SHELL	1
+ 
+-/* We cannot support the Timeouts option without _POSIX_THREADS.  */
+-#define _POSIX_TIMEOUTS	-1
++/* We support the Timeouts option.  */
++#define _POSIX_TIMEOUTS	200112L
+ 
+-/* We do not support spinlocks.  */
+-#define _POSIX_SPIN_LOCKS	-1
++/* We support spinlocks.  */
++#define _POSIX_SPIN_LOCKS	200112L
+ 
+ /* The `spawn' function family is supported.  */
+ #define _POSIX_SPAWN	200809L
+@@ -140,7 +154,7 @@
+ #define _POSIX_TIMERS	0
+ 
+ /* The barrier functions are not available.  */
+-#define _POSIX_BARRIERS	-1
++#define _POSIX_BARRIERS	200112L
+ 
+ /* POSIX message queues could be available in future.  */
+ #define	_POSIX_MESSAGE_PASSING	0
+-- 
+tg: (9a079e2..) t/posix_thread (depends on: baseline)


Reply to: