r5249 - in glibc-package/trunk/debian: . patches patches/hurd-i386
Author: sthibault
Date: 2012-05-12 11:24:43 +0000 (Sat, 12 May 2012)
New Revision: 5249
Added:
glibc-package/trunk/debian/patches/hurd-i386/cvs-IPV6_PKTINFO.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-O_CLOEXEC.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-SOL_IP.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-____longjmp_chk.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-catch-signal.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-critical-sections.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-dl-sysdep.c_SHARED.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3-lock.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd-recvfrom.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd_socket_server_indexcheck.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-ioctl-decode-argument.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-itimer-lock.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-libc_stack_end.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-mach-nanosleep.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-mkdir_root.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-mlock.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-null-pathname.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-posix2008.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-posix_opt.h.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-readlinkat.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-sbrk.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-select-inputcheck.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-setresid.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-strtoul_PLT.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-struct_stat.diff
Removed:
glibc-package/trunk/debian/patches/hurd-i386/tg-IPV6_PKTINFO.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-SOL_IP.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-____longjmp_chk.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-catch-signal.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-critical-sections.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-dl-sysdep.c_SHARED.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-dup3-lock.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-dup3.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-hurd-recvfrom.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-hurd_socket_server_indexcheck.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-ioctl-decode-argument.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-itimer-lock.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-libc_stack_end.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-mach-nanosleep.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-mkdir_root.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-mlock.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-null-pathname.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-posix2008.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-posix_opt.h.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-readlinkat.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-sbrk.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-select-inputcheck.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-setresid.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-strtoul_PLT.diff
glibc-package/trunk/debian/patches/hurd-i386/tg-struct_stat.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/hurd-i386/local-select.diff
glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-pthread_posix-option.diff
glibc-package/trunk/debian/patches/series
Log:
* patches/hurd-i386/tg-{IPV6_PKTINFO,SOL_IP,____longjmp_chk,catch-signal,
critical-sections,dl-sysdep.c_SHARED,dup3,ioctl-decode-argument,
itimer-lock,libc_stack_end,mach-nanosleep,mkdir_root,mlock,null-pathname,
posix2008,posix_opt.h,readlinkat,hurd-recvfrom,sbrk,select-inputcheck,
setresid,hurd_socket_server_indexcheck,strtoul_PLT,struct_stat,
dup3-lock}.diff: Refresh with upstream version and rename to cvs.
* patches/hurd-i386/cvs-O_CLOEXEC.diff: New patch to accept use of O_CLOEXEC
in rtld.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/changelog 2012-05-12 11:24:43 UTC (rev 5249)
@@ -4,6 +4,16 @@
* patches/localedata/cvs-rupeesign.diff: use new rupee symbol
in Indian locales, thanks to Prema. closes: #671299.
+ [ Samuel Thibault ]
+ * patches/hurd-i386/tg-{IPV6_PKTINFO,SOL_IP,____longjmp_chk,catch-signal,
+ critical-sections,dl-sysdep.c_SHARED,dup3,ioctl-decode-argument,
+ itimer-lock,libc_stack_end,mach-nanosleep,mkdir_root,mlock,null-pathname,
+ posix2008,posix_opt.h,readlinkat,hurd-recvfrom,sbrk,select-inputcheck,
+ setresid,hurd_socket_server_indexcheck,strtoul_PLT,struct_stat,
+ dup3-lock}.diff: Refresh with upstream version and rename to cvs.
+ * patches/hurd-i386/cvs-O_CLOEXEC.diff: New patch to accept use of O_CLOEXEC
+ in rtld.
+
-- Clint Adams <clint@debian.org> Fri, 04 May 2012 23:39:00 -0400
eglibc (2.13-32) unstable; urgency=medium
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-IPV6_PKTINFO.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-IPV6_PKTINFO.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-IPV6_PKTINFO.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-IPV6_PKTINFO.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,37 @@
+commit bcfe3a546e831ff3e43a8782f65a95fab7bb864d
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 12:37:15 2012 -0700
+
+ Hurd: Add more ipv6 macros.
+
+diff --git a/bits/in.h b/bits/in.h
+index 85f747e..bb14b02 100644
+--- a/bits/in.h
++++ b/bits/in.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1997, 2000, 2004, 2007 Free Software Foundation, Inc.
++/* Copyright (C) 1997-2012 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
+@@ -49,7 +49,7 @@ struct ip_opts
+
+ /* IPV6 socket options. */
+ #define IPV6_ADDRFORM 1
+-#define IPV6_RXINFO 2
++#define IPV6_PKTINFO 2
+ #define IPV6_HOPOPTS 3
+ #define IPV6_DSTOPTS 4
+ #define IPV6_RTHDR 5
+@@ -57,8 +57,9 @@ struct ip_opts
+ #define IPV6_CHECKSUM 7
+ #define IPV6_HOPLIMIT 8
+
+-#define IPV6_TXINFO IPV6_RXINFO
+-#define SCM_SRCINFO IPV6_TXINFO
++#define IPV6_RXINFO IPV6_PKTINFO
++#define IPV6_TXINFO IPV6_PKTINFO
++#define SCM_SRCINFO IPV6_PKTINFO
+ #define SCM_SRCRT IPV6_RXSRCRT
+
+ #define IPV6_UNICAST_HOPS 16
Added: glibc-package/trunk/debian/patches/hurd-i386/cvs-O_CLOEXEC.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-O_CLOEXEC.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-O_CLOEXEC.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,87 @@
+commit 6f080c2fcffac1bb8626b8d143dba57a37abb071
+Author: Thomas Schwinge <thomas@schwinge.name>
+Date: Thu May 10 12:43:01 2012 -0700
+
+ Hurd: O_CLOEXEC in rtld
+
+diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
+index 5f3ee6a..5044f97 100644
+--- a/hurd/hurd/fd.h
++++ b/hurd/hurd/fd.h
+@@ -1,6 +1,5 @@
+ /* File descriptors.
+- Copyright (C) 1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2006,2007
+- Free Software Foundation, Inc.
++ Copyright (C) 1993-2012 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
+@@ -199,7 +198,8 @@ extern void _hurd_port2fd (struct hurd_fd *fd, io_t port, int flags);
+
+ /* Allocate a new file descriptor and install PORT in it (doing any
+ appropriate ctty magic); consumes a user reference on PORT. FLAGS are
+- as for `open'; only O_IGNORE_CTTY is meaningful, but all are saved.
++ as for `open'; only O_IGNORE_CTTY and O_CLOEXEC are meaningful, but all are
++ saved.
+
+ If the descriptor table is full, set errno, and return -1.
+ If DEALLOC is nonzero, deallocate PORT first. */
+diff --git a/hurd/intern-fd.c b/hurd/intern-fd.c
+index 52e0606..ac89173 100644
+--- a/hurd/intern-fd.c
++++ b/hurd/intern-fd.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
++/* Copyright (C) 1994-2012 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
+@@ -19,7 +19,7 @@
+ #include <hurd/fd.h>
+
+ /* Allocate a new file descriptor and install PORT in it. FLAGS are as for
+- `open'; only O_IGNORE_CTTY is meaningful.
++ `open'; only O_IGNORE_CTTY and O_CLOEXEC are meaningful.
+
+ If the descriptor table is full, set errno, and return -1.
+ If DEALLOC is nonzero, deallocate PORT first. */
+diff --git a/hurd/port2fd.c b/hurd/port2fd.c
+index bef07ad..451d630 100644
+--- a/hurd/port2fd.c
++++ b/hurd/port2fd.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1994, 1997, 1999, 2007 Free Software Foundation, Inc.
++/* Copyright (C) 1994-2012 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
+@@ -22,7 +22,7 @@
+ #include <fcntl.h>
+
+ /* Store PORT in file descriptor D, doing appropriate ctty magic.
+- FLAGS are as for `open'; only O_IGNORE_CTTY is meaningful.
++ FLAGS are as for `open'; only O_IGNORE_CTTY and O_CLOEXEC are meaningful.
+ D should be locked, and will not be unlocked. */
+
+ void
+diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
+index d928cd2..26a212e 100644
+--- a/sysdeps/mach/hurd/dl-sysdep.c
++++ b/sysdeps/mach/hurd/dl-sysdep.c
+@@ -1,6 +1,5 @@
+ /* Operating system support for run-time dynamic linker. Hurd version.
+- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2010
+- Free Software Foundation, Inc.
++ Copyright (C) 1995-2012 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
+@@ -315,7 +314,7 @@ open_file (const char *file_name, int flags,
+ return MACH_PORT_NULL;
+ }
+
+- assert (!(flags & ~O_READ));
++ assert (!(flags & ~(O_READ | O_CLOEXEC)));
+
+ startdir = _dl_hurd_data->portarray[file_name[0] == '/' ?
+ INIT_PORT_CRDIR : INIT_PORT_CWDIR];
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-SOL_IP.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-SOL_IP.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-SOL_IP.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-SOL_IP.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,31 @@
+commit 6178c55bdbb1e434b594e5f8563b6948f8f3edc0
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 12:47:00 2012 -0700
+
+ Hurd: Add SOL_IP, SOL_IPV6, SOL_ICMPV6
+
+diff --git a/bits/in.h b/bits/in.h
+index bb14b02..db93057 100644
+--- a/bits/in.h
++++ b/bits/in.h
+@@ -21,6 +21,9 @@
+ # error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
+ #endif
+
++/* To select the IP level. */
++#define SOL_IP 0
++
+ /* Options for use with `getsockopt' and `setsockopt' at the IP level.
+ The first word in the comment at the right is the data type used;
+ "bool" means a boolean value stored in an `int'. */
+@@ -47,6 +50,10 @@ struct ip_opts
+ char ip_opts[40]; /* Actually variable in size. */
+ };
+
++/* Socket-level values for IPv6. */
++#define SOL_IPV6 41
++#define SOL_ICMPV6 58
++
+ /* IPV6 socket options. */
+ #define IPV6_ADDRFORM 1
+ #define IPV6_PKTINFO 2
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-____longjmp_chk.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-____longjmp_chk.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-____longjmp_chk.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-____longjmp_chk.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,147 @@
+commit bcf5524012216fee3a7668a3b43aad3243a083b0
+Author: Thomas Schwinge <thomas@schwinge.name>
+Date: Thu May 10 12:47:31 2012 -0700
+
+ Hurd: ____longjmp_chk
+
+diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile
+index 0eef17e..5f98809 100644
+--- a/sysdeps/mach/hurd/i386/Makefile
++++ b/sysdeps/mach/hurd/i386/Makefile
+@@ -2,3 +2,7 @@ ifeq ($(subdir),misc)
+ sysdep_routines += ioperm
+ sysdep_headers += sys/io.h
+ endif
++
++ifeq ($(subdir),debug)
++gen-as-const-headers += signal-defines.sym
++endif
+diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S
+new file mode 100644
+index 0000000..f499fbd
+--- /dev/null
++++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S
+@@ -0,0 +1,107 @@
++/* Copyright (C) 2001-2012 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, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <sysdep.h>
++#include <jmpbuf-offsets.h>
++#include <asm-syntax.h>
++
++#include <signal-defines.h>
++/* #include <signal.h> */
++#define SS_ONSTACK 1
++
++
++ .section .rodata.str1.1,"aMS",@progbits,1
++ .type longjmp_msg,@object
++longjmp_msg:
++ .string "longjmp causes uninitialized stack frame"
++ .size longjmp_msg, .-longjmp_msg
++
++
++#ifdef PIC
++# define CALL_FAIL movl %ebx, %ecx; /* TODO: what's this mov good for? */ \
++ cfi_register(%ebx,%ecx); \
++ LOAD_PIC_REG (bx); \
++ leal longjmp_msg@GOTOFF(%ebx), %eax; \
++ call HIDDEN_JUMPTARGET(__fortify_fail)
++#else
++# define CALL_FAIL movl $longjmp_msg, %eax; \
++ call HIDDEN_JUMPTARGET(__fortify_fail)
++#endif
++
++
++ .text
++ENTRY (____longjmp_chk)
++ movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
++
++ /* Save the return address now. */
++ movl (JB_PC*4)(%ecx), %edx
++ /* Get the stack pointer. */
++ movl (JB_SP*4)(%ecx), %edi
++ cfi_undefined(%edi)
++ PTR_DEMANGLE (%edx)
++ PTR_DEMANGLE (%edi)
++
++ cmpl %edi, %esp
++ /* Jumping to a higher-address frame is always allowed. */
++ jbe .Lok
++
++ /* Passing here, we're either about to do something invalid, or we're
++ executing on an alternative signal stack. */
++
++ /* TODO: need locking? */
++ /* struct hurd_sigstate * _hurd_self_sigstate (void) */
++ call _hurd_self_sigstate
++ /* TODO: %eax and %eax->sigaltstack are always valid? */
++
++ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%eax)
++ /* Fail if SS_ONSTACK is not set. */
++ jz .Lfail
++
++ movl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%eax), %ebx
++ addl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%eax), %ebx
++ subl %edi, %ebx
++ cmpl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%eax), %ebx
++ /* TODO: comment this calculation. */
++ jae .Lok
++
++.Lfail: CALL_FAIL
++
++.Lok: /* We add unwind information for the target here. */
++ cfi_def_cfa(%ecx, 0)
++ cfi_register(%eip, %edx)
++ cfi_register(%esp, %edi)
++ cfi_offset(%ebx, JB_BX*4)
++ cfi_offset(%esi, JB_SI*4)
++ cfi_offset(%edi, JB_DI*4)
++ cfi_offset(%ebp, JB_BP*4)
++
++ movl 8(%esp), %eax /* Second argument is return value. */
++ movl %edi, %esp
++
++ /* Restore registers. */
++ movl (JB_BX*4)(%ecx), %ebx
++ movl (JB_SI*4)(%ecx), %esi
++ movl (JB_DI*4)(%ecx), %edi
++ movl (JB_BP*4)(%ecx), %ebp
++ cfi_restore(%ebx)
++ cfi_restore(%esi)
++ cfi_restore(%edi)
++ cfi_restore(%ebp)
++
++ /* Jump to saved PC. */
++ jmp *%edx
++END (____longjmp_chk)
+diff --git a/sysdeps/mach/hurd/i386/signal-defines.sym b/sysdeps/mach/hurd/i386/signal-defines.sym
+new file mode 100644
+index 0000000..9521bd7
+--- /dev/null
++++ b/sysdeps/mach/hurd/i386/signal-defines.sym
+@@ -0,0 +1,10 @@
++#include <hurd/signal.h>
++#include <signal.h>
++
++--
++
++HURD_SIGSTATE__SIGALTSTACK__OFFSET offsetof(struct hurd_sigstate, sigaltstack)
++
++SIGALTSTACK__SS_SP__OFFSET offsetof(struct sigaltstack, ss_sp)
++SIGALTSTACK__SS_SIZE__OFFSET offsetof(struct sigaltstack, ss_size)
++SIGALTSTACK__SS_FLAGS__OFFSET offsetof(struct sigaltstack, ss_flags)
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-catch-signal.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-catch-signal.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-catch-signal.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-catch-signal.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,47 @@
+commit ecd0de9a955fd14e825a666ea6785842e1579326
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 12:59:00 2012 -0700
+
+ Hurd: Fix signal-catching functions.
+
+diff --git a/hurd/catch-signal.c b/hurd/catch-signal.c
+index 50cd366..3f946e1 100644
+--- a/hurd/catch-signal.c
++++ b/hurd/catch-signal.c
+@@ -1,5 +1,5 @@
+ /* Convenience function to catch expected signals during an operation.
+- Copyright (C) 1996 Free Software Foundation, Inc.
++ Copyright (C) 1996-2012 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
+@@ -27,9 +27,12 @@ hurd_catch_signal (sigset_t sigset,
+ error_t (*operate) (struct hurd_signal_preemptor *),
+ sighandler_t handler)
+ {
+- jmp_buf buf;
++ /* We need to restore the signal mask, because otherwise the
++ signal-handling code will have blocked the caught signal and for
++ instance calling hurd_catch_signal again would then dump core. */
++ sigjmp_buf buf;
+ void throw (int signo, long int sigcode, struct sigcontext *scp)
+- { longjmp (buf, scp->sc_error ?: EGRATUITOUS); }
++ { siglongjmp (buf, scp->sc_error ?: EGRATUITOUS); }
+
+ struct hurd_signal_preemptor preemptor =
+ {
+@@ -40,12 +43,12 @@ hurd_catch_signal (sigset_t sigset,
+ struct hurd_sigstate *const ss = _hurd_self_sigstate ();
+ error_t error;
+
+- if (handler == SIG_ERR)
++ if (handler != SIG_ERR)
+ /* Not our handler; don't bother saving state. */
+ error = 0;
+ else
+ /* This returns again with nonzero value when we preempt a signal. */
+- error = setjmp (buf);
++ error = sigsetjmp (buf, 1);
+
+ if (error == 0)
+ {
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-critical-sections.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-critical-sections.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-critical-sections.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-critical-sections.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,77 @@
+commit 802ca5a5efa5d11836b2ffd81c9f6fd42f938ac6
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 13:00:01 2012 -0700
+
+ Hurd: Missing critical region locks.
+
+diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
+index 5044f97..6a79738 100644
+--- a/hurd/hurd/fd.h
++++ b/hurd/hurd/fd.h
+@@ -63,6 +63,7 @@ _hurd_fd_get (int fd)
+ {
+ struct hurd_fd *descriptor;
+
++ HURD_CRITICAL_BEGIN;
+ __mutex_lock (&_hurd_dtable_lock);
+ if (fd < 0 || fd >= _hurd_dtablesize)
+ descriptor = NULL;
+@@ -85,6 +86,7 @@ _hurd_fd_get (int fd)
+ }
+ }
+ __mutex_unlock (&_hurd_dtable_lock);
++ HURD_CRITICAL_END;
+
+ return descriptor;
+ }
+diff --git a/sysdeps/mach/hurd/dirfd.c b/sysdeps/mach/hurd/dirfd.c
+index 587ae7b..42dbc78 100644
+--- a/sysdeps/mach/hurd/dirfd.c
++++ b/sysdeps/mach/hurd/dirfd.c
+@@ -1,5 +1,5 @@
+ /* dirfd -- Return the file descriptor used by a DIR stream. Hurd version.
+- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
++ Copyright (C) 1995-2012 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
+@@ -25,6 +25,8 @@ int
+ dirfd (DIR *dirp)
+ {
+ int fd;
++
++ HURD_CRITICAL_BEGIN;
+ __mutex_lock (&_hurd_dtable_lock);
+ for (fd = 0; fd < _hurd_dtablesize; ++fd)
+ if (_hurd_dtable[fd] == dirp->__fd)
+@@ -35,6 +37,7 @@ dirfd (DIR *dirp)
+ fd = -1;
+ }
+ __mutex_unlock (&_hurd_dtable_lock);
++ HURD_CRITICAL_END;
+
+ return fd;
+ }
+diff --git a/sysdeps/mach/hurd/opendir.c b/sysdeps/mach/hurd/opendir.c
+index 217d4c8..c71cb18 100644
+--- a/sysdeps/mach/hurd/opendir.c
++++ b/sysdeps/mach/hurd/opendir.c
+@@ -1,5 +1,4 @@
+-/* Copyright (C) 1993,1994,1995,1996,1997,1998,2001,2003,2005,2006
+- Free Software Foundation, Inc.
++/* Copyright (C) 1993-2012 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
+@@ -50,9 +49,11 @@ _hurd_fd_opendir (struct hurd_fd *d)
+ return NULL;
+
+ /* Set the descriptor to close on exec. */
++ HURD_CRITICAL_BEGIN;
+ __spin_lock (&d->port.lock);
+ d->flags |= FD_CLOEXEC;
+ __spin_unlock (&d->port.lock);
++ HURD_CRITICAL_END;
+
+ dirp->__fd = d;
+ dirp->__data = dirp->__ptr = NULL;
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-dl-sysdep.c_SHARED.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-dl-sysdep.c_SHARED.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-dl-sysdep.c_SHARED.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-dl-sysdep.c_SHARED.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,27 @@
+commit cd9fa98583b51812e906f1e85cc6e370bb4aff87
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 13:10:21 2012 -0700
+
+ Hurd: Hurd: dl-sysdep.c: Include code only #ifdef SHARED.
+
+diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
+index 26a212e..13b0010 100644
+--- a/sysdeps/mach/hurd/dl-sysdep.c
++++ b/sysdeps/mach/hurd/dl-sysdep.c
+@@ -16,6 +16,10 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++/* In the static library, this is all handled by dl-support.c
++ or by the vanilla definitions in the rest of the C library. */
++#ifdef SHARED
++
+ #include <hurd.h>
+ #include <link.h>
+ #include <unistd.h>
+@@ -667,3 +671,5 @@ _dl_init_first (int argc, ...)
+ {
+ /* This no-op definition only gets used if libc is not linked in. */
+ }
++
++#endif /* SHARED */
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3-lock.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-dup3-lock.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3-lock.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3-lock.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,44 @@
+commit f34d6f840eaba45a82fa8d20922fc2d678968fb7
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:49:30 2012 -0700
+
+ Hurd: Fix __dup3 _hurd_dtable_lock usage.
+
+diff --git a/sysdeps/mach/hurd/dup3.c b/sysdeps/mach/hurd/dup3.c
+index 8a38caf..523ca42 100644
+--- a/sysdeps/mach/hurd/dup3.c
++++ b/sysdeps/mach/hurd/dup3.c
+@@ -71,15 +71,14 @@ __dup3 (int fd, int fd2, int flags)
+ /* Get a hold of the destination descriptor. */
+ struct hurd_fd *d2;
+
++ __mutex_lock (&_hurd_dtable_lock);
++
+ if (fd2 >= _hurd_dtablesize)
+ {
+ /* The table is not large enough to hold the destination
+ descriptor. Enlarge it as necessary to allocate this
+ descriptor. */
+ __mutex_unlock (&_hurd_dtable_lock);
+- /* We still hold FD1's lock, but this is safe because
+- _hurd_alloc_fd will only examine the cells starting
+- at FD2. */
+ d2 = _hurd_alloc_fd (NULL, fd2);
+ if (d2)
+ __spin_unlock (&d2->port.lock);
+@@ -99,6 +98,7 @@ __dup3 (int fd, int fd2, int flags)
+ MACH_PORT_NULL);
+ }
+ }
++ __mutex_unlock (&_hurd_dtable_lock);
+
+ if (d2 == NULL)
+ {
+@@ -126,7 +126,6 @@ __dup3 (int fd, int fd2, int flags)
+ _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */
+ }
+ }
+- __mutex_unlock (&_hurd_dtable_lock);
+
+ _hurd_port_free (&d->port, &ulink, port);
+ if (ctty != MACH_PORT_NULL)
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-dup3.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-dup3.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,321 @@
+commit 5aa3a74a59916b489e9cf7c4dce9eb149e106c6c
+Author: Thomas Schwinge <thomas@schwinge.name>
+Date: Thu May 10 13:15:40 2012 -0700
+
+ Hurd: dup3
+
+diff --git a/include/unistd.h b/include/unistd.h
+index 2e6101b..7971a8a 100644
+--- a/include/unistd.h
++++ b/include/unistd.h
+@@ -79,6 +79,8 @@ char *__canonicalize_directory_name_internal (const char *__thisdir,
+ extern int __dup (int __fd);
+ extern int __dup2 (int __fd, int __fd2);
+ libc_hidden_proto (__dup2)
++extern int __dup3 (int __fd, int __fd2, int flags);
++libc_hidden_proto (__dup3)
+ extern int __execve (__const char *__path, char *__const __argv[],
+ char *__const __envp[]);
+ extern long int __pathconf (__const char *__path, int __name);
+diff --git a/sysdeps/mach/hurd/dup2.c b/sysdeps/mach/hurd/dup2.c
+index d2329c9..b697a90 100644
+--- a/sysdeps/mach/hurd/dup2.c
++++ b/sysdeps/mach/hurd/dup2.c
+@@ -1,4 +1,5 @@
+-/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 Free Software Foundation, Inc.
++/* Copyright (C) 1991-2012 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
+@@ -15,119 +16,20 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+-#include <errno.h>
+-#include <fcntl.h>
+ #include <unistd.h>
+-#include <hurd.h>
+-#include <hurd/fd.h>
+
+ /* Duplicate FD to FD2, closing the old FD2 and making FD2 be
+ open on the same file as FD is. Return FD2 or -1. */
+ int
+-__dup2 (fd, fd2)
+- int fd;
+- int fd2;
++__dup2 (int fd, int fd2)
+ {
+- struct hurd_fd *d;
+-
+- /* Extract the ports and flags from FD. */
+- d = _hurd_fd_get (fd);
+- if (d == NULL)
+- {
+- errno = EBADF;
+- return -1;
+- }
+-
+- HURD_CRITICAL_BEGIN;
+-
+- __spin_lock (&d->port.lock);
+- if (d->port.port == MACH_PORT_NULL)
+- {
+- __spin_unlock (&d->port.lock);
+- errno = EBADF;
+- fd2 = -1;
+- }
+- else if (fd2 == fd)
+- /* FD is valid and FD2 is already the same; just return it. */
+- __spin_unlock (&d->port.lock);
+- else
+- {
+- struct hurd_userlink ulink, ctty_ulink;
+- int flags = d->flags;
+- io_t ctty = _hurd_port_get (&d->ctty, &ctty_ulink);
+- io_t port = _hurd_port_locked_get (&d->port, &ulink); /* Unlocks D. */
+-
+- if (fd2 < 0)
+- {
+- errno = EBADF;
+- fd2 = -1;
+- }
+- else
+- {
+- /* Get a hold of the destination descriptor. */
+- struct hurd_fd *d2;
+-
+- if (fd2 >= _hurd_dtablesize)
+- {
+- /* The table is not large enough to hold the destination
+- descriptor. Enlarge it as necessary to allocate this
+- descriptor. */
+- __mutex_unlock (&_hurd_dtable_lock);
+- /* We still hold FD1's lock, but this is safe because
+- _hurd_alloc_fd will only examine the cells starting
+- at FD2. */
+- d2 = _hurd_alloc_fd (NULL, fd2);
+- if (d2)
+- __spin_unlock (&d2->port.lock);
+- __mutex_lock (&_hurd_dtable_lock);
+- }
+- else
+- {
+- d2 = _hurd_dtable[fd2];
+- if (d2 == NULL)
+- {
+- /* Must allocate a new one. We don't initialize the port
+- cells with this call so that if it fails (out of
+- memory), we will not have already added user
+- references for the ports, which we would then have to
+- deallocate. */
+- d2 = _hurd_dtable[fd2] = _hurd_new_fd (MACH_PORT_NULL,
+- MACH_PORT_NULL);
+- }
+- }
+-
+- if (d2 == NULL)
+- {
+- fd2 = -1;
+- if (errno == EINVAL)
+- errno = EBADF; /* POSIX.1-1990 6.2.1.2 ll 54-55. */
+- }
+- else
+- {
+- /* Give the ports each a user ref for the new descriptor. */
+- __mach_port_mod_refs (__mach_task_self (), port,
+- MACH_PORT_RIGHT_SEND, 1);
+- if (ctty != MACH_PORT_NULL)
+- __mach_port_mod_refs (__mach_task_self (), ctty,
+- MACH_PORT_RIGHT_SEND, 1);
+-
+- /* Install the ports and flags in the new descriptor slot. */
+- __spin_lock (&d2->port.lock);
+- d2->flags = flags & ~FD_CLOEXEC; /* Dup clears FD_CLOEXEC. */
+- _hurd_port_set (&d2->ctty, ctty);
+- _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */
+- }
+- }
+- __mutex_unlock (&_hurd_dtable_lock);
+-
+- _hurd_port_free (&d->port, &ulink, port);
+- if (ctty != MACH_PORT_NULL)
+- _hurd_port_free (&d->ctty, &ctty_ulink, port);
+- }
++ int flags = 0;
+
+- HURD_CRITICAL_END;
++ if (fd2 == fd)
++ /* See the comment in dup3. */
++ flags = -1;
+
+- return fd2;
++ return __dup3 (fd, fd2, flags);
+ }
+ libc_hidden_def (__dup2)
+ weak_alias (__dup2, dup2)
+diff --git a/sysdeps/mach/hurd/dup3.c b/sysdeps/mach/hurd/dup3.c
+new file mode 100644
+index 0000000..8a38caf
+--- /dev/null
++++ b/sysdeps/mach/hurd/dup3.c
+@@ -0,0 +1,141 @@
++/* Duplicate a file descriptor to a given number, with flags. Hurd version.
++ Copyright (C) 1991-2012 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. */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <hurd.h>
++#include <hurd/fd.h>
++
++/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
++ open on the same file as FD is, and setting FD2's flags according to FLAGS.
++ Return FD2 or -1. */
++int
++__dup3 (int fd, int fd2, int flags)
++{
++ struct hurd_fd *d;
++
++ /* Both passing flags different from O_CLOEXEC and FD2 being the same as FD
++ are invalid. */
++ if ((flags & ~O_CLOEXEC
++ || fd2 == fd)
++ /* ... with the exception in case that dup2 behavior is requested: if FD
++ is valid and FD2 is already the same then just return it. */
++ && ! (flags == -1
++ && fd2 == fd))
++ return __hurd_fail (EINVAL);
++
++ /* Extract the ports and flags from FD. */
++ d = _hurd_fd_get (fd);
++ if (d == NULL)
++ return __hurd_fail (EBADF);
++
++ HURD_CRITICAL_BEGIN;
++
++ __spin_lock (&d->port.lock);
++ if (d->port.port == MACH_PORT_NULL)
++ {
++ __spin_unlock (&d->port.lock);
++ fd2 = __hurd_fail (EBADF);
++ }
++ else if (fd2 == fd)
++ __spin_unlock (&d->port.lock);
++ else
++ {
++ struct hurd_userlink ulink, ctty_ulink;
++ int d_flags = d->flags;
++ io_t ctty = _hurd_port_get (&d->ctty, &ctty_ulink);
++ io_t port = _hurd_port_locked_get (&d->port, &ulink); /* Unlocks D. */
++
++ if (fd2 < 0)
++ fd2 = __hurd_fail (EBADF);
++ else
++ {
++ /* Get a hold of the destination descriptor. */
++ struct hurd_fd *d2;
++
++ if (fd2 >= _hurd_dtablesize)
++ {
++ /* The table is not large enough to hold the destination
++ descriptor. Enlarge it as necessary to allocate this
++ descriptor. */
++ __mutex_unlock (&_hurd_dtable_lock);
++ /* We still hold FD1's lock, but this is safe because
++ _hurd_alloc_fd will only examine the cells starting
++ at FD2. */
++ d2 = _hurd_alloc_fd (NULL, fd2);
++ if (d2)
++ __spin_unlock (&d2->port.lock);
++ __mutex_lock (&_hurd_dtable_lock);
++ }
++ else
++ {
++ d2 = _hurd_dtable[fd2];
++ if (d2 == NULL)
++ {
++ /* Must allocate a new one. We don't initialize the port
++ cells with this call so that if it fails (out of
++ memory), we will not have already added user
++ references for the ports, which we would then have to
++ deallocate. */
++ d2 = _hurd_dtable[fd2] = _hurd_new_fd (MACH_PORT_NULL,
++ MACH_PORT_NULL);
++ }
++ }
++
++ if (d2 == NULL)
++ {
++ fd2 = -1;
++ if (errno == EINVAL)
++ errno = EBADF; /* POSIX.1-1990 6.2.1.2 ll 54-55. */
++ }
++ else
++ {
++ /* Give the ports each a user ref for the new descriptor. */
++ __mach_port_mod_refs (__mach_task_self (), port,
++ MACH_PORT_RIGHT_SEND, 1);
++ if (ctty != MACH_PORT_NULL)
++ __mach_port_mod_refs (__mach_task_self (), ctty,
++ MACH_PORT_RIGHT_SEND, 1);
++
++ /* Install the ports and flags in the new descriptor slot. */
++ __spin_lock (&d2->port.lock);
++ if (flags & O_CLOEXEC)
++ d2->flags = d_flags | FD_CLOEXEC;
++ else
++ /* dup clears FD_CLOEXEC. */
++ d2->flags = d_flags & ~FD_CLOEXEC;
++ _hurd_port_set (&d2->ctty, ctty);
++ _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */
++ }
++ }
++ __mutex_unlock (&_hurd_dtable_lock);
++
++ _hurd_port_free (&d->port, &ulink, port);
++ if (ctty != MACH_PORT_NULL)
++ _hurd_port_free (&d->ctty, &ctty_ulink, port);
++ }
++
++ HURD_CRITICAL_END;
++
++ return fd2;
++}
++libc_hidden_def (__dup3)
++weak_alias (__dup3, dup3)
+diff --git a/sysdeps/mach/hurd/kernel-features.h b/sysdeps/mach/hurd/kernel-features.h
+index a0ffcbe..96a0d56 100644
+--- a/sysdeps/mach/hurd/kernel-features.h
++++ b/sysdeps/mach/hurd/kernel-features.h
+@@ -20,11 +20,5 @@
+ Almost none of these are used outside of sysdeps/unix/sysv/linux code.
+ But those referring to POSIX-level features like O_* flags can be. */
+
+-#include <fcntl.h>
+-
+-/* If a system defines the O_CLOEXEC constant but it is sometimes ignored,
+- it must override this file to define __ASSUME_O_CLOEXEC conditionally
+- (or not at all) to indicate when O_CLOEXEC actually works. */
+-#ifdef O_CLOEXEC
+-# define __ASSUME_O_CLOEXEC 1
+-#endif
++#define __ASSUME_O_CLOEXEC 1
++#define __ASSUME_DUP3 1
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd-recvfrom.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-hurd-recvfrom.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd-recvfrom.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd-recvfrom.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,34 @@
+commit 37ed8b9bdc820a23d5884132d0278d9e42942fd3
+Author: Pino Toscano <toscano.pino@tiscali.it>
+Date: Thu May 10 15:30:38 2012 -0700
+
+ Hurd: recvfrom(): take into account null address ports
+
+diff --git a/sysdeps/mach/hurd/recvfrom.c b/sysdeps/mach/hurd/recvfrom.c
+index f591336..3a094aa 100644
+--- a/sysdeps/mach/hurd/recvfrom.c
++++ b/sysdeps/mach/hurd/recvfrom.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1994, 1997, 1999, 2001, 2002 Free Software Foundation, Inc.
++/* Copyright (C) 1994-2012 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
+@@ -54,7 +54,7 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
+ return __hurd_sockfail (fd, flags, err);
+
+ /* Get address data for the returned address port if requested. */
+- if (addr != NULL)
++ if (addr != NULL && addrport != MACH_PORT_NULL)
+ {
+ char *buf = (char *) addr;
+ mach_msg_type_number_t buflen = *addr_len;
+@@ -88,6 +88,8 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
+ if (buflen > 0)
+ addr->sa_family = type;
+ }
++ else if (addr_len != NULL)
++ *addr_len = 0;
+
+ __mach_port_deallocate (__mach_task_self (), addrport);
+
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd_socket_server_indexcheck.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-hurd_socket_server_indexcheck.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd_socket_server_indexcheck.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-hurd_socket_server_indexcheck.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,30 @@
+commit 63643c85d4c47512decc16f35124160629c39a86
+Author: Pino Toscano <toscano.pino@tiscali.it>
+Date: Thu May 10 15:35:47 2012 -0700
+
+ Hurd: hurdsock: reject negative domains
+
+diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c
+index f3611ec..4b32ad4 100644
+--- a/hurd/hurdsock.c
++++ b/hurd/hurdsock.c
+@@ -1,5 +1,5 @@
+ /* _hurd_socket_server - Find the server for a socket domain.
+- Copyright (C) 1991,92,93,94,95,97,99 Free Software Foundation, Inc.
++ Copyright (C) 1991-2012 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
+@@ -46,6 +46,12 @@ _hurd_socket_server (int domain, int dead)
+ {
+ socket_t server;
+
++ if (domain < 0)
++ {
++ errno = EAFNOSUPPORT;
++ return MACH_PORT_NULL;
++ }
++
+ HURD_CRITICAL_BEGIN;
+ __mutex_lock (&lock);
+
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-ioctl-decode-argument.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-ioctl-decode-argument.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-ioctl-decode-argument.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-ioctl-decode-argument.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,82 @@
+commit 6753048948b86f3b045710f77e1616b348562fa9
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 13:26:40 2012 -0700
+
+ Hurd: ioctl() incorrectly decodes argument
+
+diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h
+index 65f2ec1..c4cfce6 100644
+--- a/sysdeps/mach/hurd/bits/ioctls.h
++++ b/sysdeps/mach/hurd/bits/ioctls.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1992,93,96,97,98,99,2001,2007 Free Software Foundation, Inc.
++/* Copyright (C) 1992-2012 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
+@@ -157,6 +157,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
+ _IOT_foobar is defined either in this file,
+ or where struct foobar is defined. */
+ #define _IO(g, n) _IOC (IOC_VOID, (g), (n), 0)
++#define _IOIW(g, n, t) _IOC (IOC_VOID, (g), (n), _IOC_ENCODE_TYPE (t))
+ #define _IOR(g, n, t) _IOC (IOC_OUT, (g), (n), _IOC_ENCODE_TYPE (t))
+ #define _IOW(g, n, t) _IOC (IOC_IN, (g), (n), _IOC_ENCODE_TYPE (t))
+ #define _IOWR(g, n, t) _IOC (IOC_INOUT, (g), (n), _IOC_ENCODE_TYPE (t))
+diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
+index beffe43..543d437 100644
+--- a/sysdeps/mach/hurd/ioctl.c
++++ b/sysdeps/mach/hurd/ioctl.c
+@@ -1,5 +1,4 @@
+-/* Copyright (C) 1992,93,94,95,96,97,99,2000,2002,2005
+- Free Software Foundation, Inc.
++/* Copyright (C) 1992-2012 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
+@@ -88,7 +87,7 @@ __ioctl (int fd, unsigned long int request, ...)
+ void *p;
+ #endif
+
+- void *arg;
++ void *arg = NULL;
+
+ error_t err;
+
+@@ -111,7 +110,7 @@ __ioctl (int fd, unsigned long int request, ...)
+ if (_IOC_INOUT (request) & IOC_IN)
+ {
+ /* We don't want to advance ARG since it will be used to copy out
+- too if IOC_OUT is also set. */
++ too if IOC_OUT is also set. */
+ void *argptr = arg;
+
+ /* Pack an argument into the message buffer. */
+@@ -139,7 +138,7 @@ __ioctl (int fd, unsigned long int request, ...)
+ in (_IOT_COUNT1 (type), _IOT_TYPE1 (type));
+ in (_IOT_COUNT2 (type), _IOT_TYPE2 (type));
+ }
+- else if (_IOC_INOUT (request) == IOC_VOID)
++ else if (_IOC_INOUT (request) == IOC_VOID && _IOT_COUNT0 (type) != 0)
+ {
+ /* The RPC takes a single integer_t argument.
+ Rather than pointing to the value, ARG is the value itself. */
+@@ -208,11 +207,15 @@ __ioctl (int fd, unsigned long int request, ...)
+ return msg.header.RetCode;
+ }
+
+- va_list ap;
++ if (_IOT_COUNT0 (type) != 0)
++ {
++ /* Data need either be sent, received, or even both. */
++ va_list ap;
+
+- va_start (ap, request);
+- arg = va_arg (ap, void *);
+- va_end (ap);
++ va_start (ap, request);
++ arg = va_arg (ap, void *);
++ va_end (ap);
++ }
+
+ {
+ /* Check for a registered handler for REQUEST. */
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-itimer-lock.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-itimer-lock.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-itimer-lock.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-itimer-lock.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,26 @@
+commit bbc49098ff1bbbd5bdbcd69546b906d3844b4771
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 13:33:47 2012 -0700
+
+ Hurd: setitimer.c: Fix unlock in error patch
+
+diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c
+index a7b2e29..00cd0cc 100644
+--- a/sysdeps/mach/hurd/setitimer.c
++++ b/sysdeps/mach/hurd/setitimer.c
+@@ -1,5 +1,4 @@
+-/* Copyright (C) 1994,1995,1996,1997,2000,2001,2005
+- Free Software Foundation, Inc.
++/* Copyright (C) 1994-2012 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
+@@ -219,7 +218,7 @@ setitimer_locked (const struct itimerval *new, struct itimerval *old,
+ /* Start up the itimer thread running `timer_thread' (below). */
+ if (err = __thread_create (__mach_task_self (),
+ &_hurd_itimer_thread))
+- return __hurd_fail (err);
++ goto out;
+ _hurd_itimer_thread_stack_base = 0; /* Anywhere. */
+ _hurd_itimer_thread_stack_size = __vm_page_size; /* Small stack. */
+ if (err = __mach_setup_thread (__mach_task_self (),
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-libc_stack_end.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-libc_stack_end.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-libc_stack_end.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-libc_stack_end.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,57 @@
+commit 5d5722e8ac22253bdc819da2d676d9900da0c533
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 14:51:22 2012 -0700
+
+ Hurd: Fix value of __libc_stack_end
+
+diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
+index 602b429..e071015 100644
+--- a/sysdeps/generic/ldsodefs.h
++++ b/sysdeps/generic/ldsodefs.h
+@@ -717,7 +717,11 @@ rtld_hidden_proto (_dl_make_stack_executable)
+ might use the variable which results in copy relocations on some
+ platforms. But this does not matter, ld.so can always use the local
+ copy. */
+-extern void *__libc_stack_end attribute_relro;
++extern void *__libc_stack_end
++#ifndef LIBC_STACK_END_NOT_RELRO
++ attribute_relro
++#endif
++ ;
+ rtld_hidden_proto (__libc_stack_end)
+
+ /* Parameters passed to the dynamic linker. */
+diff --git a/sysdeps/mach/hurd/dl-sysdep.h b/sysdeps/mach/hurd/dl-sysdep.h
+index 671b241..c64a39d 100644
+--- a/sysdeps/mach/hurd/dl-sysdep.h
++++ b/sysdeps/mach/hurd/dl-sysdep.h
+@@ -1,5 +1,5 @@
+ /* System-specific settings for dynamic linker code. Hurd version.
+- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
++ Copyright (C) 2002-2012 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
+@@ -24,7 +24,8 @@
+ #define RTLD_PRIVATE_ERRNO 0
+
+ #ifdef SHARED
+-/* _dl_argv cannot be attribute_relro, because the stack-switching
++/* _dl_argv and __libc_stack_end cannot be attribute_relro, because the stack-switching
+ libc initializer for using cthreads might write into it. */
+ # define DL_ARGV_NOT_RELRO 1
++# define LIBC_STACK_END_NOT_RELRO 1
+ #endif
+diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
+index f4bf624..fa4e3d9 100644
+--- a/sysdeps/mach/hurd/i386/init-first.c
++++ b/sysdeps/mach/hurd/i386/init-first.c
+@@ -214,6 +214,8 @@ init (int *data)
+
+ void switch_stacks (void);
+
++ __libc_stack_end = newsp;
++
+ /* Copy per-thread variables from that temporary
+ area onto the new cthread stack. */
+ memcpy (__hurd_threadvar_location_from_sp (0, newsp),
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-mach-nanosleep.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-mach-nanosleep.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-mach-nanosleep.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-mach-nanosleep.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,64 @@
+commit a4186cffbfdb464ff1b7344fd7561d6014ef721e
+Author: Pino Toscano <toscano.pino@tiscali.it>
+Date: Thu May 10 14:53:21 2012 -0700
+
+ Hurd: mach: compliance fixes for nanosleep
+
+diff --git a/sysdeps/mach/nanosleep.c b/sysdeps/mach/nanosleep.c
+index 0192ff0..a1ba19c 100644
+--- a/sysdeps/mach/nanosleep.c
++++ b/sysdeps/mach/nanosleep.c
+@@ -1,5 +1,5 @@
+ /* nanosleep -- sleep for a period specified with a struct timespec
+- Copyright (C) 2002 Free Software Foundation, Inc.
++ Copyright (C) 2002-2012 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
+@@ -27,6 +27,15 @@ __nanosleep (const struct timespec *requested_time,
+ {
+ mach_port_t recv;
+ struct timeval before, after;
++
++ if (requested_time->tv_sec < 0
++ || requested_time->tv_nsec < 0
++ || requested_time->tv_nsec >= 1000000000)
++ {
++ errno = EINVAL;
++ return -1;
++ }
++
+ const mach_msg_timeout_t ms
+ = requested_time->tv_sec * 1000
+ + (requested_time->tv_nsec + 999999) / 1000000;
+@@ -35,16 +44,22 @@ __nanosleep (const struct timespec *requested_time,
+
+ if (remaining && __gettimeofday (&before, NULL) < 0)
+ return -1;
+- (void) __mach_msg (NULL, MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT,
+- 0, 0, recv, ms, MACH_PORT_NULL);
++ error_t err = __mach_msg (NULL, MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT,
++ 0, 0, recv, ms, MACH_PORT_NULL);
+ __mach_port_destroy (mach_task_self (), recv);
+- if (remaining && __gettimeofday (&after, NULL) < 0)
+- return -1;
+-
+- if (remaining)
++ if (err == EMACH_RCV_INTERRUPTED)
+ {
+- timersub (&after, &before, &after);
+- TIMEVAL_TO_TIMESPEC (&after, remaining);
++ if (remaining && __gettimeofday (&after, NULL) >= 0)
++ {
++ struct timeval req_time, elapsed, rem;
++ TIMESPEC_TO_TIMEVAL (&req_time, requested_time);
++ timersub (&after, &before, &elapsed);
++ timersub (&req_time, &elapsed, &rem);
++ TIMEVAL_TO_TIMESPEC (&rem, remaining);
++ }
++
++ errno = EINTR;
++ return -1;
+ }
+
+ return 0;
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-mkdir_root.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-mkdir_root.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-mkdir_root.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-mkdir_root.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,68 @@
+commit 6b645f0d702e9285f3d7fe5684258e77051cfa8e
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:16:07 2012 -0700
+
+ Hurd: Fix mkdir / error value
+
+diff --git a/sysdeps/mach/hurd/mkdir.c b/sysdeps/mach/hurd/mkdir.c
+index d3627ee..8ad648e 100644
+--- a/sysdeps/mach/hurd/mkdir.c
++++ b/sysdeps/mach/hurd/mkdir.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1991,93,94,95,96,97,2002 Free Software Foundation, Inc.
++/* Copyright (C) 1991-2012 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
+@@ -19,6 +19,7 @@
+ #include <stddef.h>
+ #include <sys/stat.h>
+ #include <hurd.h>
++#include <string.h>
+
+ /* Create a directory named FILE_NAME with protections MODE. */
+ int
+@@ -28,7 +29,10 @@ __mkdir (file_name, mode)
+ {
+ error_t err;
+ const char *name;
+- file_t parent = __directory_name_split (file_name, (char **) &name);
++ file_t parent;
++ if (!strcmp (file_name, "/"))
++ return __hurd_fail (EEXIST);
++ parent = __directory_name_split (file_name, (char **) &name);
+ if (parent == MACH_PORT_NULL)
+ return -1;
+ err = __dir_mkdir (parent, name, mode & ~_hurd_umask);
+diff --git a/sysdeps/mach/hurd/mkdirat.c b/sysdeps/mach/hurd/mkdirat.c
+index 9201f7d..d6d672e 100644
+--- a/sysdeps/mach/hurd/mkdirat.c
++++ b/sysdeps/mach/hurd/mkdirat.c
+@@ -1,6 +1,5 @@
+ /* Create a directory named relative to another open directory. Hurd version.
+- Copyright (C) 1991,1993,1994,1995,1996,1997,2002,2006
+- Free Software Foundation, Inc.
++ Copyright (C) 1991-2012 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
+@@ -22,6 +21,7 @@
+ #include <sys/stat.h>
+ #include <hurd.h>
+ #include <hurd/fd.h>
++#include <string.h>
+
+ int
+ mkdirat (fd, path, mode)
+@@ -31,7 +31,10 @@ mkdirat (fd, path, mode)
+ {
+ error_t err;
+ const char *name;
+- file_t parent = __directory_name_split_at (fd, path, (char **) &name);
++ file_t parent;
++ if (!strcmp (path, "/"))
++ return __hurd_fail (EEXIST);
++ parent = __directory_name_split_at (fd, path, (char **) &name);
+ if (parent == MACH_PORT_NULL)
+ return -1;
+ err = __dir_mkdir (parent, name, mode & ~_hurd_umask);
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-mlock.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-mlock.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-mlock.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-mlock.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,26 @@
+commit 66cbbebcc616db8e221e81f7ecbb2c77701d031b
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:17:03 2012 -0700
+
+ Hurd: Fix mlock in all cases except non-readable pages.
+
+diff --git a/sysdeps/mach/hurd/mlock.c b/sysdeps/mach/hurd/mlock.c
+index 2cb3e56..47bafaa 100644
+--- a/sysdeps/mach/hurd/mlock.c
++++ b/sysdeps/mach/hurd/mlock.c
+@@ -1,5 +1,5 @@
+ /* mlock -- guarantee pages are resident in memory. Mach/Hurd version.
+- Copyright (C) 2001 Free Software Foundation, Inc.
++ Copyright (C) 2001-2012 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
+@@ -39,7 +39,7 @@ mlock (const void *addr, size_t len)
+ page = trunc_page ((vm_address_t) addr);
+ len = round_page ((vm_address_t) addr + len) - page;
+ err = __vm_wire (hostpriv, __mach_task_self (), page, len,
+- VM_PROT_ALL); /* XXX ? */
++ VM_PROT_READ);
+ __mach_port_deallocate (__mach_task_self (), hostpriv);
+
+ return err ? __hurd_fail (err) : 0;
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-null-pathname.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-null-pathname.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-null-pathname.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-null-pathname.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,47 @@
+commit edadcbd6247ca741756e234b6aa5f3db895bdd3d
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:21:18 2012 -0700
+
+ Hurd: empty file names fail with ENOENT
+
+diff --git a/hurd/hurdchdir.c b/hurd/hurdchdir.c
+index 6881956..1669358 100644
+--- a/hurd/hurdchdir.c
++++ b/hurd/hurdchdir.c
+@@ -1,5 +1,5 @@
+ /* Change a port cell to a directory by looking up a name.
+- Copyright (C) 1999,2001,02 Free Software Foundation, Inc.
++ Copyright (C) 1999-2012 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
+@@ -37,6 +37,9 @@ _hurd_change_directory_port_from_name (struct hurd_port *portcell,
+ len = strlen (name);
+ if (len >= 2 && name[len - 2] == '/' && name[len - 1] == '.')
+ lookup = name;
++ else if (len == 0)
++ /* Special-case empty file name according to POSIX. */
++ return __hurd_fail (ENOENT);
+ else
+ {
+ char *n = alloca (len + 3);
+diff --git a/sysdeps/mach/hurd/chroot.c b/sysdeps/mach/hurd/chroot.c
+index 1a6b1e4..95bee33 100644
+--- a/sysdeps/mach/hurd/chroot.c
++++ b/sysdeps/mach/hurd/chroot.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1991,92,93,94,95,97,99,2001 Free Software Foundation, Inc.
++/* Copyright (C) 1991-2012 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
+@@ -37,6 +37,9 @@ chroot (const char *path)
+ len = strlen (path);
+ if (len >= 2 && path[len - 2] == '/' && path[len - 1] == '.')
+ lookup = path;
++ else if (len == 0)
++ /* Special-case empty file name according to POSIX. */
++ return __hurd_fail (ENOENT);
+ else
+ {
+ char *n = alloca (len + 3);
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-posix2008.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-posix2008.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-posix2008.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-posix2008.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,74 @@
+commit ee16e894aaf51674058224fe0ece852bd0b3632d
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:27:04 2012 -0700
+
+ Hurd: Fix POSIX 2008 visibility
+
+diff --git a/bits/sigaction.h b/bits/sigaction.h
+index a5e1d18..a737660 100644
+--- a/bits/sigaction.h
++++ b/bits/sigaction.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1991,92,96,97,98,2001 Free Software Foundation, Inc.
++/* Copyright (C) 1991-2012 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
+@@ -54,6 +54,8 @@ struct sigaction
+ /* Bits in `sa_flags'. */
+ #if defined __USE_UNIX98 || defined __USE_MISC
+ # define SA_ONSTACK 0x0001 /* Take signal on signal stack. */
++#endif
++#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
+ # define SA_RESTART 0x0002 /* Restart syscall on signal return. */
+ # define SA_NODEFER 0x0010 /* Don't automatically block the signal when
+ its handler is being executed. */
+diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
+index 4224bf1..1d24c73 100644
+--- a/sysdeps/mach/hurd/bits/fcntl.h
++++ b/sysdeps/mach/hurd/bits/fcntl.h
+@@ -1,6 +1,5 @@
+ /* O_*, F_*, FD_* bit values for GNU.
+- Copyright (C) 1993,1994,1996,1997,1998,1999,2000,2001,2004,2007
+- Free Software Foundation, Inc.
++ Copyright (C) 1993-2012 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
+@@ -54,7 +53,9 @@
+ #ifdef __USE_GNU
+ # define O_NOLINK 0x0040 /* No name mappings on final component. */
+ # define O_NOTRANS 0x0080 /* No translator on final component. */
++#endif
+
++#ifdef __USE_XOPEN2K8
+ # define O_NOFOLLOW 0x00100000 /* Produce ENOENT if file is a symlink. */
+ # define O_DIRECTORY 0x00200000 /* Produce ENOTDIR if not a directory. */
+ #endif
+@@ -118,7 +119,7 @@
+ once the file has been opened. */
+
+ #define O_TRUNC 0x00010000 /* Truncate file to zero length. */
+-#ifdef __USE_GNU
++#ifdef __USE_XOPEN2K8
+ # define O_CLOEXEC 0x00400000 /* Set FD_CLOEXEC. */
+ #endif
+
+@@ -158,7 +159,7 @@
+ #define F_SETFD 2 /* Set file descriptor flags. */
+ #define F_GETFL 3 /* Get file status flags. */
+ #define F_SETFL 4 /* Set file status flags. */
+-#if defined __USE_BSD || defined __USE_UNIX98
++#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
+ # define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
+ # define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
+ #endif
+@@ -166,7 +167,7 @@
+ #define F_SETLK 8 /* Set record locking info (non-blocking). */
+ #define F_SETLKW 9 /* Set record locking info (blocking). */
+
+-#ifdef __USE_GNU
++#ifdef __USE_XOPEN2K8
+ # define F_DUPFD_CLOEXEC 1030 /* Duplicate, set FD_CLOEXEC on new one. */
+ #endif
+
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-posix_opt.h.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-posix_opt.h.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-posix_opt.h.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-posix_opt.h.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,114 @@
+commit db65366043bd85adbf7b0a73f406f5dadbf5ceb3
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:28:33 2012 -0700
+
+ Hurd: Update posix_opt.h
+
+diff --git a/posix/tst-sysconf.c b/posix/tst-sysconf.c
+index e297229..105c7c2 100644
+--- a/posix/tst-sysconf.c
++++ b/posix/tst-sysconf.c
+@@ -29,8 +29,12 @@ static struct
+ N (MEMORY_PROTECTION),
+ N (MESSAGE_PASSING),
+ N (MONOTONIC_CLOCK),
++#ifdef _POSIX_PRIORITIZED_IO
+ N (PRIORITIZED_IO),
++#endif
++#ifdef _POSIX_PRIORITY_SCHEDULING
+ N (PRIORITY_SCHEDULING),
++#endif
+ N (RAW_SOCKETS),
+ N (READER_WRITER_LOCKS),
+ N (REALTIME_SIGNALS),
+@@ -42,7 +46,9 @@ static struct
+ N (SPAWN),
+ N (SPIN_LOCKS),
+ N (SPORADIC_SERVER),
++#ifdef _POSIX_SYNCHRONIZED_IO
+ N (SYNCHRONIZED_IO),
++#endif
+ N (THREAD_ATTR_STACKADDR),
+ N (THREAD_ATTR_STACKSIZE),
+ N (THREAD_CPUTIME),
+diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
+index 23d32ce..3c08307 100644
+--- a/sysdeps/mach/hurd/bits/posix_opt.h
++++ b/sysdeps/mach/hurd/bits/posix_opt.h
+@@ -1,5 +1,5 @@
+ /* Define POSIX options for GNU/Hurd.
+- Copyright (C) 1998,2000,2001,2002,2006,2009 Free Software Foundation, Inc.
++ Copyright (C) 1998-2012 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
+@@ -30,6 +30,9 @@
+ /* Processes have a saved set-user-ID and a saved set-group-ID. */
+ #define _POSIX_SAVED_IDS 1
+
++/* Priority scheduling is not supported. */
++#undef _POSIX_PRIORITY_SCHEDULING
++
+ /* Synchronizing file data is supported, but msync is missing. */
+ #undef _POSIX_SYNCHRONIZED_IO
+
+@@ -59,6 +62,14 @@
+ #undef _POSIX_NO_TRUNC /* Overlong file names get error? */
+ #undef _POSIX_SYNC_IO /* File supports O_SYNC et al? */
+
++/* X/Open realtime support is not supported. */
++#undef _XOPEN_REALTIME
++
++/* X/Open thread realtime support is not supported. */
++#undef _XOPEN_REALTIME_THREADS
++
++/* XPG4.2 shared memory is not supported. */
++#undef _XOPEN_SHM
+
+ /* We do not have the POSIX threads interface. */
+ #define _POSIX_THREADS -1
+@@ -71,6 +82,12 @@
+ #define _POSIX_THREAD_PRIORITY_SCHEDULING -1
+ #define _POSIX_THREAD_ATTR_STACKSIZE -1
+ #define _POSIX_THREAD_ATTR_STACKADDR -1
++#define _POSIX_THREAD_PRIO_INHERIT -1
++#define _POSIX_THREAD_PRIO_PROTECT -1
++#ifdef __USE_XOPEN2K8
++# define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1
++# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
++#endif
+ #define _POSIX_SEMAPHORES -1
+
+ /* Real-time signals are not yet supported. */
+@@ -78,8 +95,11 @@
+
+ /* Asynchronous I/O might supported with the existing ABI. */
+ #define _POSIX_ASYNCHRONOUS_IO 0
++#undef _POSIX_ASYNC_IO
+ /* Alternative name for Unix98. */
+ #define _LFS_ASYNCHRONOUS_IO _POSIX_ASYNCHRONOUS_IO
++/* Support for prioritization is not available. */
++#undef _POSIX_PRIORITIZED_IO
+
+ /* The LFS support in asynchronous I/O is also available. */
+ #define _LFS64_ASYNCHRONOUS_IO _POSIX_ASYNCHRONOUS_IO
+@@ -110,6 +130,9 @@
+ /* We cannot support the Timeouts option without _POSIX_THREADS. */
+ #define _POSIX_TIMEOUTS -1
+
++/* We do not support spinlocks. */
++#define _POSIX_SPIN_LOCKS -1
++
+ /* The `spawn' function family is supported. */
+ #define _POSIX_SPAWN 200809L
+
+@@ -156,9 +179,4 @@
+ /* Typed memory objects are not available. */
+ #define _POSIX_TYPED_MEMORY_OBJECTS -1
+
+-/* No support for priority inheritance or protection so far. */
+-#define _POSIX_THREAD_PRIO_INHERIT -1
+-#define _POSIX_THREAD_PRIO_PROTECT -1
+-
+-
+ #endif /* bits/posix_opt.h */
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-readlinkat.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-readlinkat.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-readlinkat.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-readlinkat.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,76 @@
+commit b29d4053f0bda40f052cf69019e4198a21c67efb
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:29:55 2012 -0700
+
+ Hurd: readlinkat
+
+diff --git a/sysdeps/mach/hurd/readlinkat.c b/sysdeps/mach/hurd/readlinkat.c
+new file mode 100644
+index 0000000..b70f9c8
+--- /dev/null
++++ b/sysdeps/mach/hurd/readlinkat.c
+@@ -0,0 +1,64 @@
++/* Copyright (C) 1991-2012 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. */
++
++#include <unistd.h>
++#include <hurd.h>
++#include <hurd/paths.h>
++#include <hurd/fd.h>
++#include <fcntl.h>
++#include <string.h>
++
++/* Read the contents of the symbolic link FILE_NAME relative to FD into no more
++ than LEN bytes of BUF. The contents are not null-terminated.
++ Returns the number of characters read, or -1 for errors. */
++ssize_t
++readlinkat (fd, file_name, buf, len)
++ int fd;
++ const char *file_name;
++ char *buf;
++ size_t len;
++{
++ error_t err;
++ file_t file;
++ struct stat64 st;
++
++ file = __file_name_lookup_at (fd, 0, file_name, O_READ | O_NOLINK, 0);
++ if (file == MACH_PORT_NULL)
++ return -1;
++
++ err = __io_stat (file, &st);
++ if (! err)
++ if (S_ISLNK (st.st_mode))
++ {
++ char *rbuf = buf;
++
++ err = __io_read (file, &rbuf, &len, 0, len);
++ if (!err && rbuf != buf)
++ {
++ memcpy (buf, rbuf, len);
++ __vm_deallocate (__mach_task_self (), (vm_address_t)rbuf, len);
++ }
++ }
++ else
++ err = EINVAL;
++
++ __mach_port_deallocate (__mach_task_self (), file);
++
++ return err ? __hurd_fail (err) : len;
++}
++libc_hidden_def (readlinkat)
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-sbrk.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-sbrk.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-sbrk.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-sbrk.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,49 @@
+commit 1043890b10996ec4b14cd01040b82610760d5d4a
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:31:37 2012 -0700
+
+ Hurd: Fix sbrk beyond 128MB
+
+diff --git a/sysdeps/mach/hurd/brk.c b/sysdeps/mach/hurd/brk.c
+index 275d7be..1900277 100644
+--- a/sysdeps/mach/hurd/brk.c
++++ b/sysdeps/mach/hurd/brk.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1991,92,93,94,95,96,97,99,2000 Free Software Foundation, Inc.
++/* Copyright (C) 1991-2012 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
+@@ -63,7 +63,7 @@ weak_alias (__brk, brk)
+ int
+ _hurd_set_brk (vm_address_t addr)
+ {
+- error_t err;
++ error_t err = 0;
+ vm_address_t pagend = round_page (addr);
+ vm_address_t pagebrk = round_page (_hurd_brk);
+ long int rlimit;
+@@ -100,8 +100,22 @@ _hurd_set_brk (vm_address_t addr)
+
+ if (pagend > _hurd_data_end)
+ {
++ vm_address_t alloc_start = _hurd_data_end;
++
+ /* We didn't allocate enough space! Hopefully we can get some more! */
+- err = __vm_allocate (__mach_task_self (), &pagebrk, pagend - pagebrk, 0);
++
++ if (_hurd_data_end > pagebrk)
++ /* First finish allocation. */
++ err = __vm_protect (__mach_task_self (), pagebrk,
++ alloc_start - pagebrk, 0,
++ VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
++ if (! err)
++ _hurd_brk = alloc_start;
++
++ if (! err)
++ err = __vm_allocate (__mach_task_self (), &alloc_start,
++ pagend - alloc_start, 0);
++
+ if (! err)
+ _hurd_data_end = pagend;
+ }
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-select-inputcheck.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-select-inputcheck.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-select-inputcheck.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-select-inputcheck.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,64 @@
+commit c6474b07e7b5f0cdc9089c1c4fcfc4fcaa2bcd92
+Author: Pino Toscano <toscano.pino@tiscali.it>
+Date: Thu May 10 15:32:53 2012 -0700
+
+ Hurd: _hurd_select: check for invalid parameter values
+
+diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
+index 25d9d9f..21ba5f4 100644
+--- a/hurd/hurdselect.c
++++ b/hurd/hurdselect.c
+@@ -1,6 +1,5 @@
+ /* Guts of both `select' and `poll' for Hurd.
+- Copyright (C) 1991,92,93,94,95,96,97,98,99,2001
+- Free Software Foundation, Inc.
++ Copyright (C) 1991-2012 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
+@@ -49,10 +48,7 @@ _hurd_select (int nfds,
+ error_t err;
+ fd_set rfds, wfds, xfds;
+ int firstfd, lastfd;
+- mach_msg_timeout_t to = (timeout != NULL ?
+- (timeout->tv_sec * 1000 +
+- (timeout->tv_nsec + 999999) / 1000000) :
+- 0);
++ mach_msg_timeout_t to = 0;
+ struct
+ {
+ struct hurd_userlink ulink;
+@@ -71,6 +67,24 @@ _hurd_select (int nfds,
+ assert (sizeof (union typeword) == sizeof (mach_msg_type_t));
+ assert (sizeof (uint32_t) == sizeof (mach_msg_type_t));
+
++ if (nfds < 0 || nfds > FD_SETSIZE)
++ {
++ errno = EINVAL;
++ return -1;
++ }
++
++ if (timeout != NULL)
++ {
++ if (timeout->tv_sec < 0 || timeout->tv_nsec < 0)
++ {
++ errno = EINVAL;
++ return -1;
++ }
++
++ to = (timeout->tv_sec * 1000 +
++ (timeout->tv_nsec + 999999) / 1000000);
++ }
++
+ if (sigmask && __sigprocmask (SIG_SETMASK, sigmask, &oset))
+ return -1;
+
+@@ -364,7 +378,7 @@ _hurd_select (int nfds,
+ }
+
+ /* Look up the respondent's reply port and record its
+- readiness. */
++ readiness. */
+ {
+ int had = got;
+ if (firstfd != -1)
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-setresid.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-setresid.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-setresid.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-setresid.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,223 @@
+commit 3faebe6abc04ea8d632bee4537948ca85479c09a
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Thu May 10 15:34:53 2012 -0700
+
+ Hurd: Fix setres[ug]id handling of -1
+
+diff --git a/sysdeps/mach/hurd/setresgid.c b/sysdeps/mach/hurd/setresgid.c
+index 9d5885b..eebd364 100644
+--- a/sysdeps/mach/hurd/setresgid.c
++++ b/sysdeps/mach/hurd/setresgid.c
+@@ -1,5 +1,5 @@
+ /* setresgid -- set real group ID, effective group ID, and saved-set group ID
+- Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
++ Copyright (C) 2002-2012 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
+@@ -28,7 +28,6 @@ __setresgid (gid_t rgid, gid_t egid, gid_t sgid)
+ {
+ auth_t newauth;
+ error_t err;
+- gid_t agids[2] = { rgid, sgid };
+
+ HURD_CRITICAL_BEGIN;
+ __mutex_lock (&_hurd_id.lock);
+@@ -37,31 +36,78 @@ __setresgid (gid_t rgid, gid_t egid, gid_t sgid)
+ if (!err)
+ {
+ /* Make a new auth handle which has EGID as the first element in the
+- list of effective gids. */
++ list of effective gids. */
+
+- if (_hurd_id.gen.ngids > 0)
++ uid_t *newgen, *newaux;
++ uid_t auxs[2] = { rgid, sgid };
++ size_t ngen, naux;
++
++ newgen = _hurd_id.gen.gids;
++ ngen = _hurd_id.gen.ngids;
++ if (egid != -1)
++ {
++ if (_hurd_id.gen.ngids == 0)
++ {
++ /* No effective gids now. The new set will be just UID. */
++ newgen = &egid;
++ ngen = 1;
++ }
++ else
++ {
++ _hurd_id.gen.gids[0] = egid;
++ _hurd_id.valid = 0;
++ }
++ }
++
++ newaux = _hurd_id.aux.gids;
++ naux = _hurd_id.aux.ngids;
++ if (rgid != -1)
+ {
+- _hurd_id.gen.gids[0] = egid;
+- _hurd_id.valid = 0;
++ if (_hurd_id.aux.ngids == 0)
++ {
++ newaux = &rgid;
++ naux = 1;
++ }
++ else
++ {
++ _hurd_id.aux.gids[0] = rgid;
++ _hurd_id.valid = 0;
++ }
+ }
+- if (_hurd_id.aux.ngids > 1)
++
++ if (sgid != -1)
+ {
+- _hurd_id.aux.gids[0] = rgid;
+- _hurd_id.aux.gids[1] = sgid;
+- _hurd_id.valid = 0;
++ if (rgid == -1)
++ {
++ if (_hurd_id.aux.ngids >= 1)
++ auxs[0] = _hurd_id.aux.gids[0];
++ else if (_hurd_id.gen.ngids >= 1)
++ auxs[0] = _hurd_id.gen.gids[0];
++ else
++ /* Not even an effective GID.
++ Fall back to the only GID we have. */
++ auxs[0] = sgid;
++ }
++ if (_hurd_id.aux.ngids <= 1)
++ {
++ /* No saved gids now. The new set will be just UID. */
++ newaux = auxs;
++ naux = 2;
++ }
++ else
++ {
++ _hurd_id.aux.gids[1] = sgid;
++ _hurd_id.valid = 0;
++ }
+ }
+
+ err = __USEPORT (AUTH, __auth_makeauth
+ (port, NULL, MACH_MSG_TYPE_COPY_SEND, 0,
+ _hurd_id.gen.uids, _hurd_id.gen.nuids,
+ _hurd_id.aux.uids, _hurd_id.aux.nuids,
+- _hurd_id.gen.ngids ? _hurd_id.gen.gids : &egid,
+- _hurd_id.gen.ngids ?: 1,
+- _hurd_id.aux.ngids > 1 ? _hurd_id.aux.gids : agids,
+- _hurd_id.aux.ngids > 1 ? _hurd_id.aux.ngids : 2,
++ newgen, ngen, newaux, naux,
+ &newauth));
+ }
+-
+ __mutex_unlock (&_hurd_id.lock);
+ HURD_CRITICAL_END;
+
+diff --git a/sysdeps/mach/hurd/setresuid.c b/sysdeps/mach/hurd/setresuid.c
+index 35aea85..751763f 100644
+--- a/sysdeps/mach/hurd/setresuid.c
++++ b/sysdeps/mach/hurd/setresuid.c
+@@ -1,5 +1,5 @@
+ /* setresuid -- set real user ID, effective user ID, and saved-set user ID
+- Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
++ Copyright (C) 2002-2012 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
+@@ -28,7 +28,6 @@ __setresuid (uid_t ruid, uid_t euid, uid_t suid)
+ {
+ auth_t newauth;
+ error_t err;
+- uid_t auids[2] = { ruid, suid };
+
+ HURD_CRITICAL_BEGIN;
+ __mutex_lock (&_hurd_id.lock);
+@@ -37,26 +36,74 @@ __setresuid (uid_t ruid, uid_t euid, uid_t suid)
+ if (!err)
+ {
+ /* Make a new auth handle which has EUID as the first element in the
+- list of effective uids. */
++ list of effective uids. */
+
+- if (_hurd_id.gen.nuids > 0)
++ uid_t *newgen, *newaux;
++ uid_t auxs[2] = { ruid, suid };
++ size_t ngen, naux;
++
++ newgen = _hurd_id.gen.uids;
++ ngen = _hurd_id.gen.nuids;
++ if (euid != -1)
+ {
+- _hurd_id.gen.uids[0] = euid;
+- _hurd_id.valid = 0;
++ if (_hurd_id.gen.nuids == 0)
++ {
++ /* No effective uids now. The new set will be just UID. */
++ newgen = &euid;
++ ngen = 1;
++ }
++ else
++ {
++ _hurd_id.gen.uids[0] = euid;
++ _hurd_id.valid = 0;
++ }
+ }
+- if (_hurd_id.aux.nuids > 1)
++
++ newaux = _hurd_id.aux.uids;
++ naux = _hurd_id.aux.nuids;
++ if (ruid != -1)
++ {
++ if (_hurd_id.aux.nuids == 0)
++ {
++ newaux = &ruid;
++ naux = 1;
++ }
++ else
++ {
++ _hurd_id.aux.uids[0] = ruid;
++ _hurd_id.valid = 0;
++ }
++ }
++
++ if (suid != -1)
+ {
+- _hurd_id.aux.uids[0] = ruid;
+- _hurd_id.aux.uids[1] = suid;
+- _hurd_id.valid = 0;
++ if (ruid == -1)
++ {
++ if (_hurd_id.aux.nuids >= 1)
++ auxs[0] = _hurd_id.aux.uids[0];
++ else if (_hurd_id.gen.nuids >= 1)
++ auxs[0] = _hurd_id.gen.uids[0];
++ else
++ /* Not even an effective UID.
++ Fall back to the only UID we have. */
++ auxs[0] = suid;
++ }
++ if (_hurd_id.aux.nuids <= 1)
++ {
++ /* No saved uids now. The new set will be just UID. */
++ newaux = auxs;
++ naux = 2;
++ }
++ else
++ {
++ _hurd_id.aux.uids[1] = suid;
++ _hurd_id.valid = 0;
++ }
+ }
+
+ err = __USEPORT (AUTH, __auth_makeauth
+ (port, NULL, MACH_MSG_TYPE_COPY_SEND, 0,
+- _hurd_id.gen.nuids ? _hurd_id.gen.uids : &euid,
+- _hurd_id.gen.nuids ?: 1,
+- _hurd_id.aux.nuids > 1 ? _hurd_id.aux.uids : auids,
+- _hurd_id.aux.nuids > 1 ? _hurd_id.aux.nuids : 2,
++ newgen, ngen, newaux, naux,
+ _hurd_id.gen.gids, _hurd_id.gen.ngids,
+ _hurd_id.aux.gids, _hurd_id.aux.ngids,
+ &newauth));
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-strtoul_PLT.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-strtoul_PLT.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-strtoul_PLT.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-strtoul_PLT.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,40 @@
+commit 10589b4adb212dfde20670aacfb76aa842f42b92
+Author: Thomas Schwinge <thomas@schwinge.name>
+Date: Thu May 10 15:37:23 2012 -0700
+
+ Hurd: avoid PLT call to strtoul
+
+diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
+index 3c506a0..4fa2a21 100644
+--- a/hurd/lookup-retry.c
++++ b/hurd/lookup-retry.c
+@@ -1,6 +1,5 @@
+ /* hairy bits of Hurd file name lookup
+- Copyright (C) 1992,1993,1994,1995,1996,1997,1999,2001,2002,2003,2005
+- Free Software Foundation, Inc.
++ Copyright (C) 1992-2012 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
+@@ -44,10 +43,10 @@ lookup_error (error_t error)
+
+ error_t
+ __hurd_file_name_lookup_retry (error_t (*use_init_port)
+- (int which, error_t (*operate) (file_t)),
++ (int which, error_t (*operate) (file_t)),
+ file_t (*get_dtable_port) (int fd),
+ error_t (*lookup)
+- (file_t dir, char *name,
++ (file_t dir, char *name,
+ int flags, mode_t mode,
+ retry_type *do_retry, string_t retry_name,
+ mach_port_t *result),
+@@ -193,7 +192,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
+ char *end;
+ int save = errno;
+ errno = 0;
+- fd = (int) strtoul (&retryname[3], &end, 10);
++ fd = (int) __strtoul_internal (&retryname[3], &end, 10, 0);
+ if (end == NULL || errno || /* Malformed number. */
+ /* Check for excess text after the number. A slash
+ is valid; it ends the component. Anything else
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-struct_stat.diff (from rev 5246, glibc-package/trunk/debian/patches/hurd-i386/tg-struct_stat.diff)
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-struct_stat.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-struct_stat.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -0,0 +1,121 @@
+commit 8e41b99fe1ae60276f8db4211d47ed2b1bacebf2
+Author: Thomas Schwinge <thomas@schwinge.name>
+Date: Thu May 10 15:40:09 2012 -0700
+
+ Hurd: struct timespec members in struct stat
+
+diff --git a/sysdeps/mach/hurd/bits/stat.h b/sysdeps/mach/hurd/bits/stat.h
+index 15fcda1..e6ffda8 100644
+--- a/sysdeps/mach/hurd/bits/stat.h
++++ b/sysdeps/mach/hurd/bits/stat.h
+@@ -1,5 +1,4 @@
+-/* Copyright (C) 1992-1994,1996,1997,1999,2000,2005,2010
+- Free Software Foundation, Inc.
++/* Copyright (C) 1992-2012 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
+@@ -58,12 +57,27 @@ struct stat
+ __off64_t st_size; /* Size in bytes. */
+ #endif
+
+- __time_t st_atime; /* Access time, seconds */
+- unsigned long int st_atime_usec; /* and microseconds. */
+- __time_t st_mtime; /* Modification time, seconds */
+- unsigned long int st_mtime_usec; /* and microseconds. */
+- __time_t st_ctime; /* Status change time, seconds */
+- unsigned long int st_ctime_usec; /* and microseconds. */
++#if defined __USE_MISC || defined __USE_XOPEN2K8
++ /* Nanosecond resolution timestamps are stored in a format
++ equivalent to 'struct timespec'. This is the type used
++ whenever possible but the Unix namespace rules do not allow the
++ identifier 'timespec' to appear in the <sys/stat.h> header.
++ Therefore we have to handle the use of this header in strictly
++ standard-compliant sources special. */
++ struct timespec st_atim; /* Time of last access. */
++ struct timespec st_mtim; /* Time of last modification. */
++ struct timespec st_ctim; /* Time of last status change. */
++# define st_atime st_atim.tv_sec /* Backward compatibility. */
++# define st_mtime st_mtim.tv_sec
++# define st_ctime st_ctim.tv_sec
++#else
++ __time_t st_atime; /* Time of last access. */
++ unsigned long int st_atimensec; /* Nscecs of last access. */
++ __time_t st_mtime; /* Time of last modification. */
++ unsigned long int st_mtimensec; /* Nsecs of last modification. */
++ __time_t st_ctime; /* Time of last status change. */
++ unsigned long int st_ctimensec; /* Nsecs of last status change. */
++#endif
+
+ __blksize_t st_blksize; /* Optimal size for I/O. */
+
+@@ -107,12 +121,24 @@ struct stat64
+
+ __off64_t st_size; /* Size in bytes. */
+
+- __time_t st_atime; /* Access time, seconds */
+- unsigned long int st_atime_usec; /* and microseconds. */
+- __time_t st_mtime; /* Modification time, seconds */
+- unsigned long int st_mtime_usec; /* and microseconds. */
+- __time_t st_ctime; /* Status change time, seconds */
+- unsigned long int st_ctime_usec; /* and microseconds. */
++#if defined __USE_MISC || defined __USE_XOPEN2K8
++ /* Nanosecond resolution timestamps are stored in a format
++ equivalent to 'struct timespec'. This is the type used
++ whenever possible but the Unix namespace rules do not allow the
++ identifier 'timespec' to appear in the <sys/stat.h> header.
++ Therefore we have to handle the use of this header in strictly
++ standard-compliant sources special. */
++ struct timespec st_atim; /* Time of last access. */
++ struct timespec st_mtim; /* Time of last modification. */
++ struct timespec st_ctim; /* Time of last status change. */
++#else
++ __time_t st_atime; /* Time of last access. */
++ unsigned long int st_atimensec; /* Nscecs of last access. */
++ __time_t st_mtime; /* Time of last modification. */
++ unsigned long int st_mtimensec; /* Nsecs of last modification. */
++ __time_t st_ctime; /* Time of last status change. */
++ unsigned long int st_ctimensec; /* Nsecs of last status change. */
++#endif
+
+ __blksize_t st_blksize; /* Optimal size for I/O. */
+
+@@ -130,7 +156,10 @@ struct stat64
+ };
+ #endif
+
+-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
++/* Tell code we have these members. */
++#define _STATBUF_ST_BLKSIZE
++/* Nanosecond resolution time values are supported. */
++#define _STATBUF_ST_NSEC
+
+ /* Encoding of the file mode. */
+
+diff --git a/sysdeps/mach/hurd/xstatconv.c b/sysdeps/mach/hurd/xstatconv.c
+index db704c6..ebe6471 100644
+--- a/sysdeps/mach/hurd/xstatconv.c
++++ b/sysdeps/mach/hurd/xstatconv.c
+@@ -1,5 +1,5 @@
+ /* Convert between `struct stat' format, and `struct stat64' format.
+- Copyright (C) 2000,01,02 Free Software Foundation, Inc.
++ Copyright (C) 2000-2012 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
+@@ -41,12 +41,9 @@ xstat64_conv (struct stat *buf, const struct stat64 *buf64)
+ buf->st_uid = buf64->st_uid;
+ buf->st_gid = buf64->st_gid;
+ buf->st_size = buf64->st_size;
+- buf->st_atime = buf64->st_atime;
+- buf->st_atime_usec = buf64->st_atime_usec;
+- buf->st_mtime = buf64->st_mtime;
+- buf->st_mtime_usec = buf64->st_mtime_usec;
+- buf->st_ctime = buf64->st_ctime;
+- buf->st_ctime_usec = buf64->st_ctime_usec;
++ buf->st_atim = buf64->st_atim;
++ buf->st_mtim = buf64->st_mtim;
++ buf->st_ctim = buf64->st_ctim;
+ buf->st_blksize = buf64->st_blksize;
+ buf->st_blocks = buf64->st_blocks;
+ buf->st_author = buf64->st_author;
Modified: glibc-package/trunk/debian/patches/hurd-i386/local-select.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/local-select.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/local-select.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -9,8 +9,8 @@
+++ b/hurd/hurdselect.c 2011-12-08 01:45:16.230596929 +0100
@@ -85,6 +85,8 @@
- to = timeout->tv_sec * 1000 +
- (timeout->tv_nsec + 999999) / 1000000;
+ to = (timeout->tv_sec * 1000
+ (timeout->tv_nsec + 999999) / 1000000);
+ if (strcmp(program_invocation_short_name, "vi") && strcmp(program_invocation_short_name, "vim") && strcmp(program_invocation_short_name, "vimdiff") && !to)
+ to = 1;
}
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-IPV6_PKTINFO.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-IPV6_PKTINFO.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-IPV6_PKTINFO.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,36 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Add more ipv6 macros.
-
-http://www.sourceware.org/bugzilla/show_bug.cgi?id=3906
-
----
- bits/in.h | 7 ++++---
- 1 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/bits/in.h b/bits/in.h
-index 4687a29..d2d123c 100644
---- a/bits/in.h
-+++ b/bits/in.h
-@@ -50,7 +50,7 @@ struct ip_opts
-
- /* IPV6 socket options. */
- #define IPV6_ADDRFORM 1
--#define IPV6_RXINFO 2
-+#define IPV6_PKTINFO 2
- #define IPV6_HOPOPTS 3
- #define IPV6_DSTOPTS 4
- #define IPV6_RTHDR 5
-@@ -58,8 +58,9 @@ struct ip_opts
- #define IPV6_CHECKSUM 7
- #define IPV6_HOPLIMIT 8
-
--#define IPV6_TXINFO IPV6_RXINFO
--#define SCM_SRCINFO IPV6_TXINFO
-+#define IPV6_RXINFO IPV6_PKTINFO
-+#define IPV6_TXINFO IPV6_PKTINFO
-+#define SCM_SRCINFO IPV6_PKTINFO
- #define SCM_SRCRT IPV6_RXSRCRT
-
- #define IPV6_UNICAST_HOPS 16
---
-tg: (0234227..) t/IPV6_PKTINFO (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-SOL_IP.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-SOL_IP.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-SOL_IP.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,41 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Add SOL_IP, SOL_IPV6, SOL_ICMPV6
-
-The patch below defines the SOL_IP, SOL_IPV6 and SOL_ICMPV6 macros for
-socket options.
-
-2009-09-28 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * bits/in.h (SOL_IP, SOL_IPV6, SOL_ICMPV6): New macros.
-
----
- bits/in.h | 7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
-
-diff --git a/bits/in.h b/bits/in.h
-index 4687a29..4b22e92 100644
---- a/bits/in.h
-+++ b/bits/in.h
-@@ -22,6 +22,9 @@
- # error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
- #endif
-
-+/* To select the IP level. */
-+#define SOL_IP 0
-+
- /* Options for use with `getsockopt' and `setsockopt' at the IP level.
- The first word in the comment at the right is the data type used;
- "bool" means a boolean value stored in an `int'. */
-@@ -48,6 +51,10 @@ struct ip_opts
- char ip_opts[40]; /* Actually variable in size. */
- };
-
-+/* Socket level values for IPv6. */
-+#define SOL_IPV6 41
-+#define SOL_ICMPV6 58
-+
- /* IPV6 socket options. */
- #define IPV6_ADDRFORM 1
- #define IPV6_PKTINFO 2
---
-tg: (0234227..) t/SOL_IP (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-____longjmp_chk.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-____longjmp_chk.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-____longjmp_chk.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,155 +0,0 @@
-From: Thomas Schwinge <thomas@schwinge.name>
-Subject: [PATCH] ____longjmp_chk
-
-____longjmp_chk for GNU Hurd on i386.
-
----
- sysdeps/mach/hurd/i386/Makefile | 4 +
- sysdeps/mach/hurd/i386/____longjmp_chk.S | 108 +++++++++++++++++++++++++++++
- sysdeps/mach/hurd/i386/signal-defines.sym | 10 +++
- 3 files changed, 122 insertions(+), 0 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile
-index 0eef17e..5f98809 100644
---- a/sysdeps/mach/hurd/i386/Makefile
-+++ b/sysdeps/mach/hurd/i386/Makefile
-@@ -2,3 +2,7 @@ ifeq ($(subdir),misc)
- sysdep_routines += ioperm
- sysdep_headers += sys/io.h
- endif
-+
-+ifeq ($(subdir),debug)
-+gen-as-const-headers += signal-defines.sym
-+endif
-diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S
-new file mode 100644
-index 0000000..fc7ae7a
---- /dev/null
-+++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S
-@@ -0,0 +1,108 @@
-+/* Copyright (C) 2001,2004,2005,2006,2009 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. */
-+
-+#include <sysdep.h>
-+#include <jmpbuf-offsets.h>
-+#include <asm-syntax.h>
-+
-+#include <signal-defines.h>
-+/* #include <signal.h> */
-+#define SS_ONSTACK 1
-+
-+
-+ .section .rodata.str1.1,"aMS",@progbits,1
-+ .type longjmp_msg,@object
-+longjmp_msg:
-+ .string "longjmp causes uninitialized stack frame"
-+ .size longjmp_msg, .-longjmp_msg
-+
-+
-+#ifdef PIC
-+# define CALL_FAIL movl %ebx, %ecx; /* TODO: what's this mov good for? */ \
-+ cfi_register(%ebx,%ecx); \
-+ LOAD_PIC_REG (bx); \
-+ leal longjmp_msg@GOTOFF(%ebx), %eax; \
-+ call HIDDEN_JUMPTARGET(__fortify_fail)
-+#else
-+# define CALL_FAIL movl $longjmp_msg, %eax; \
-+ call HIDDEN_JUMPTARGET(__fortify_fail)
-+#endif
-+
-+
-+ .text
-+ENTRY (____longjmp_chk)
-+ movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
-+
-+ /* Save the return address now. */
-+ movl (JB_PC*4)(%ecx), %edx
-+ /* Get the stack pointer. */
-+ movl (JB_SP*4)(%ecx), %edi
-+ cfi_undefined(%edi)
-+ PTR_DEMANGLE (%edx)
-+ PTR_DEMANGLE (%edi)
-+
-+ cmpl %edi, %esp
-+ /* Jumping to a higher-address frame is always allowed. */
-+ jbe .Lok
-+
-+ /* Passing here, we're either about to do something invalid, or we're
-+ executing on an alternative signal stack. */
-+
-+ /* TODO: need locking? */
-+ /* struct hurd_sigstate * _hurd_self_sigstate (void) */
-+ call _hurd_self_sigstate
-+ /* TODO: %eax and %eax->sigaltstack are always valid? */
-+
-+ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%eax)
-+ /* Fail if SS_ONSTACK is not set. */
-+ jz .Lfail
-+
-+ movl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%eax), %ebx
-+ addl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%eax), %ebx
-+ subl %edi, %ebx
-+ cmpl (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%eax), %ebx
-+ /* TODO: comment this calculation. */
-+ jae .Lok
-+
-+.Lfail: CALL_FAIL
-+
-+.Lok: /* We add unwind information for the target here. */
-+ cfi_def_cfa(%ecx, 0)
-+ cfi_register(%eip, %edx)
-+ cfi_register(%esp, %edi)
-+ cfi_offset(%ebx, JB_BX*4)
-+ cfi_offset(%esi, JB_SI*4)
-+ cfi_offset(%edi, JB_DI*4)
-+ cfi_offset(%ebp, JB_BP*4)
-+
-+ movl 8(%esp), %eax /* Second argument is return value. */
-+ movl %edi, %esp
-+
-+ /* Restore registers. */
-+ movl (JB_BX*4)(%ecx), %ebx
-+ movl (JB_SI*4)(%ecx), %esi
-+ movl (JB_DI*4)(%ecx), %edi
-+ movl (JB_BP*4)(%ecx), %ebp
-+ cfi_restore(%ebx)
-+ cfi_restore(%esi)
-+ cfi_restore(%edi)
-+ cfi_restore(%ebp)
-+
-+ /* Jump to saved PC. */
-+ jmp *%edx
-+END (____longjmp_chk)
-diff --git a/sysdeps/mach/hurd/i386/signal-defines.sym b/sysdeps/mach/hurd/i386/signal-defines.sym
-new file mode 100644
-index 0000000..9521bd7
---- /dev/null
-+++ b/sysdeps/mach/hurd/i386/signal-defines.sym
-@@ -0,0 +1,10 @@
-+#include <hurd/signal.h>
-+#include <signal.h>
-+
-+--
-+
-+HURD_SIGSTATE__SIGALTSTACK__OFFSET offsetof(struct hurd_sigstate, sigaltstack)
-+
-+SIGALTSTACK__SS_SP__OFFSET offsetof(struct sigaltstack, ss_sp)
-+SIGALTSTACK__SS_SIZE__OFFSET offsetof(struct sigaltstack, ss_size)
-+SIGALTSTACK__SS_FLAGS__OFFSET offsetof(struct sigaltstack, ss_flags)
---
-tg: (0234227..) t/____longjmp_chk (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-catch-signal.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-catch-signal.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-catch-signal.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,56 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix signal-catching functions.
-
-2010-09-13 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Fix signal-catching functions.
-
- We need to restore the signal mask, because else the signal handling
- code will have blocked the catched signal and for instance calling
- hurd_catch_signal again would then dump core. There was also a trivial
- inverted logic.
-
- * hurd/catch-signal.c (hurd_catch_signal): Use sigsetjmp/siglongjmp
- instead of setjmp/longjmp to restore the signal mask. Call sigsetjmp
- when handler == SIG_ERR, not when handler != SIG_ERR.
-
----
-
-http://sourceware.org/ml/libc-alpha/2010-09/msg00015.html
-
- hurd/catch-signal.c | 8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/hurd/catch-signal.c b/hurd/catch-signal.c
-index 583f99e..42f490e 100644
---- a/hurd/catch-signal.c
-+++ b/hurd/catch-signal.c
-@@ -28,9 +28,9 @@ hurd_catch_signal (sigset_t sigset,
- error_t (*operate) (struct hurd_signal_preemptor *),
- sighandler_t handler)
- {
-- jmp_buf buf;
-+ sigjmp_buf buf;
- void throw (int signo, long int sigcode, struct sigcontext *scp)
-- { longjmp (buf, scp->sc_error ?: EGRATUITOUS); }
-+ { siglongjmp (buf, scp->sc_error ?: EGRATUITOUS); }
-
- struct hurd_signal_preemptor preemptor =
- {
-@@ -41,12 +41,12 @@ hurd_catch_signal (sigset_t sigset,
- struct hurd_sigstate *const ss = _hurd_self_sigstate ();
- error_t error;
-
-- if (handler == SIG_ERR)
-+ if (handler != SIG_ERR)
- /* Not our handler; don't bother saving state. */
- error = 0;
- else
- /* This returns again with nonzero value when we preempt a signal. */
-- error = setjmp (buf);
-+ error = sigsetjmp (buf, 1);
-
- if (error == 0)
- {
---
-tg: (0234227..) t/catch-signal (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-critical-sections.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-critical-sections.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-critical-sections.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,80 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Missing critical region locks.
-
-2009-01-12 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * hurd/hurd/fd.h (_hurd_fd_get): Call HURD_CRITICAL_BEGIN/
- HURD_CRITICAL_END around holding _hurd_dtable_lock.
- * sysdeps/mach/hurd/dirfd (dirfd): Likewise.
- * sysdeps/mach/hurd/opendir.c (_hurd_fd_opendir): Call
- HURD_CRITICAL_BEGIN/HURD_CRITICAL_END around holding
- d->port.lock.
-
----
-
-http://sources.redhat.com/ml/libc-alpha/2009-01/msg00030.html
-
- hurd/hurd/fd.h | 2 ++
- sysdeps/mach/hurd/dirfd.c | 3 +++
- sysdeps/mach/hurd/opendir.c | 2 ++
- 3 files changed, 7 insertions(+), 0 deletions(-)
-
-diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
-index 2473476..e1b1a5d 100644
---- a/hurd/hurd/fd.h
-+++ b/hurd/hurd/fd.h
-@@ -65,6 +65,7 @@ _hurd_fd_get (int fd)
- {
- struct hurd_fd *descriptor;
-
-+ HURD_CRITICAL_BEGIN;
- __mutex_lock (&_hurd_dtable_lock);
- if (fd < 0 || fd >= _hurd_dtablesize)
- descriptor = NULL;
-@@ -87,6 +88,7 @@ _hurd_fd_get (int fd)
- }
- }
- __mutex_unlock (&_hurd_dtable_lock);
-+ HURD_CRITICAL_END;
-
- return descriptor;
- }
-diff --git a/sysdeps/mach/hurd/dirfd.c b/sysdeps/mach/hurd/dirfd.c
-index fde13fa..be2a6a9 100644
---- a/sysdeps/mach/hurd/dirfd.c
-+++ b/sysdeps/mach/hurd/dirfd.c
-@@ -26,6 +26,8 @@ int
- dirfd (DIR *dirp)
- {
- int fd;
-+
-+ HURD_CRITICAL_BEGIN;
- __mutex_lock (&_hurd_dtable_lock);
- for (fd = 0; fd < _hurd_dtablesize; ++fd)
- if (_hurd_dtable[fd] == dirp->__fd)
-@@ -36,6 +38,7 @@ dirfd (DIR *dirp)
- fd = -1;
- }
- __mutex_unlock (&_hurd_dtable_lock);
-+ HURD_CRITICAL_END;
-
- return fd;
- }
-diff --git a/sysdeps/mach/hurd/opendir.c b/sysdeps/mach/hurd/opendir.c
-index 23e04ed..3a1b48e 100644
---- a/sysdeps/mach/hurd/opendir.c
-+++ b/sysdeps/mach/hurd/opendir.c
-@@ -51,9 +51,11 @@ _hurd_fd_opendir (struct hurd_fd *d)
- return NULL;
-
- /* Set the descriptor to close on exec. */
-+ HURD_CRITICAL_BEGIN;
- __spin_lock (&d->port.lock);
- d->flags |= FD_CLOEXEC;
- __spin_unlock (&d->port.lock);
-+ HURD_CRITICAL_END;
-
- dirp->__fd = d;
- dirp->__data = dirp->__ptr = NULL;
---
-tg: (0234227..) t/critical-sections (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-dl-sysdep.c_SHARED.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-dl-sysdep.c_SHARED.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-dl-sysdep.c_SHARED.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,61 +0,0 @@
-From: Thomas Schwinge <thomas@schwinge.name>
-Subject: [PATCH] Hurd: dl-sysdep.c: Include code only #ifdef SHARED.
-
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
----
-
-2009-01-31 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * sysdeps/mach/hurd/dl-sysdep.c: Include code only #ifdef SHARED.
-
----
-
-Earlier submission:
-<http://sourceware.org/ml/libc-alpha/2009-01/msg00037.html>.
-
-Error message:
-
- [...]/glibc.hurd.gnu-2/libc.a(dl-sysdep.o): In function `_dl_important_hwcaps':
- [...]/glibc/git/glibc.hurd/elf/../sysdeps/mach/hurd/dl-sysdep.c:653: multiple definition of `_dl_important_hwcaps'
- [...]/glibc.hurd.gnu-2/libc.a(dl-support.o):[...]/glibc/git/glibc.hurd/elf/dl-support.c:313: first defined here
- [...]/glibc.hurd.gnu-2/libc.a(dl-sysdep.o):(.data.rel.ro+0x0): multiple definition of `__libc_enable_secure'
- [...]/glibc.hurd.gnu-2/libc.a(init-first.o):(.data.rel.ro+0x0): first defined here
- [...]/glibc.hurd.gnu-2/libc.a(dl-sysdep.o): In function `use_init_port':
- [...]/glibc/git/glibc.hurd/elf/../sysdeps/mach/hurd/dl-sysdep.c:302: multiple definition of `__libc_multiple_libcs'
- [...]/glibc.hurd.gnu-2/libc.a(init-first.o):(.data+0x0): first defined here
- [...]/glibc.hurd.gnu-2/libc.a(dl-sysdep.o):(.data.rel.ro+0x8): multiple definition of `__libc_stack_end'
- [...]/glibc.hurd.gnu-2/libc.a(dl-support.o):(.data.rel.ro+0x4): first defined here
- [...]/glibc.hurd.gnu-2/libc.a(dl-sysdep.o): In function `go.11385':
- dl-sysdep.c:(.text+0xb22): undefined reference to `_dl_argc'
- dl-sysdep.c:(.text+0xbb2): undefined reference to `_dl_skip_args'
- dl-sysdep.c:(.text+0xbca): undefined reference to `_dl_skip_args'
- dl-sysdep.c:(.text+0xbfc): undefined reference to `_dl_start_user'
- collect2: ld returned 1 exit status
- make[2]: *** [[...]/glibc.hurd.gnu-2/elf/sln] Error 1
- make[2]: Leaving directory `[...]/glibc/git/glibc.hurd/elf'
-
- sysdeps/mach/hurd/dl-sysdep.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
-index 6f27874..055f8a4 100644
---- a/sysdeps/mach/hurd/dl-sysdep.c
-+++ b/sysdeps/mach/hurd/dl-sysdep.c
-@@ -18,6 +18,8 @@
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-+#ifdef SHARED
-+
- #include <hurd.h>
- #include <link.h>
- #include <unistd.h>
-@@ -669,3 +671,5 @@ _dl_init_first (int argc, ...)
- {
- /* This no-op definition only gets used if libc is not linked in. */
- }
-+
-+#endif /* SHARED */
---
-tg: (0234227..) t/dl-sysdep.c_SHARED (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-dup3-lock.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-dup3-lock.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-dup3-lock.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,56 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix __dup3 _hurd_dtable_lock usage.
-
-2009-01-12 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * sysdeps/mach/hurd/dup3.c (__dup2): Lock _hurd_dtable_lock
- before checking for _hurd_dtablesize. Unlock it right after
- having finished _hurd_dtable allocation.
-
----
-
-http://sources.redhat.com/ml/libc-alpha/2009-01/msg00030.html
-
- sysdeps/mach/hurd/dup3.c | 7 +++----
- 1 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/dup3.c b/sysdeps/mach/hurd/dup3.c
-index 178ee16..71a0a81 100644
---- a/sysdeps/mach/hurd/dup3.c
-+++ b/sysdeps/mach/hurd/dup3.c
-@@ -71,15 +71,14 @@ dup3 (int fd, int fd2, int flags)
- /* Get a hold of the destination descriptor. */
- struct hurd_fd *d2;
-
-+ __mutex_lock (&_hurd_dtable_lock);
-+
- if (fd2 >= _hurd_dtablesize)
- {
- /* The table is not large enough to hold the destination
- descriptor. Enlarge it as necessary to allocate this
- descriptor. */
- __mutex_unlock (&_hurd_dtable_lock);
-- /* We still hold FD1's lock, but this is safe because
-- _hurd_alloc_fd will only examine the cells starting
-- at FD2. */
- d2 = _hurd_alloc_fd (NULL, fd2);
- if (d2)
- __spin_unlock (&d2->port.lock);
-@@ -99,6 +98,7 @@ dup3 (int fd, int fd2, int flags)
- MACH_PORT_NULL);
- }
- }
-+ __mutex_unlock (&_hurd_dtable_lock);
-
- if (d2 == NULL)
- {
-@@ -126,7 +126,6 @@ dup3 (int fd, int fd2, int flags)
- _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */
- }
- }
-- __mutex_unlock (&_hurd_dtable_lock);
-
- _hurd_port_free (&d->port, &ulink, port);
- if (ctty != MACH_PORT_NULL)
---
-tg: (d801e4c..) tg/dup3-lock (depends on: t/dup3)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-dup3.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-dup3.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-dup3.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,320 +0,0 @@
-From: Thomas Schwinge <thomas@schwinge.name>
-Subject: [PATCH] dup3
-
-2008-12-19 Thomas Schwinge <tschwinge@gnu.org>
-
- dup3 for GNU Hurd.
- * include/unistd.h (__dup3): New hidden declaration.
- * sysdeps/mach/hurd/dup3.c: New file, copy from dup2.c. Evolve it to
- implement dup3 and do some further code clean-ups.
- * sysdeps/mach/hurd/dup2.c (__dup2): Reimplement using __dup3.
- * sysdeps/mach/hurd/kernel-features.h (__ASSUME_DUP3): Define.
-
----
- sysdeps/mach/hurd/dup2.c | 115 ++--------------------------
- sysdeps/mach/hurd/dup3.c | 140 +++++++++++++++++++++++++++++++++++
- sysdeps/mach/hurd/kernel-features.h | 3 +-
- 3 files changed, 151 insertions(+), 107 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/dup2.c b/sysdeps/mach/hurd/dup2.c
-index 3abd30c..c837305 100644
---- a/sysdeps/mach/hurd/dup2.c
-+++ b/sysdeps/mach/hurd/dup2.c
-@@ -1,4 +1,6 @@
--/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 Free Software Foundation, Inc.
-+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1997, 2002, 2008 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
-@@ -16,119 +18,20 @@
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
--#include <errno.h>
--#include <fcntl.h>
- #include <unistd.h>
--#include <hurd.h>
--#include <hurd/fd.h>
-
- /* Duplicate FD to FD2, closing the old FD2 and making FD2 be
- open on the same file as FD is. Return FD2 or -1. */
- int
--__dup2 (fd, fd2)
-- int fd;
-- int fd2;
-+__dup2 (int fd, int fd2)
- {
-- struct hurd_fd *d;
--
-- /* Extract the ports and flags from FD. */
-- d = _hurd_fd_get (fd);
-- if (d == NULL)
-- {
-- errno = EBADF;
-- return -1;
-- }
--
-- HURD_CRITICAL_BEGIN;
--
-- __spin_lock (&d->port.lock);
-- if (d->port.port == MACH_PORT_NULL)
-- {
-- __spin_unlock (&d->port.lock);
-- errno = EBADF;
-- fd2 = -1;
-- }
-- else if (fd2 == fd)
-- /* FD is valid and FD2 is already the same; just return it. */
-- __spin_unlock (&d->port.lock);
-- else
-- {
-- struct hurd_userlink ulink, ctty_ulink;
-- int flags = d->flags;
-- io_t ctty = _hurd_port_get (&d->ctty, &ctty_ulink);
-- io_t port = _hurd_port_locked_get (&d->port, &ulink); /* Unlocks D. */
--
-- if (fd2 < 0)
-- {
-- errno = EBADF;
-- fd2 = -1;
-- }
-- else
-- {
-- /* Get a hold of the destination descriptor. */
-- struct hurd_fd *d2;
--
-- if (fd2 >= _hurd_dtablesize)
-- {
-- /* The table is not large enough to hold the destination
-- descriptor. Enlarge it as necessary to allocate this
-- descriptor. */
-- __mutex_unlock (&_hurd_dtable_lock);
-- /* We still hold FD1's lock, but this is safe because
-- _hurd_alloc_fd will only examine the cells starting
-- at FD2. */
-- d2 = _hurd_alloc_fd (NULL, fd2);
-- if (d2)
-- __spin_unlock (&d2->port.lock);
-- __mutex_lock (&_hurd_dtable_lock);
-- }
-- else
-- {
-- d2 = _hurd_dtable[fd2];
-- if (d2 == NULL)
-- {
-- /* Must allocate a new one. We don't initialize the port
-- cells with this call so that if it fails (out of
-- memory), we will not have already added user
-- references for the ports, which we would then have to
-- deallocate. */
-- d2 = _hurd_dtable[fd2] = _hurd_new_fd (MACH_PORT_NULL,
-- MACH_PORT_NULL);
-- }
-- }
--
-- if (d2 == NULL)
-- {
-- fd2 = -1;
-- if (errno == EINVAL)
-- errno = EBADF; /* POSIX.1-1990 6.2.1.2 ll 54-55. */
-- }
-- else
-- {
-- /* Give the ports each a user ref for the new descriptor. */
-- __mach_port_mod_refs (__mach_task_self (), port,
-- MACH_PORT_RIGHT_SEND, 1);
-- if (ctty != MACH_PORT_NULL)
-- __mach_port_mod_refs (__mach_task_self (), ctty,
-- MACH_PORT_RIGHT_SEND, 1);
--
-- /* Install the ports and flags in the new descriptor slot. */
-- __spin_lock (&d2->port.lock);
-- d2->flags = flags & ~FD_CLOEXEC; /* Dup clears FD_CLOEXEC. */
-- _hurd_port_set (&d2->ctty, ctty);
-- _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */
-- }
-- }
-- __mutex_unlock (&_hurd_dtable_lock);
--
-- _hurd_port_free (&d->port, &ulink, port);
-- if (ctty != MACH_PORT_NULL)
-- _hurd_port_free (&d->ctty, &ctty_ulink, port);
-- }
-+ int flags = 0;
-
-- HURD_CRITICAL_END;
-+ if (fd2 == fd)
-+ /* See the comment in dup3. */
-+ flags = -1;
-
-- return fd2;
-+ return dup3 (fd, fd2, flags);
- }
- libc_hidden_def (__dup2)
- weak_alias (__dup2, dup2)
-diff --git a/sysdeps/mach/hurd/dup3.c b/sysdeps/mach/hurd/dup3.c
-new file mode 100644
-index 0000000..178ee16
---- /dev/null
-+++ b/sysdeps/mach/hurd/dup3.c
-@@ -0,0 +1,140 @@
-+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1997, 2002, 2008 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. */
-+
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <hurd.h>
-+#include <hurd/fd.h>
-+
-+/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
-+ open on the same file as FD is, and setting FD2's flags according to FLAGS.
-+ Return FD2 or -1. */
-+int
-+dup3 (int fd, int fd2, int flags)
-+{
-+ struct hurd_fd *d;
-+
-+ /* Both passing flags different from O_CLOEXEC and FD2 being the same as FD
-+ are invalid. */
-+ if ((flags & ~O_CLOEXEC
-+ || fd2 == fd)
-+ /* ... with the exception in case that dup2 behavior is requested: if FD
-+ is valid and FD2 is already the same then just return it. */
-+ && ! (flags == -1
-+ && fd2 == fd))
-+ return __hurd_fail (EINVAL);
-+
-+ /* Extract the ports and flags from FD. */
-+ d = _hurd_fd_get (fd);
-+ if (d == NULL)
-+ return __hurd_fail (EBADF);
-+
-+ HURD_CRITICAL_BEGIN;
-+
-+ __spin_lock (&d->port.lock);
-+ if (d->port.port == MACH_PORT_NULL)
-+ {
-+ __spin_unlock (&d->port.lock);
-+ fd2 = __hurd_fail (EBADF);
-+ }
-+ else if (fd2 == fd)
-+ __spin_unlock (&d->port.lock);
-+ else
-+ {
-+ struct hurd_userlink ulink, ctty_ulink;
-+ int d_flags = d->flags;
-+ io_t ctty = _hurd_port_get (&d->ctty, &ctty_ulink);
-+ io_t port = _hurd_port_locked_get (&d->port, &ulink); /* Unlocks D. */
-+
-+ if (fd2 < 0)
-+ fd2 = __hurd_fail (EBADF);
-+ else
-+ {
-+ /* Get a hold of the destination descriptor. */
-+ struct hurd_fd *d2;
-+
-+ if (fd2 >= _hurd_dtablesize)
-+ {
-+ /* The table is not large enough to hold the destination
-+ descriptor. Enlarge it as necessary to allocate this
-+ descriptor. */
-+ __mutex_unlock (&_hurd_dtable_lock);
-+ /* We still hold FD1's lock, but this is safe because
-+ _hurd_alloc_fd will only examine the cells starting
-+ at FD2. */
-+ d2 = _hurd_alloc_fd (NULL, fd2);
-+ if (d2)
-+ __spin_unlock (&d2->port.lock);
-+ __mutex_lock (&_hurd_dtable_lock);
-+ }
-+ else
-+ {
-+ d2 = _hurd_dtable[fd2];
-+ if (d2 == NULL)
-+ {
-+ /* Must allocate a new one. We don't initialize the port
-+ cells with this call so that if it fails (out of
-+ memory), we will not have already added user
-+ references for the ports, which we would then have to
-+ deallocate. */
-+ d2 = _hurd_dtable[fd2] = _hurd_new_fd (MACH_PORT_NULL,
-+ MACH_PORT_NULL);
-+ }
-+ }
-+
-+ if (d2 == NULL)
-+ {
-+ fd2 = -1;
-+ if (errno == EINVAL)
-+ errno = EBADF; /* POSIX.1-1990 6.2.1.2 ll 54-55. */
-+ }
-+ else
-+ {
-+ /* Give the ports each a user ref for the new descriptor. */
-+ __mach_port_mod_refs (__mach_task_self (), port,
-+ MACH_PORT_RIGHT_SEND, 1);
-+ if (ctty != MACH_PORT_NULL)
-+ __mach_port_mod_refs (__mach_task_self (), ctty,
-+ MACH_PORT_RIGHT_SEND, 1);
-+
-+ /* Install the ports and flags in the new descriptor slot. */
-+ __spin_lock (&d2->port.lock);
-+ if (flags & O_CLOEXEC)
-+ d2->flags = d_flags | FD_CLOEXEC;
-+ else
-+ /* dup clears FD_CLOEXEC. */
-+ d2->flags = d_flags & ~FD_CLOEXEC;
-+ _hurd_port_set (&d2->ctty, ctty);
-+ _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */
-+ }
-+ }
-+ __mutex_unlock (&_hurd_dtable_lock);
-+
-+ _hurd_port_free (&d->port, &ulink, port);
-+ if (ctty != MACH_PORT_NULL)
-+ _hurd_port_free (&d->ctty, &ctty_ulink, port);
-+ }
-+
-+ HURD_CRITICAL_END;
-+
-+ return fd2;
-+}
-+libc_hidden_def (dup3)
-diff --git a/sysdeps/mach/hurd/kernel-features.h b/sysdeps/mach/hurd/kernel-features.h
-index ad159aa..7eb7ea7 100644
---- a/sysdeps/mach/hurd/kernel-features.h
-+++ b/sysdeps/mach/hurd/kernel-features.h
-@@ -1,5 +1,5 @@
- /* Set flags signalling availability of certain operating system features.
-- Copyright (C) 2007 Free Software Foundation, Inc.
-+ Copyright (C) 2007, 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
-@@ -29,3 +29,4 @@
- #ifdef O_CLOEXEC
- # define __ASSUME_O_CLOEXEC 1
- #endif
-+#define __ASSUME_DUP3 1
---
-tg: (0234227..) t/dup3 (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-hurd-recvfrom.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-hurd-recvfrom.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-hurd-recvfrom.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,44 +0,0 @@
-From: Pino Toscano <toscano.pino@tiscali.it>
-Subject: [PATCH] recvfrom(): take into account null address ports
-
-Some kinds of sockets may return a null address port when calling the
-`socket_recv' RPC, so avoid using it in case an address argument buffer is
-asked to be filled. In such case, set the length of that address buffer to
-zero.
-
-2011-11-26 Pino Toscano <toscano.pino@tiscali.it>
-
- * sysdeps/mach/hurd/recvfrom.c (__recvfrom): Check also for a null
- address port. Set `addr_len' to 0 when not filling `addrarg'.
-
----
-
-http://cygwin.com/ml/libc-alpha/2011-11/msg00089.html
-
- sysdeps/mach/hurd/recvfrom.c | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/recvfrom.c b/sysdeps/mach/hurd/recvfrom.c
-index 2aca570..94de4e7 100644
---- a/sysdeps/mach/hurd/recvfrom.c
-+++ b/sysdeps/mach/hurd/recvfrom.c
-@@ -55,7 +55,7 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
- return __hurd_sockfail (fd, flags, err);
-
- /* Get address data for the returned address port if requested. */
-- if (addr != NULL)
-+ if (addr != NULL && addrport != MACH_PORT_NULL)
- {
- char *buf = (char *) addr;
- mach_msg_type_number_t buflen = *addr_len;
-@@ -89,6 +89,8 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
- if (buflen > 0)
- addr->sa_family = type;
- }
-+ else if (addr_len != NULL)
-+ *addr_len = 0;
-
- __mach_port_deallocate (__mach_task_self (), addrport);
-
---
-tg: (0234227..) t/recvfrom (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-hurd_socket_server_indexcheck.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-hurd_socket_server_indexcheck.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-hurd_socket_server_indexcheck.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,38 +0,0 @@
-From: Pino Toscano <toscano.pino@tiscali.it>
-Subject: [PATCH] hurdsock: reject negative domains
-
-Reject negative socket domains right away; otherwise, it is possible to read
-and set out-of-bounds locations of the `servers' array (returning the values
-at those invalid memory locations), and even try to deallocate ports with
-random values if the `dead' parameter is different than zero.
-
-2011-11-21 Pino Toscano <toscano.pino@tiscali.it>
-
- * hurd/hurdsock.c (_hurd_socket_server): Check for negative domains,
- and reject them.
-
----
-http://cygwin.com/ml/libc-alpha/2011-11/msg00076.html
-
- hurd/hurdsock.c | 6 ++++++
- 1 files changed, 6 insertions(+), 0 deletions(-)
-
-diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c
-index a01b8aa..f2817e3 100644
---- a/hurd/hurdsock.c
-+++ b/hurd/hurdsock.c
-@@ -47,6 +47,12 @@ _hurd_socket_server (int domain, int dead)
- {
- socket_t server;
-
-+ if (domain < 0)
-+ {
-+ errno = EAFNOSUPPORT;
-+ return MACH_PORT_NULL;
-+ }
-+
- HURD_CRITICAL_BEGIN;
- __mutex_lock (&lock);
-
---
-tg: (0234227..) t/socket_server_indexcheck (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-ioctl-decode-argument.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-ioctl-decode-argument.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-ioctl-decode-argument.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,74 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] ioctl() incorrectly decodes argument
-
-2005-07-28 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * ioctl.c (__ioctl): Add handling of parameter-less ioctls.
-
-2005-07-28 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * ioctls.h (_IOIW): New macro for immediate-write ioctls.
-
----
-http://www.sourceware.org/bugzilla/show_bug.cgi?id=766
-
- sysdeps/mach/hurd/ioctl.c | 16 ++++++++++------
- sysdeps/mach/hurd/bits/ioctls.h | 1 +
- 2 files changed, 11 insertions(+), 6 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
-index bcc78bc..769eb68 100644
---- a/sysdeps/mach/hurd/ioctl.c
-+++ b/sysdeps/mach/hurd/ioctl.c
-@@ -89,7 +89,7 @@ __ioctl (int fd, unsigned long int request, ...)
- void *p;
- #endif
-
-- void *arg;
-+ void *arg = NULL;
-
- error_t err;
-
-@@ -140,7 +140,7 @@ __ioctl (int fd, unsigned long int request, ...)
- in (_IOT_COUNT1 (type), _IOT_TYPE1 (type));
- in (_IOT_COUNT2 (type), _IOT_TYPE2 (type));
- }
-- else if (_IOC_INOUT (request) == IOC_VOID)
-+ else if ((_IOC_INOUT (request) == IOC_VOID) && _IOT_COUNT0 (type))
- {
- /* The RPC takes a single integer_t argument.
- Rather than pointing to the value, ARG is the value itself. */
-@@ -209,11 +209,15 @@ __ioctl (int fd, unsigned long int request, ...)
- return msg.header.RetCode;
- }
-
-- va_list ap;
-+ if (_IOT_COUNT0 (type))
-+ {
-+ /* Data need either be sent, received, or even both. */
-+ va_list ap;
-
-- va_start (ap, request);
-- arg = va_arg (ap, void *);
-- va_end (ap);
-+ va_start (ap, request);
-+ arg = va_arg (ap, void *);
-+ va_end (ap);
-+ }
-
- {
- /* Check for a registered handler for REQUEST. */
-diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h
-index 8718aac..d35e272 100644
---- a/sysdeps/mach/hurd/bits/ioctls.h
-+++ b/sysdeps/mach/hurd/bits/ioctls.h
-@@ -158,6 +158,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
- _IOT_foobar is defined either in this file,
- or where struct foobar is defined. */
- #define _IO(g, n) _IOC (IOC_VOID, (g), (n), 0)
-+#define _IOIW(g, n, t) _IOC (IOC_VOID, (g), (n), _IOC_ENCODE_TYPE (t))
- #define _IOR(g, n, t) _IOC (IOC_OUT, (g), (n), _IOC_ENCODE_TYPE (t))
- #define _IOW(g, n, t) _IOC (IOC_IN, (g), (n), _IOC_ENCODE_TYPE (t))
- #define _IOWR(g, n, t) _IOC (IOC_INOUT, (g), (n), _IOC_ENCODE_TYPE (t))
---
-tg: (0234227..) t/ioctl_decode_argument (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-itimer-lock.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-itimer-lock.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-itimer-lock.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,32 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] setitimer.c: Fix unlock in error patch
-
-In some error path, setitimer_locked would not perform unlocking, here
-is a patch.
-
-2009-02-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * sysdeps/mach/hurd/setitimer.c (setitimer_locked): Use common exit path
- instead of returning without unlocking.
-
----
-http://sourceware.org/ml/libc-alpha/2009-02/msg00003.html
-
- sysdeps/mach/hurd/setitimer.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c
-index fec64a8..7de968d 100644
---- a/sysdeps/mach/hurd/setitimer.c
-+++ b/sysdeps/mach/hurd/setitimer.c
-@@ -220,7 +220,7 @@ setitimer_locked (const struct itimerval *new, struct itimerval *old,
- /* Start up the itimer thread running `timer_thread' (below). */
- if (err = __thread_create (__mach_task_self (),
- &_hurd_itimer_thread))
-- return __hurd_fail (err);
-+ goto out;
- _hurd_itimer_thread_stack_base = 0; /* Anywhere. */
- _hurd_itimer_thread_stack_size = __vm_page_size; /* Small stack. */
- if (err = __mach_setup_thread (__mach_task_self (),
---
-tg: (0234227..) t/itimer-lock (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-libc_stack_end.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-libc_stack_end.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-libc_stack_end.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,70 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix value of __libc_stack_end
-
-When using some libthread, we need to update the value of __libc_stack_end
-to what the libthread allocated. This requires making __libc_stack_end
-non-relro to be able to modify it.
-
-2011-08-24 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
-* sysdeps/generic/ldsodefs.h [LIBC_STACK_END_NOT_RELRO] (__libc_stack_end): Do
-not use attribute_relro.
-* sysdeps/mach/hurd/dl-sysdep.h (LIBC_STACK_END_NOT_RELRO): Define.
-* sysdeps/mach/hurd/i386/init-first.c (init): Update __libc_stack_end to
-libthread-provided value.
-* sysdeps/mach/hurd/dl-sysdep.c (__libc_stack_end): Do not use attribute_relro.
-
----
-http://www.cygwin.com/ml/libc-alpha/2011-08/msg00124.html
-
- sysdeps/generic/ldsodefs.h | 6 +++++-
- sysdeps/mach/hurd/dl-sysdep.h | 3 ++-
- sysdeps/mach/hurd/i386/init-first.c | 2 ++
- 3 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
-index b24bff3..804d9ee 100644
---- a/sysdeps/generic/ldsodefs.h
-+++ b/sysdeps/generic/ldsodefs.h
-@@ -724,7 +724,11 @@ rtld_hidden_proto (_dl_make_stack_executable)
- might use the variable which results in copy relocations on some
- platforms. But this does not matter, ld.so can always use the local
- copy. */
--extern void *__libc_stack_end attribute_relro;
-+extern void *__libc_stack_end
-+#ifndef LIBC_STACK_END_NOT_RELRO
-+ attribute_relro
-+#endif
-+ ;
- rtld_hidden_proto (__libc_stack_end)
-
- /* Parameters passed to the dynamic linker. */
-diff --git a/sysdeps/mach/hurd/dl-sysdep.h b/sysdeps/mach/hurd/dl-sysdep.h
-index 4b21b77..5b86fec 100644
---- a/sysdeps/mach/hurd/dl-sysdep.h
-+++ b/sysdeps/mach/hurd/dl-sysdep.h
-@@ -25,7 +25,8 @@
- #define RTLD_PRIVATE_ERRNO 0
-
- #ifdef SHARED
--/* _dl_argv cannot be attribute_relro, because the stack-switching
-+/* _dl_argv and __libc_stack_end cannot be attribute_relro, because the stack-switching
- libc initializer for using cthreads might write into it. */
- # define DL_ARGV_NOT_RELRO 1
-+# define LIBC_STACK_END_NOT_RELRO 1
- #endif
-diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
-index 60823bd..9e5b723 100644
---- a/sysdeps/mach/hurd/i386/init-first.c
-+++ b/sysdeps/mach/hurd/i386/init-first.c
-@@ -212,6 +212,8 @@ init (int *data)
-
- void switch_stacks (void);
-
-+ __libc_stack_end = newsp;
-+
- /* Copy per-thread variables from that temporary
- area onto the new cthread stack. */
- memcpy (__hurd_threadvar_location_from_sp (0, newsp),
---
-tg: (0234227..) t/libc_stack_end (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-mach-nanosleep.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-mach-nanosleep.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-mach-nanosleep.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,49 +0,0 @@
-From: Pino Toscano <toscano.pino@tiscali.it>
-Subject: [PATCH] nanosleep: check for invalid parameter values
-
-mach: nanosleep: check for invalid parameter values
-
-Check for invalid values of the `requested_time' parameters; move the
-calculation of `ms' after the validation of `requested_time'.
-
-2011-12-10 Pino Toscano <toscano.pino@tiscali.it>
-
- * sysdeps/mach/nanosleep.c (__nanosleep): Return EINVAL for negative
- seconds or nanoseconds of `requested_time', or for nanoseconds equal
- or greater than 1000000000.
-
----
-http://cygwin.com/ml/libc-alpha/2011-12/msg00020.html
-
- sysdeps/mach/nanosleep.c | 14 +++++++++++---
- 1 files changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/sysdeps/mach/nanosleep.c b/sysdeps/mach/nanosleep.c
-index e433adb..124af98 100644
---- a/sysdeps/mach/nanosleep.c
-+++ b/sysdeps/mach/nanosleep.c
-@@ -28,11 +28,19 @@ __nanosleep (const struct timespec *requested_time,
- {
- mach_port_t recv;
- struct timeval before, after;
-- const mach_msg_timeout_t ms
-- = requested_time->tv_sec * 1000
-- + (requested_time->tv_nsec + 999999) / 1000000;
-+ mach_msg_timeout_t ms;
-+
-+ if (requested_time->tv_sec < 0
-+ || requested_time->tv_nsec < 0
-+ || requested_time->tv_nsec >= 1000000000)
-+ {
-+ errno = EINVAL;
-+ return -1;
-+ }
-
- recv = __mach_reply_port ();
-+ ms = requested_time->tv_sec * 1000
-+ + (requested_time->tv_nsec + 999999) / 1000000;
-
- if (remaining && __gettimeofday (&before, NULL) < 0)
- return -1;
---
-tg: (0234227..) t/mach-nanosleep (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-mkdir_root.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-mkdir_root.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-mkdir_root.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,64 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix mkdir / error value
-
-(needed for busybox's mkdir -p)
-
-In the / case, directory_name_split can't really split that into an
-absolute ROOT file_t and ".", since name is supposed to be a pointer in
-file_name... Changing the interface is being proposed.
-
----
- sysdeps/mach/hurd/mkdir.c | 6 +++++-
- sysdeps/mach/hurd/mkdirat.c | 6 +++++-
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/mkdir.c b/sysdeps/mach/hurd/mkdir.c
-index b7e8074..cf6dda3 100644
---- a/sysdeps/mach/hurd/mkdir.c
-+++ b/sysdeps/mach/hurd/mkdir.c
-@@ -20,6 +20,7 @@
- #include <stddef.h>
- #include <sys/stat.h>
- #include <hurd.h>
-+#include <string.h>
-
- /* Create a directory named FILE_NAME with protections MODE. */
- int
-@@ -29,7 +30,10 @@ __mkdir (file_name, mode)
- {
- error_t err;
- const char *name;
-- file_t parent = __directory_name_split (file_name, (char **) &name);
-+ file_t parent;
-+ if (!strcmp(file_name, "/"))
-+ return EEXIST;
-+ parent = __directory_name_split (file_name, (char **) &name);
- if (parent == MACH_PORT_NULL)
- return -1;
- err = __dir_mkdir (parent, name, mode & ~_hurd_umask);
-diff --git a/sysdeps/mach/hurd/mkdirat.c b/sysdeps/mach/hurd/mkdirat.c
-index a300745..8256ef8 100644
---- a/sysdeps/mach/hurd/mkdirat.c
-+++ b/sysdeps/mach/hurd/mkdirat.c
-@@ -23,6 +23,7 @@
- #include <sys/stat.h>
- #include <hurd.h>
- #include <hurd/fd.h>
-+#include <string.h>
-
- int
- mkdirat (fd, path, mode)
-@@ -32,7 +33,10 @@ mkdirat (fd, path, mode)
- {
- error_t err;
- const char *name;
-- file_t parent = __directory_name_split_at (fd, path, (char **) &name);
-+ file_t parent;
-+ if (!strcmp(path, "/"))
-+ return EEXIST;
-+ parent = __directory_name_split_at (fd, path, (char **) &name);
- if (parent == MACH_PORT_NULL)
- return -1;
- err = __dir_mkdir (parent, name, mode & ~_hurd_umask);
---
-tg: (0234227..) t/mkdir_root (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-mlock.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-mlock.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-mlock.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,29 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix mlock() in all cases except non-readable pages.
-
-2006-01-18 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Fix mlock() in all cases except non-readable pages.
-
- * glibc/sysdeps/mach/hurd/mlock.c (mlock): Give VM_PROT_READ
- instead of VM_PROT_ALL as parameter to __vm_wire function.
-
----
- sysdeps/mach/hurd/mlock.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/mlock.c b/sysdeps/mach/hurd/mlock.c
-index bb96c9c..ef81efa 100644
---- a/sysdeps/mach/hurd/mlock.c
-+++ b/sysdeps/mach/hurd/mlock.c
-@@ -40,7 +40,7 @@ mlock (const void *addr, size_t len)
- page = trunc_page ((vm_address_t) addr);
- len = round_page ((vm_address_t) addr + len) - page;
- err = __vm_wire (hostpriv, __mach_task_self (), page, len,
-- VM_PROT_ALL); /* XXX ? */
-+ VM_PROT_READ);
- __mach_port_deallocate (__mach_task_self (), hostpriv);
-
- return err ? __hurd_fail (err) : 0;
---
-tg: (0234227..) t/mlock (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-null-pathname.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-null-pathname.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-null-pathname.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,56 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] null pathnames shall return ENOENT
-
-Here is a patch to fix chdir("") and chroot("") into returning ENOENT as
-required by POSIX.
-
-2009-09-13 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * hurd/hurdchdir.c (_hurd_change_directory_port_from_name):
- Return ENOENT when name is empty.
- * sysdeps/mach/hurd/chroot.c (chroot): Return ENOENT when path
- is empty.
-
----
-http://sources.redhat.com/ml/libc-alpha/2009-09/msg00025.html
-
- hurd/hurdchdir.c | 6 ++++++
- sysdeps/mach/hurd/chroot.c | 6 ++++++
- 2 files changed, 12 insertions(+), 0 deletions(-)
-
-diff --git a/hurd/hurdchdir.c b/hurd/hurdchdir.c
-index 5115e4d..b1cc7a5 100644
---- a/hurd/hurdchdir.c
-+++ b/hurd/hurdchdir.c
-@@ -38,6 +38,12 @@ _hurd_change_directory_port_from_name (struct hurd_port *portcell,
- len = strlen (name);
- if (len >= 2 && name[len - 2] == '/' && name[len - 1] == '.')
- lookup = name;
-+ else if (len == 0)
-+ {
-+ /* Special-case null pathname according to POSIX */
-+ errno = ENOENT;
-+ return -1;
-+ }
- else
- {
- char *n = alloca (len + 3);
-diff --git a/sysdeps/mach/hurd/chroot.c b/sysdeps/mach/hurd/chroot.c
-index fde0164..cabeb7d 100644
---- a/sysdeps/mach/hurd/chroot.c
-+++ b/sysdeps/mach/hurd/chroot.c
-@@ -38,6 +38,12 @@ chroot (const char *path)
- len = strlen (path);
- if (len >= 2 && path[len - 2] == '/' && path[len - 1] == '.')
- lookup = path;
-+ else if (len == 0)
-+ {
-+ /* Special-case null pathname according to POSIX */
-+ errno = ENOENT;
-+ return -1;
-+ }
- else
- {
- char *n = alloca (len + 3);
---
-tg: (0234227..) t/null-pathname (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-posix2008.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-posix2008.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-posix2008.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,80 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix POSIX 2008 visibility
-
-Here are a few POSIX 2008 visibility updates, to align the core & hurd
-with the Linux headers.
-
-Samuel
-
-
-2011-12-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * bits/sigaction.h [__USE_XOPEN2K8]: Define SA_RESTART,
- SA_NODEFER, SA_RESETHAND.
- * sysdeps/mach/hurd/bits/fcntl.h [__USE_XOPEN2K8]: Define
- O_NOFOLLOW, O_DIRECTORY, O_CLOEXEC, F_GETOWN, F_SETOWN,
- F_DUPFD_CLOEXEC.
-
----
-http://cygwin.com/ml/libc-alpha/2011-12/msg00005.html
-
- bits/sigaction.h | 2 ++
- sysdeps/mach/hurd/bits/fcntl.h | 8 +++++---
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/bits/sigaction.h b/bits/sigaction.h
-index adcc276..97242a6 100644
---- a/bits/sigaction.h
-+++ b/bits/sigaction.h
-@@ -55,6 +55,8 @@ struct sigaction
- /* Bits in `sa_flags'. */
- #if defined __USE_UNIX98 || defined __USE_MISC
- # define SA_ONSTACK 0x0001 /* Take signal on signal stack. */
-+#endif
-+#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
- # define SA_RESTART 0x0002 /* Restart syscall on signal return. */
- # define SA_NODEFER 0x0010 /* Don't automatically block the signal when
- its handler is being executed. */
-diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
-index b4147ce..74cf913 100644
---- a/sysdeps/mach/hurd/bits/fcntl.h
-+++ b/sysdeps/mach/hurd/bits/fcntl.h
-@@ -55,7 +55,9 @@
- #ifdef __USE_GNU
- # define O_NOLINK 0x0040 /* No name mappings on final component. */
- # define O_NOTRANS 0x0080 /* No translator on final component. */
-+#endif
-
-+#ifdef __USE_XOPEN2K8
- # define O_NOFOLLOW 0x00100000 /* Produce ENOENT if file is a symlink. */
- # define O_DIRECTORY 0x00200000 /* Produce ENOTDIR if not a directory. */
- #endif
-@@ -119,7 +121,7 @@
- once the file has been opened. */
-
- #define O_TRUNC 0x00010000 /* Truncate file to zero length. */
--#ifdef __USE_GNU
-+#ifdef __USE_XOPEN2K8
- # define O_CLOEXEC 0x00400000 /* Set FD_CLOEXEC. */
- #endif
-
-@@ -159,7 +161,7 @@
- #define F_SETFD 2 /* Set file descriptor flags. */
- #define F_GETFL 3 /* Get file status flags. */
- #define F_SETFL 4 /* Set file status flags. */
--#if defined __USE_BSD || defined __USE_UNIX98
-+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
- # define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
- # define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
- #endif
-@@ -167,7 +169,7 @@
- #define F_SETLK 8 /* Set record locking info (non-blocking). */
- #define F_SETLKW 9 /* Set record locking info (blocking). */
-
--#ifdef __USE_GNU
-+#ifdef __USE_XOPEN2K8
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate, set FD_CLOEXEC on new one. */
- #endif
-
---
-tg: (0234227..) t/posix2008 (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-posix_opt.h.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-posix_opt.h.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-posix_opt.h.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,134 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Update posix_opt.h
-
-The patch below brings Hurd's posix_opt.h up to date with newer standard
-macros.
-
-2010-01-10 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * posix/tst-sysconf.c (posix_options): Only use
- _POSIX_PRIORITIZED_IO, _POSIX_PRIORITY_SCHEDULING, and
- _POSIX_SYNCHRONIZED_IO when they are defined
- * sysdeps/mach/hurd/bits/posix_opt.h:
- (_POSIX_PRIORITY_SCHEDULING): Undefine macro.
- (_XOPEN_REALTIME): Undefine macro.
- (_XOPEN_REALTIME_THREADS): Undefine macro.
- (_XOPEN_SHM): Undefine macro.
- [__USE_XOPEN2K8] (_POSIX_THREAD_ROBUST_PRIO_INHERIT): Define
- macro to -1.
- [__USE_XOPEN2K8] (_POSIX_THREAD_ROBUST_PRIO_PROTECT): Define
- macro to -1.
- (_POSIX_ASYNC_IO): Undefine macro.
- (_POSIX_PRIORITIZED_IO): Undefine macro.
- (_POSIX_SPIN_LOCKS): Define macro to -1.
-
----
-http://cygwin.com/ml/libc-alpha/2010-01/msg00012.html
-
- posix/tst-sysconf.c | 6 ++++++
- sysdeps/mach/hurd/bits/posix_opt.h | 28 +++++++++++++++++++++++-----
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/posix/tst-sysconf.c b/posix/tst-sysconf.c
-index e297229..105c7c2 100644
---- a/posix/tst-sysconf.c
-+++ b/posix/tst-sysconf.c
-@@ -29,8 +29,12 @@ static struct
- N (MEMORY_PROTECTION),
- N (MESSAGE_PASSING),
- N (MONOTONIC_CLOCK),
-+#ifdef _POSIX_PRIORITIZED_IO
- N (PRIORITIZED_IO),
-+#endif
-+#ifdef _POSIX_PRIORITY_SCHEDULING
- N (PRIORITY_SCHEDULING),
-+#endif
- N (RAW_SOCKETS),
- N (READER_WRITER_LOCKS),
- N (REALTIME_SIGNALS),
-@@ -42,7 +46,9 @@ static struct
- N (SPAWN),
- N (SPIN_LOCKS),
- N (SPORADIC_SERVER),
-+#ifdef _POSIX_SYNCHRONIZED_IO
- N (SYNCHRONIZED_IO),
-+#endif
- N (THREAD_ATTR_STACKADDR),
- N (THREAD_ATTR_STACKSIZE),
- N (THREAD_CPUTIME),
-diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
-index 775c921..4c1b06b 100644
---- a/sysdeps/mach/hurd/bits/posix_opt.h
-+++ b/sysdeps/mach/hurd/bits/posix_opt.h
-@@ -31,6 +31,9 @@
- /* Processes have a saved set-user-ID and a saved set-group-ID. */
- #define _POSIX_SAVED_IDS 1
-
-+/* Priority scheduling is not supported. */
-+#undef _POSIX_PRIORITY_SCHEDULING
-+
- /* Synchronizing file data is supported, but msync is missing. */
- #undef _POSIX_SYNCHRONIZED_IO
-
-@@ -60,6 +63,14 @@
- #undef _POSIX_NO_TRUNC /* Overlong file names get error? */
- #undef _POSIX_SYNC_IO /* File supports O_SYNC et al? */
-
-+/* X/Open realtime support is not supported. */
-+#undef _XOPEN_REALTIME
-+
-+/* X/Open thread realtime support is not supported. */
-+#undef _XOPEN_REALTIME_THREADS
-+
-+/* XPG4.2 shared memory is not supported. */
-+#undef _XOPEN_SHM
-
- /* We do not have the POSIX threads interface. */
- #define _POSIX_THREADS -1
-@@ -72,6 +83,12 @@
- #define _POSIX_THREAD_PRIORITY_SCHEDULING -1
- #define _POSIX_THREAD_ATTR_STACKSIZE -1
- #define _POSIX_THREAD_ATTR_STACKADDR -1
-+#define _POSIX_THREAD_PRIO_INHERIT -1
-+#define _POSIX_THREAD_PRIO_PROTECT -1
-+#ifdef __USE_XOPEN2K8
-+# define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1
-+# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
-+#endif
- #define _POSIX_SEMAPHORES -1
-
- /* Real-time signals are not yet supported. */
-@@ -79,8 +96,11 @@
-
- /* Asynchronous I/O might supported with the existing ABI. */
- #define _POSIX_ASYNCHRONOUS_IO 0
-+#undef _POSIX_ASYNC_IO
- /* Alternative name for Unix98. */
- #define _LFS_ASYNCHRONOUS_IO _POSIX_ASYNCHRONOUS_IO
-+/* Support for prioritization is not available. */
-+#undef _POSIX_PRIORITIZED_IO
-
- /* The LFS support in asynchronous I/O is also available. */
- #define _LFS64_ASYNCHRONOUS_IO _POSIX_ASYNCHRONOUS_IO
-@@ -111,6 +131,9 @@
- /* We cannot support the Timeouts option without _POSIX_THREADS. */
- #define _POSIX_TIMEOUTS -1
-
-+/* We do not support spinlocks. */
-+#define _POSIX_SPIN_LOCKS -1
-+
- /* The `spawn' function family is supported. */
- #define _POSIX_SPAWN 200809L
-
-@@ -157,9 +180,4 @@
- /* Typed memory objects are not available. */
- #define _POSIX_TYPED_MEMORY_OBJECTS -1
-
--/* No support for priority inheritance or protection so far. */
--#define _POSIX_THREAD_PRIO_INHERIT -1
--#define _POSIX_THREAD_PRIO_PROTECT -1
--
--
- #endif /* bits/posix_opt.h */
---
-tg: (0234227..) t/posix_opt.h (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-readlinkat.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-readlinkat.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-readlinkat.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,89 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] readlinkat
-
-2009-09-27 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * sysdeps/mach/hurd/readlinkat.c: New file, heavily inherited from
- sysdeps/mach/hurd/readlink.c
-
----
-http://cygwin.com/ml/libc-alpha/2009-09/msg00058.html
-
- sysdeps/mach/hurd/readlinkat.c | 67 ++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 67 insertions(+), 0 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/readlinkat.c b/sysdeps/mach/hurd/readlinkat.c
-new file mode 100644
-index 0000000..59aeede
---- /dev/null
-+++ b/sysdeps/mach/hurd/readlinkat.c
-@@ -0,0 +1,67 @@
-+/* Copyright (C) 1991,92,93,94,95,97,2002,2009 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. */
-+
-+#include <unistd.h>
-+#include <hurd.h>
-+#include <hurd/paths.h>
-+#include <hurd/fd.h>
-+#include <fcntl.h>
-+#include <string.h>
-+
-+/* Read the contents of the symbolic link FILE_NAME relative to FD into no more
-+ than LEN bytes of BUF. The contents are not null-terminated.
-+ Returns the number of characters read, or -1 for errors. */
-+ssize_t
-+readlinkat (fd, file_name, buf, len)
-+ int fd;
-+ const char *file_name;
-+ char *buf;
-+ size_t len;
-+{
-+ error_t err;
-+ file_t file;
-+ struct stat64 st;
-+
-+ file = __file_name_lookup_at (fd, 0, file_name, O_READ | O_NOLINK, 0);
-+ if (file == MACH_PORT_NULL)
-+ return -1;
-+
-+ err = __io_stat (file, &st);
-+ if (! err)
-+ if (S_ISLNK (st.st_mode))
-+ {
-+ char *rbuf = buf;
-+
-+ err = __io_read (file, &rbuf, &len, 0, len);
-+ if (!err && rbuf != buf)
-+ {
-+ memcpy (buf, rbuf, len);
-+ __vm_deallocate (__mach_task_self (), (vm_address_t)rbuf, len);
-+ }
-+ }
-+ else
-+ err = EINVAL;
-+
-+ __mach_port_deallocate (__mach_task_self (), file);
-+
-+ if (err)
-+ return __hurd_fail (err);
-+ else
-+ return len;
-+}
-+libc_hidden_def (readlinkat);
---
-tg: (0234227..) t/readlinkat (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-sbrk.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-sbrk.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-sbrk.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,60 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix sbrk beyond 128MB
-
-The patch below fixes sbrk() calls beyond the initial allocation of
-128MB: passing pagebrk makes the kernel return an error when there is
-some room (but not enough for the desired increase) between pagebrk and
-_hurd_data_end where vm is already allocated.
-
-2009-09-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * sysdeps/mach/hurd/brk.c (_hurd_set_brk): When more space needs to be
- allocated, call __vm_protect to finish enabling the existing space, and
- pass a copy of _hurd_data_end instead of pagebrk to __vm_allocate to
- allocate the remainder.
-
----
-http://sources.redhat.com/ml/libc-alpha/2009-09/msg00030.html
-
- sysdeps/mach/hurd/brk.c | 18 ++++++++++++++++--
- 1 files changed, 16 insertions(+), 2 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/brk.c b/sysdeps/mach/hurd/brk.c
-index 931b260..4a135d3 100644
---- a/sysdeps/mach/hurd/brk.c
-+++ b/sysdeps/mach/hurd/brk.c
-@@ -64,7 +64,7 @@ weak_alias (__brk, brk)
- int
- _hurd_set_brk (vm_address_t addr)
- {
-- error_t err;
-+ error_t err = 0;
- vm_address_t pagend = round_page (addr);
- vm_address_t pagebrk = round_page (_hurd_brk);
- long int rlimit;
-@@ -101,8 +101,22 @@ _hurd_set_brk (vm_address_t addr)
-
- if (pagend > _hurd_data_end)
- {
-+ vm_address_t alloc_start = _hurd_data_end;
-+
- /* We didn't allocate enough space! Hopefully we can get some more! */
-- err = __vm_allocate (__mach_task_self (), &pagebrk, pagend - pagebrk, 0);
-+
-+ if (_hurd_data_end > pagebrk)
-+ /* First finish allocation */
-+ err = __vm_protect (__mach_task_self (), pagebrk,
-+ alloc_start - pagebrk, 0,
-+ VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-+ if (! err)
-+ _hurd_brk = alloc_start;
-+
-+ if (! err)
-+ err = __vm_allocate (__mach_task_self (), &alloc_start,
-+ pagend - alloc_start, 0);
-+
- if (! err)
- _hurd_data_end = pagend;
- }
---
-tg: (0234227..) t/sbrk (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-select-inputcheck.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-select-inputcheck.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-select-inputcheck.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,62 +0,0 @@
-From: Pino Toscano <toscano.pino@tiscali.it>
-Subject: [PATCH] _hurd_select: check for invalid parameter values
-
-Check for invalid values of the `timeout' and `nfds' parameters; move the
-calculation of `to' right after the validation of `timeout'.
-
-2011-11-26 Pino Toscano <toscano.pino@tiscali.it>
-
- * hurd/hurdselect.c (_hurd_select): Return EINVAL for negative
- `timeout' values.
- Return EINVAL for `nfds' values either negative or greater than
- FD_SETSIZE.
-
----
-http://cygwin.com/ml/libc-alpha/2011-12/msg00012.html
-
- hurd/hurdselect.c | 23 +++++++++++++++++++----
- 1 files changed, 19 insertions(+), 4 deletions(-)
-
-diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
-index a7228f0..ccc275d 100644
---- a/hurd/hurdselect.c
-+++ b/hurd/hurdselect.c
-@@ -50,10 +50,7 @@ _hurd_select (int nfds,
- error_t err;
- fd_set rfds, wfds, xfds;
- int firstfd, lastfd;
-- mach_msg_timeout_t to = (timeout != NULL ?
-- (timeout->tv_sec * 1000 +
-- (timeout->tv_nsec + 999999) / 1000000) :
-- 0);
-+ mach_msg_timeout_t to = 0;
- struct
- {
- struct hurd_userlink ulink;
-@@ -72,6 +69,24 @@ _hurd_select (int nfds,
- assert (sizeof (union typeword) == sizeof (mach_msg_type_t));
- assert (sizeof (uint32_t) == sizeof (mach_msg_type_t));
-
-+ if (nfds < 0 || nfds > FD_SETSIZE)
-+ {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ if (timeout != NULL)
-+ {
-+ if (timeout->tv_sec < 0 || timeout->tv_nsec < 0)
-+ {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ to = timeout->tv_sec * 1000 +
-+ (timeout->tv_nsec + 999999) / 1000000;
-+ }
-+
- if (sigmask && __sigprocmask (SIG_SETMASK, sigmask, &oset))
- return -1;
-
---
-tg: (0234227..) t/select-inputcheck (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-setresid.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-setresid.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-setresid.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,235 +0,0 @@
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Fix setres[ug]id handling of -1
-
-When passed -1, setres[ug]id are supposed not to change the existing
-value. The patch below does this the same way as setre[ug]id.
-
-2011-10-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
-* sysdeps/mach/hurd/setresgid.c (__setresgid): Handle the -1 case, which
-shall preserve existing values.
-* sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise.
-
----
-http://cygwin.com/ml/libc-alpha/2011-10/msg00031.html
-
- sysdeps/mach/hurd/setresgid.c | 73 +++++++++++++++++++++++++++++++++--------
- sysdeps/mach/hurd/setresuid.c | 73 +++++++++++++++++++++++++++++++++--------
- 2 files changed, 118 insertions(+), 28 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/setresgid.c b/sysdeps/mach/hurd/setresgid.c
-index 8fcf26e..2a0dd90 100644
---- a/sysdeps/mach/hurd/setresgid.c
-+++ b/sysdeps/mach/hurd/setresgid.c
-@@ -1,5 +1,5 @@
- /* setresgid -- set real group ID, effective group ID, and saved-set group ID
-- Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
-+ Copyright (C) 2002, 2005, 2006, 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
-@@ -29,7 +29,6 @@ __setresgid (gid_t rgid, gid_t egid, gid_t sgid)
- {
- auth_t newauth;
- error_t err;
-- gid_t agids[2] = { rgid, sgid };
-
- HURD_CRITICAL_BEGIN;
- __mutex_lock (&_hurd_id.lock);
-@@ -40,29 +39,75 @@ __setresgid (gid_t rgid, gid_t egid, gid_t sgid)
- /* Make a new auth handle which has EGID as the first element in the
- list of effective gids. */
-
-- if (_hurd_id.gen.ngids > 0)
-+ uid_t *newgen, *newaux;
-+ uid_t auxs[2] = { rgid, sgid };
-+ size_t ngen, naux;
-+
-+ newgen = _hurd_id.gen.gids;
-+ ngen = _hurd_id.gen.ngids;
-+ if (egid != -1)
-+ {
-+ if (_hurd_id.gen.ngids == 0)
-+ {
-+ /* No effective gids now. The new set will be just UID. */
-+ newgen = &egid;
-+ ngen = 1;
-+ }
-+ else
-+ {
-+ _hurd_id.gen.gids[0] = egid;
-+ _hurd_id.valid = 0;
-+ }
-+ }
-+
-+ newaux = _hurd_id.aux.gids;
-+ naux = _hurd_id.aux.ngids;
-+ if (rgid != -1)
- {
-- _hurd_id.gen.gids[0] = egid;
-- _hurd_id.valid = 0;
-+ if (_hurd_id.aux.ngids == 0)
-+ {
-+ newaux = &rgid;
-+ naux = 1;
-+ }
-+ else
-+ {
-+ _hurd_id.aux.gids[0] = rgid;
-+ _hurd_id.valid = 0;
-+ }
- }
-- if (_hurd_id.aux.ngids > 1)
-+
-+ if (sgid != -1)
- {
-- _hurd_id.aux.gids[0] = rgid;
-- _hurd_id.aux.gids[1] = sgid;
-- _hurd_id.valid = 0;
-+ if (rgid == -1)
-+ {
-+ if (_hurd_id.aux.ngids >= 1)
-+ auxs[0] = _hurd_id.aux.gids[0];
-+ else if (_hurd_id.gen.ngids >= 1)
-+ auxs[0] = _hurd_id.gen.gids[0];
-+ else
-+ /* Not even an effective gid, fallback to the only UID we have. */
-+ auxs[0] = sgid;
-+ }
-+ if (_hurd_id.aux.ngids <= 1)
-+ {
-+ /* No saved gids now. The new set will be just UID. */
-+ newaux = auxs;
-+ naux = 2;
-+ }
-+ else
-+ {
-+ _hurd_id.aux.gids[1] = sgid;
-+ _hurd_id.valid = 0;
-+ }
- }
-
- err = __USEPORT (AUTH, __auth_makeauth
- (port, NULL, MACH_MSG_TYPE_COPY_SEND, 0,
- _hurd_id.gen.uids, _hurd_id.gen.nuids,
- _hurd_id.aux.uids, _hurd_id.aux.nuids,
-- _hurd_id.gen.ngids ? _hurd_id.gen.gids : &egid,
-- _hurd_id.gen.ngids ?: 1,
-- _hurd_id.aux.ngids > 1 ? _hurd_id.aux.gids : agids,
-- _hurd_id.aux.ngids > 1 ? _hurd_id.aux.ngids : 2,
-+ newgen, ngen, newaux, naux,
- &newauth));
- }
--
- __mutex_unlock (&_hurd_id.lock);
- HURD_CRITICAL_END;
-
-diff --git a/sysdeps/mach/hurd/setresuid.c b/sysdeps/mach/hurd/setresuid.c
-index ccf8d08..e254437 100644
---- a/sysdeps/mach/hurd/setresuid.c
-+++ b/sysdeps/mach/hurd/setresuid.c
-@@ -1,5 +1,5 @@
- /* setresuid -- set real user ID, effective user ID, and saved-set user ID
-- Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
-+ Copyright (C) 2002, 2005, 2006, 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
-@@ -29,7 +29,6 @@ __setresuid (uid_t ruid, uid_t euid, uid_t suid)
- {
- auth_t newauth;
- error_t err;
-- uid_t auids[2] = { ruid, suid };
-
- HURD_CRITICAL_BEGIN;
- __mutex_lock (&_hurd_id.lock);
-@@ -40,29 +39,75 @@ __setresuid (uid_t ruid, uid_t euid, uid_t suid)
- /* Make a new auth handle which has EUID as the first element in the
- list of effective uids. */
-
-- if (_hurd_id.gen.nuids > 0)
-+ uid_t *newgen, *newaux;
-+ uid_t auxs[2] = { ruid, suid };
-+ size_t ngen, naux;
-+
-+ newgen = _hurd_id.gen.uids;
-+ ngen = _hurd_id.gen.nuids;
-+ if (euid != -1)
-+ {
-+ if (_hurd_id.gen.nuids == 0)
-+ {
-+ /* No effective uids now. The new set will be just UID. */
-+ newgen = &euid;
-+ ngen = 1;
-+ }
-+ else
-+ {
-+ _hurd_id.gen.uids[0] = euid;
-+ _hurd_id.valid = 0;
-+ }
-+ }
-+
-+ newaux = _hurd_id.aux.uids;
-+ naux = _hurd_id.aux.nuids;
-+ if (ruid != -1)
- {
-- _hurd_id.gen.uids[0] = euid;
-- _hurd_id.valid = 0;
-+ if (_hurd_id.aux.nuids == 0)
-+ {
-+ newaux = &ruid;
-+ naux = 1;
-+ }
-+ else
-+ {
-+ _hurd_id.aux.uids[0] = ruid;
-+ _hurd_id.valid = 0;
-+ }
- }
-- if (_hurd_id.aux.nuids > 1)
-+
-+ if (suid != -1)
- {
-- _hurd_id.aux.uids[0] = ruid;
-- _hurd_id.aux.uids[1] = suid;
-- _hurd_id.valid = 0;
-+ if (ruid == -1)
-+ {
-+ if (_hurd_id.aux.nuids >= 1)
-+ auxs[0] = _hurd_id.aux.uids[0];
-+ else if (_hurd_id.gen.nuids >= 1)
-+ auxs[0] = _hurd_id.gen.uids[0];
-+ else
-+ /* Not even an effective uid, fallback to the only UID we have. */
-+ auxs[0] = suid;
-+ }
-+ if (_hurd_id.aux.nuids <= 1)
-+ {
-+ /* No saved uids now. The new set will be just UID. */
-+ newaux = auxs;
-+ naux = 2;
-+ }
-+ else
-+ {
-+ _hurd_id.aux.uids[1] = suid;
-+ _hurd_id.valid = 0;
-+ }
- }
-
- err = __USEPORT (AUTH, __auth_makeauth
- (port, NULL, MACH_MSG_TYPE_COPY_SEND, 0,
-- _hurd_id.gen.nuids ? _hurd_id.gen.uids : &euid,
-- _hurd_id.gen.nuids ?: 1,
-- _hurd_id.aux.nuids > 1 ? _hurd_id.aux.uids : auids,
-- _hurd_id.aux.nuids > 1 ? _hurd_id.aux.nuids : 2,
-+ newgen, ngen, newaux, naux,
- _hurd_id.gen.gids, _hurd_id.gen.ngids,
- _hurd_id.aux.gids, _hurd_id.aux.ngids,
- &newauth));
- }
--
- __mutex_unlock (&_hurd_id.lock);
- HURD_CRITICAL_END;
-
---
-tg: (0234227..) t/setresid (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-strtoul_PLT.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-strtoul_PLT.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-strtoul_PLT.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,34 +0,0 @@
-From: Thomas Schwinge <thomas@schwinge.name>
-Subject: [PATCH] strtoul_PLT
-
-Don't go through the PLT for strtoul.
-
-glibc-2.8/debian/patches/hurd-i386/submitted-strtoul.diff 3057
-
----
-
- /media/Stalin/tmp/glibc.hurd.gnu-2/elf/librtld.os: In function `strtoul':
- /media/data/home/thomas/tmp/source/glibc/git/glibc.hurd/stdlib/strtol.c:110: undefined reference to `__libc_tsd_LOCALE_data'
- /media/Stalin/tmp/glibc.hurd.gnu-2/elf/librtld.os: In function `__strtoul_internal':
- /media/data/home/thomas/tmp/source/glibc/git/glibc.hurd/stdlib/strtol.c:99: undefined reference to `__libc_tsd_LOCALE_data'
- collect2: ld returned 1 exit status
- make[2]: *** [/media/Stalin/tmp/glibc.hurd.gnu-2/elf/ld.so] Error 1
-
- hurd/lookup-retry.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
-index 0a88622..96968f8 100644
---- a/hurd/lookup-retry.c
-+++ b/hurd/lookup-retry.c
-@@ -194,7 +194,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
- char *end;
- int save = errno;
- errno = 0;
-- fd = (int) strtoul (&retryname[3], &end, 10);
-+ fd = (int) __strtoul_internal (&retryname[3], &end, 10, 0);
- if (end == NULL || errno || /* Malformed number. */
- /* Check for excess text after the number. A slash
- is valid; it ends the component. Anything else
---
-tg: (0234227..) t/strtoul_PLT (depends on: baseline)
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-struct_stat.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-struct_stat.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-struct_stat.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -1,130 +0,0 @@
-From: Thomas Schwinge <thomas@schwinge.name>
-Subject: [PATCH] struct_stat
-
-``struct stat'' fixes.
-
-Needed for HEAD and glibc-2_7-branch.
-
-<http://sources.redhat.com/ml/libc-alpha/2002-12/msg00011.html>
-
-Reported on <http://savannah.gnu.org/bugs/?18216>.
-
-
-2007-10-05 Thomas Schwinge <tschwinge@gnu.org>
-
- * sysdeps/mach/hurd/bits/stat.h (struct stat): Align to what is done
- for Linux: use nsec instead of usec, as well as:
- [__USE_MISC] (st_atim, st_mtim, st_ctim): Provide these ``struct
- timespec''s.
- (struct stat64): Likewise.
- (_STATBUF_ST_NSEC): Define.
- * sysdeps/mach/hurd/xstatconv.c (xstat64_conv): Adapt to that.
-
----
- sysdeps/mach/hurd/bits/stat.h | 56 +++++++++++++++++++++++++++++++---------
- sysdeps/mach/hurd/xstatconv.c | 9 ++----
- 2 files changed, 46 insertions(+), 19 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/bits/stat.h b/sysdeps/mach/hurd/bits/stat.h
-index b64a658..50d18c4 100644
---- a/sysdeps/mach/hurd/bits/stat.h
-+++ b/sysdeps/mach/hurd/bits/stat.h
-@@ -59,12 +59,27 @@ struct stat
- __off64_t st_size; /* Size in bytes. */
- #endif
-
-- __time_t st_atime; /* Access time, seconds */
-- unsigned long int st_atime_usec; /* and microseconds. */
-- __time_t st_mtime; /* Modification time, seconds */
-- unsigned long int st_mtime_usec; /* and microseconds. */
-- __time_t st_ctime; /* Status change time, seconds */
-- unsigned long int st_ctime_usec; /* and microseconds. */
-+#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)
-+ /* Nanosecond resolution timestamps are stored in a format
-+ equivalent to 'struct timespec'. This is the type used
-+ whenever possible but the Unix namespace rules do not allow the
-+ identifier 'timespec' to appear in the <sys/stat.h> header.
-+ Therefore we have to handle the use of this header in strictly
-+ standard-compliant sources special. */
-+ struct timespec st_atim; /* Time of last access. */
-+ struct timespec st_mtim; /* Time of last modification. */
-+ struct timespec st_ctim; /* Time of last status change. */
-+# define st_atime st_atim.tv_sec /* Backward compatibility. */
-+# define st_mtime st_mtim.tv_sec
-+# define st_ctime st_ctim.tv_sec
-+#else
-+ __time_t st_atime; /* Time of last access. */
-+ unsigned long int st_atimensec; /* Nscecs of last access. */
-+ __time_t st_mtime; /* Time of last modification. */
-+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
-+ __time_t st_ctime; /* Time of last status change. */
-+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
-+#endif
-
- __blksize_t st_blksize; /* Optimal size for I/O. */
-
-@@ -108,12 +123,24 @@ struct stat64
-
- __off64_t st_size; /* Size in bytes. */
-
-- __time_t st_atime; /* Access time, seconds */
-- unsigned long int st_atime_usec; /* and microseconds. */
-- __time_t st_mtime; /* Modification time, seconds */
-- unsigned long int st_mtime_usec; /* and microseconds. */
-- __time_t st_ctime; /* Status change time, seconds */
-- unsigned long int st_ctime_usec; /* and microseconds. */
-+#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)
-+ /* Nanosecond resolution timestamps are stored in a format
-+ equivalent to 'struct timespec'. This is the type used
-+ whenever possible but the Unix namespace rules do not allow the
-+ identifier 'timespec' to appear in the <sys/stat.h> header.
-+ Therefore we have to handle the use of this header in strictly
-+ standard-compliant sources special. */
-+ struct timespec st_atim; /* Time of last access. */
-+ struct timespec st_mtim; /* Time of last modification. */
-+ struct timespec st_ctim; /* Time of last status change. */
-+#else
-+ __time_t st_atime; /* Time of last access. */
-+ unsigned long int st_atimensec; /* Nscecs of last access. */
-+ __time_t st_mtime; /* Time of last modification. */
-+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
-+ __time_t st_ctime; /* Time of last status change. */
-+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
-+#endif
-
- __blksize_t st_blksize; /* Optimal size for I/O. */
-
-@@ -131,7 +158,10 @@ struct stat64
- };
- #endif
-
--#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
-+/* Tell code we have these members. */
-+#define _STATBUF_ST_BLKSIZE
-+/* Nanosecond resolution time values are supported. */
-+#define _STATBUF_ST_NSEC
-
- /* Encoding of the file mode. */
-
-diff --git a/sysdeps/mach/hurd/xstatconv.c b/sysdeps/mach/hurd/xstatconv.c
-index e28643c..d320285 100644
---- a/sysdeps/mach/hurd/xstatconv.c
-+++ b/sysdeps/mach/hurd/xstatconv.c
-@@ -42,12 +42,9 @@ xstat64_conv (struct stat *buf, const struct stat64 *buf64)
- buf->st_uid = buf64->st_uid;
- buf->st_gid = buf64->st_gid;
- buf->st_size = buf64->st_size;
-- buf->st_atime = buf64->st_atime;
-- buf->st_atime_usec = buf64->st_atime_usec;
-- buf->st_mtime = buf64->st_mtime;
-- buf->st_mtime_usec = buf64->st_mtime_usec;
-- buf->st_ctime = buf64->st_ctime;
-- buf->st_ctime_usec = buf64->st_ctime_usec;
-+ buf->st_atim = buf64->st_atim;
-+ buf->st_mtim = buf64->st_mtim;
-+ buf->st_ctim = buf64->st_ctim;
- buf->st_blksize = buf64->st_blksize;
- buf->st_blocks = buf64->st_blocks;
- buf->st_author = buf64->st_author;
---
-tg: (0234227..) t/struct_stat (depends on: baseline)
Modified: glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-pthread_posix-option.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-pthread_posix-option.diff 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-pthread_posix-option.diff 2012-05-12 11:24:43 UTC (rev 5249)
@@ -38,10 +38,10 @@
+#define _POSIX_THREAD_ATTR_STACKADDR 200112L
+
+/* We do not support priority inheritence. */
- #define _POSIX_THREAD_PRIO_INHERIT -1
+ #define _POSIX_THREAD_PRIO_INHERIT -1
+
+/* We do not support priority protection. */
- #define _POSIX_THREAD_PRIO_PROTECT -1
+ #define _POSIX_THREAD_PRIO_PROTECT -1
+
#ifdef __USE_XOPEN2K8
+/* We do not support priority inheritence for robust mutexes. */
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2012-05-11 22:18:43 UTC (rev 5248)
+++ glibc-package/trunk/debian/patches/series 2012-05-12 11:24:43 UTC (rev 5249)
@@ -120,43 +120,43 @@
hurd-i386/local-dl-dynamic-weak.diff
hurd-i386/local-enable-ldconfig.diff
-hurd-i386/tg-mlock.diff
+hurd-i386/cvs-mlock.diff
hurd-i386/unsubmitted-tls.diff
hurd-i386/tg-tls.diff
hurd-i386/tg-tlsdesc.sym.diff
hurd-i386/unsubmitted-gcc-4.1-init-first.diff
-hurd-i386/tg-posix_opt.h.diff
-hurd-i386/tg-ioctl-decode-argument.diff
+hurd-i386/cvs-posix_opt.h.diff
+hurd-i386/cvs-ioctl-decode-argument.diff
hurd-i386/tg-libc_once.diff
hurd-i386/tg-ptrmangle.diff
-hurd-i386/tg-struct_stat.diff
-hurd-i386/tg-strtoul_PLT.diff
+hurd-i386/cvs-struct_stat.diff
+hurd-i386/cvs-strtoul_PLT.diff
hurd-i386/tg-sysvshm.diff
hurd-i386/tg-ioctl-base-types.diff
hurd-i386/tg-regenerate_errno.h.diff
-hurd-i386/tg-IPV6_PKTINFO.diff
+hurd-i386/cvs-IPV6_PKTINFO.diff
hurd-i386/tg-extern_inline.diff
-hurd-i386/tg-critical-sections.diff
-hurd-i386/tg-dup3.diff
-hurd-i386/tg-dup3-lock.diff
+hurd-i386/cvs-critical-sections.diff
+hurd-i386/cvs-dup3.diff
+hurd-i386/cvs-dup3-lock.diff
hurd-i386/tg-check_native.diff
-hurd-i386/tg-dl-sysdep.c_SHARED.diff
-hurd-i386/tg-itimer-lock.diff
+hurd-i386/cvs-dl-sysdep.c_SHARED.diff
+hurd-i386/cvs-itimer-lock.diff
hurd-i386/tg-_dl_random.diff
-hurd-i386/tg-null-pathname.diff
-hurd-i386/tg-sbrk.diff
+hurd-i386/cvs-null-pathname.diff
+hurd-i386/cvs-sbrk.diff
hurd-i386/tg-thread-cancel.diff
-hurd-i386/tg-readlinkat.diff
-hurd-i386/tg-SOL_IP.diff
+hurd-i386/cvs-readlinkat.diff
+hurd-i386/cvs-SOL_IP.diff
hurd-i386/tg-bigmem.diff
hurd-i386/local-disable-ioctls.diff
-hurd-i386/tg-____longjmp_chk.diff
+hurd-i386/cvs-____longjmp_chk.diff
hurd-i386/tg-locarchive.diff
hurd-i386/submitted-regex_internal.diff
-hurd-i386/tg-mkdir_root.diff
+hurd-i386/cvs-mkdir_root.diff
hurd-i386/tg-__i686_defined.diff
hurd-i386/tg-no-hp-timing.diff
-hurd-i386/tg-catch-signal.diff
+hurd-i386/cvs-catch-signal.diff
hurd-i386/tg-sendmsg-SCM_RIGHTS.diff
hurd-i386/cvs-header-prot.diff
hurd-i386/cvs-psiginfo.diff
@@ -174,18 +174,18 @@
hurd-i386/local-hurdsig-global-dispositions-version.diff
hurd-i386/tg-hurdsig-SA_SIGINFO.diff
hurd-i386/tg-hurdsig-fixes-2.diff
-hurd-i386/tg-libc_stack_end.diff
+hurd-i386/cvs-libc_stack_end.diff
hurd-i386/tg-ttyname_ERANGE.diff
hurd-i386/cvs-DEV_BSIZE.diff
hurd-i386/cvs-fork_ports.diff
-hurd-i386/tg-setresid.diff
+hurd-i386/cvs-setresid.diff
hurd-i386/cvs-sgttyb.diff
-hurd-i386/tg-hurd_socket_server_indexcheck.diff
-hurd-i386/tg-hurd-recvfrom.diff
-hurd-i386/tg-select-inputcheck.diff
+hurd-i386/cvs-hurd_socket_server_indexcheck.diff
+hurd-i386/cvs-hurd-recvfrom.diff
+hurd-i386/cvs-select-inputcheck.diff
hurd-i386/local-select.diff
-hurd-i386/tg-posix2008.diff
-hurd-i386/tg-mach-nanosleep.diff
+hurd-i386/cvs-posix2008.diff
+hurd-i386/cvs-mach-nanosleep.diff
hurd-i386/cvs-mmap.diff
hurd-i386/cvs-hurd-socket-EAFNOSUPPORT.diff
hurd-i386/cvs-symlink_dealloc.diff
@@ -199,6 +199,7 @@
hurd-i386/tg-libpthread_depends.diff
hurd-i386/libpthread_librt-link.diff
hurd-i386/libpthread_version.diff
+hurd-i386/cvs-O_CLOEXEC.diff
kfreebsd/submitted-libc_once.diff
Reply to: