r1341 - in glibc-package/trunk/debian/patches: . hurd-i386
Author: mbanck
Date: 2006-04-07 09:45:09 +0000 (Fri, 07 Apr 2006)
New Revision: 1341
Added:
glibc-package/trunk/debian/patches/hurd-i386/cvs-getresuid-dyslexia.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-ioctl-pfinet.diff
glibc-package/trunk/debian/patches/hurd-i386/cvs-machrules-make.diff
glibc-package/trunk/debian/patches/hurd-i386/local-enable-ldconfig.diff
glibc-package/trunk/debian/patches/hurd-i386/submitted-ioctl-decode-argument.diff
glibc-package/trunk/debian/patches/hurd-i386/submitted-sysvshm.diff
Removed:
glibc-package/trunk/debian/patches/hurd-enable-ldconfig.diff
glibc-package/trunk/debian/patches/hurd-getresuid-dyslexia.diff
glibc-package/trunk/debian/patches/hurd-ioctl-decode-argument.diff
glibc-package/trunk/debian/patches/hurd-ioctl-pfinet.diff
glibc-package/trunk/debian/patches/hurd-machrules-make.diff
glibc-package/trunk/debian/patches/hurd-sysvshm.diff
Modified:
glibc-package/trunk/debian/patches/series
Log:
Move hurd-i386 patches to the new naming scheme
Deleted: glibc-package/trunk/debian/patches/hurd-enable-ldconfig.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-enable-ldconfig.diff 2006-04-07 09:04:55 UTC (rev 1340)
+++ glibc-package/trunk/debian/patches/hurd-enable-ldconfig.diff 2006-04-07 09:45:09 UTC (rev 1341)
@@ -1,88 +0,0 @@
-#! /bin/sh -e
-
-# DP: Description: Enable ldconfig and such on hurd-i386
-# DP: Author: Jeff Bailey <jbailey@nisa.net>
-# DP: Related Bugs: #309489
-# DP: Upstream status: Not submitted
-# DP: Status Details: Upstream disagrees with this patch, but I'm
-# DP: putting it in so that we have expected Debian behaviour on the
-# DP: Hurd. We should review this when the ELF standard supports runpath.
-# DP: Date: 08 Apr 2003
-
-if [ $# -ne 2 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
- -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-esac
-exit 0
-
-diff -urN glibc-2.3.2.old/sysdeps/mach/hurd/configure glibc-2.3.2/sysdeps/mach/hurd/configure
---- glibc-2.3.2.old/sysdeps/mach/hurd/configure 2003-02-25 19:46:36.000000000 -0500
-+++ glibc-2.3.2/sysdeps/mach/hurd/configure 2003-04-08 17:35:13.000000000 -0400
-@@ -115,3 +115,5 @@
- _ACEOF
-
- fi
-+
-+use_ldconfig=yes
---- glibc-2.3.2.old/sysdeps/mach/hurd/configure.in.orig 2005-05-30 17:31:32.000000000 +0200
-+++ glibc-2.3.2/sysdeps/mach/hurd/configure.in 2005-05-30 17:44:30.000000000 +0200
-@@ -36,3 +36,5 @@
- if test "x$libc_cv_hurd_version" != xok; then
- AC_MSG_ERROR(Hurd headers not installed or too old)
- fi
-+
-+use_ldconfig=yes
-diff -urN glibc-2.3.2.old/elf/ldconfig.c glibc-2.3.2/elf/ldconfig.c
---- glibc-2.3.2.old/elf/ldconfig.c~ 2003-04-12 13:24:37.000000000 -0400
-+++ glibc-2.3.2/elf/ldconfig.c 2003-04-12 13:25:00.000000000 -0400
-@@ -49,6 +49,10 @@
-
- #define PACKAGE _libc_intl_domainname
-
-+#ifndef PATH_MAX
-+#define PATH_MAX 1024
-+#endif
-+
- static const struct
- {
- const char *name;
-diff -urN glibc-2.3.2.old/sysdeps/mach/hurd/dl-cache.c glibc-2.3.2/sysdeps/mach/hurd/dl-cache.c
---- glibc-2.3.2.old/sysdeps/mach/hurd/dl-cache.c 2001-07-07 15:21:25.000000000 -0400
-+++ glibc-2.3.2/sysdeps/mach/hurd/dl-cache.c 1969-12-31 19:00:00.000000000 -0500
-@@ -1,29 +0,0 @@
--/* Stubby version of dl-cache; the Hurd doesn't support this "feature".
-- Copyright (C) 1996, 1997 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. */
--
--const char *
--_dl_load_cache_lookup (const char *name)
--{
-- return 0;
--}
--
--void
--_dl_unload_cache (void)
--{
--}
Deleted: glibc-package/trunk/debian/patches/hurd-getresuid-dyslexia.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-getresuid-dyslexia.diff 2006-04-07 09:04:55 UTC (rev 1340)
+++ glibc-package/trunk/debian/patches/hurd-getresuid-dyslexia.diff 2006-04-07 09:45:09 UTC (rev 1341)
@@ -1,341 +0,0 @@
-# All lines beginning with `# DP:' are a description of the patch.
-# DP: Description: [rs]etres[gu]id have misordered arguments
-# DP: This patch has been grabbed from BZ2329 and backported to 2.3.6
-# DP: Related bugs: #352500 BZ2329
-# DP: Dpatch author: Denis Barbier <barbier@debian.org>
-# DP: Patch author: Thomas Schwinge
-# DP: Upstream status: BZ2329
-# DP: Date: 2006-02-16
-
-2006-02-15 Thomas Schwinge <tschwinge@gnu.org>
-
- * include/unistd.h (__getresuid, __getresgid, __setresuid)
- (__setresgid): Correct prototypes.
- * posix/unistd.h (getresuid, getresgid, setresuid, setresgid):
- Likewise.
- * posix/getresuid.c (__getresuid): Correct definition.
- * posix/getresgid.c (__getresgid): Likewise.
- * posix/setresuid.c (__setresuid): Likewise.
- * posix/setresgid.c (__setresgid): Likewise.
- * sysdeps/mach/hurd/getresuid.c (__getresuid): Likewise.
- * sysdeps/mach/hurd/getresgid.c (__getresgid): Likewise.
- * sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise.
- * sysdeps/mach/hurd/setresgid.c (__setresgid): Likewise.
-
- Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
-
-Index: include/unistd.h
-===================================================================
-RCS file: /cvs/glibc/libc/include/unistd.h,v
-retrieving revision 1.45
-diff -u -r1.45 unistd.h
---- include/unistd.h 30 Jun 2004 07:35:39 -0000 1.45
-+++ include/unistd.h 15 Feb 2006 16:21:40 -0000
-@@ -96,10 +96,10 @@
- extern int __setpgid (__pid_t __pid, __pid_t __pgid);
- libc_hidden_proto (__setpgid)
- extern int __setregid (__gid_t __rgid, __gid_t __egid);
--extern int __getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
--extern int __getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
--extern int __setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
--extern int __setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
-+extern int __getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid);
-+extern int __getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid);
-+extern int __setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
-+extern int __setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid);
- libc_hidden_proto (__getresuid)
- libc_hidden_proto (__getresgid)
- libc_hidden_proto (__setresuid)
-Index: posix/unistd.h
---- posix/unistd.h 6 Jan 2006 12:14:05 -0000
-+++ posix/unistd.h 15 Feb 2006 16:21:41 -0000
-@@ -693,21 +693,21 @@
- #endif /* Use BSD. */
-
- #ifdef __USE_GNU
--/* Fetch the effective user ID, real user ID, and saved-set user ID,
-+/* Fetch the real user ID, effective user ID, and saved-set user ID,
- of the calling process. */
--extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
-+extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid);
-
--/* Fetch the effective group ID, real group ID, and saved-set group ID,
-+/* Fetch the real group ID, effective group ID, and saved-set group ID,
- of the calling process. */
--extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
-+extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid);
-
--/* Set the effective user ID, real user ID, and saved-set user ID,
-- of the calling process to EUID, RUID, and SUID, respectively. */
--extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
-+/* Set the real user ID, effective user ID, and saved-set user ID,
-+ of the calling process to RUID, EUID, and SUID, respectively. */
-+extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
-
--/* Set the effective group ID, real group ID, and saved-set group ID,
-- of the calling process to EGID, RGID, and SGID, respectively. */
--extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
-+/* Set the real group ID, effective group ID, and saved-set group ID,
-+ of the calling process to RGID, EGID, and SGID, respectively. */
-+extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid);
- #endif
-
-
-Index: sysdeps/generic/getresuid.c
---- sysdeps/generic/getresgid.c 14 Dec 2005 09:14:13 -0000
-+++ sysdeps/generic/getresgid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,4 +1,5 @@
--/* Copyright (C) 1991,1995,1996,1997,1998,2002 Free Software Foundation, Inc.
-+/* Copyright (C) 1991,1995,1996,1997,1998,2002,2006
-+ 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,10 +20,10 @@
- #include <errno.h>
- #include <unistd.h>
-
--/* Fetch the effective group ID, real group ID, and saved-set group ID,
-+/* Fetch the real group ID, effective group ID, and saved-set group ID,
- of the calling process. */
- int
--__getresgid (gid_t *egid, gid_t *rgid, gid_t *sgid)
-+__getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
- {
- __set_errno (ENOSYS);
- return -1;
-Index: sysdeps/generic/getresuid.c
---- sysdeps/generic/getresuid.c 14 Dec 2005 09:14:28 -0000
-+++ sysdeps/generic/getresuid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,4 +1,5 @@
--/* Copyright (C) 1991,1995,1996,1997,1998,2002 Free Software Foundation, Inc.
-+/* Copyright (C) 1991,1995,1996,1997,1998,2002,2006
-+ 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,10 +20,10 @@
- #include <errno.h>
- #include <unistd.h>
-
--/* Fetch the effective user ID, real user ID, and saved-set user ID,
-+/* Fetch the real user ID, effective user ID, and saved-set user ID,
- of the calling process. */
- int
--__getresuid (uid_t *euid, uid_t *ruid, uid_t *suid)
-+__getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
- {
- __set_errno (ENOSYS);
- return -1;
-Index: sysdeps/generic/setresgid.c
---- sysdeps/generic/setresgid.c 14 Dec 2005 10:48:25 -0000
-+++ sysdeps/generic/setresgid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,5 +1,5 @@
--/* setresgid -- set effective group ID, real group ID, and saved-set group ID
-- Copyright (C) 2002 Free Software Foundation, Inc.
-+/* setresgid -- set real group ID, effective group ID, and saved-set group ID
-+ Copyright (C) 2002, 2006 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
-@@ -20,10 +20,10 @@
- #include <errno.h>
- #include <unistd.h>
-
--/* Set the effective group ID, real group ID, and saved-set group ID,
-- of the calling process to EGID, RGID, and SGID, respectively. */
-+/* Set the real group ID, effective group ID, and saved-set group ID,
-+ of the calling process to RGID, EGID, and SGID, respectively. */
- int
--__setresgid (gid_t egid, gid_t rgid, gid_t sgid)
-+__setresgid (gid_t rgid, gid_t egid, gid_t sgid)
- {
- __set_errno (ENOSYS);
- return -1;
-Index: sysdeps/generic/setresuid.c
---- sysdeps/generic/setresuid.c 14 Dec 2005 10:48:41 -0000
-+++ sysdeps/generic/setresuid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,5 +1,5 @@
--/* setresuid -- set effective user ID, real user ID, and saved-set user ID
-- Copyright (C) 2002 Free Software Foundation, Inc.
-+/* setresuid -- set real user ID, effective user ID, and saved-set user ID
-+ Copyright (C) 2002, 2006 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
-@@ -20,10 +20,10 @@
- #include <errno.h>
- #include <unistd.h>
-
--/* Set the effective user ID, real user ID, and saved-set user ID,
-- of the calling process to EUID, RUID, and SUID, respectively. */
-+/* Set the real user ID, effective user ID, and saved-set user ID,
-+ of the calling process to RUID, EUID, and SUID, respectively. */
- int
--__setresuid (uid_t euid, uid_t ruid, uid_t suid)
-+__setresuid (uid_t ruid, uid_t euid, uid_t suid)
- {
- __set_errno (ENOSYS);
- return -1;
-Index: sysdeps/mach/hurd/getresgid.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/getresgid.c,v
-retrieving revision 1.1
-diff -u -r1.1 getresgid.c
---- sysdeps/mach/hurd/getresgid.c 14 Oct 2002 01:03:11 -0000 1.1
-+++ sysdeps/mach/hurd/getresgid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,5 +1,5 @@
--/* getresgid -- fetch effective group ID, real group ID, and saved-set group ID
-- Copyright (C) 2002 Free Software Foundation, Inc.
-+/* getresgid -- fetch real group ID, effective group ID, and saved-set group ID
-+ Copyright (C) 2002, 2006 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,13 +22,13 @@
- #include <hurd.h>
- #include <hurd/id.h>
-
--/* Fetch the effective group ID, real group ID, and saved-set group ID,
-+/* Fetch the real group ID, effective group ID, and saved-set group ID,
- of the calling process. */
- int
--__getresgid (gid_t *egid, gid_t *rgid, gid_t *sgid)
-+__getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
- {
- error_t err;
-- gid_t eff, real, saved;
-+ gid_t real, eff, saved;
-
- HURD_CRITICAL_BEGIN;
- __mutex_lock (&_hurd_id.lock);
-@@ -42,8 +42,8 @@
- else
- {
- real = _hurd_id.aux.gids[0];
-- saved = _hurd_id.aux.ngids < 2 ? real :_hurd_id.aux.gids[1];
- eff = _hurd_id.gen.ngids < 1 ? real : _hurd_id.gen.gids[0];
-+ saved = _hurd_id.aux.ngids < 2 ? real : _hurd_id.aux.gids[1];
- }
- }
-
-@@ -53,8 +53,8 @@
- if (err)
- return __hurd_fail (err);
-
-- *egid = eff;
- *rgid = real;
-+ *egid = eff;
- *sgid = saved;
- return 0;
- }
-Index: sysdeps/mach/hurd/getresuid.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/getresuid.c,v
-retrieving revision 1.1
-diff -u -r1.1 getresuid.c
---- sysdeps/mach/hurd/getresuid.c 14 Oct 2002 01:03:11 -0000 1.1
-+++ sysdeps/mach/hurd/getresuid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,5 +1,5 @@
--/* getresuid -- fetch effective user ID, real user ID, and saved-set user ID
-- Copyright (C) 2002 Free Software Foundation, Inc.
-+/* getresuid -- fetch real user ID, effective user ID, and saved-set user ID
-+ Copyright (C) 2002, 2006 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,13 +22,13 @@
- #include <hurd.h>
- #include <hurd/id.h>
-
--/* Fetch the effective user ID, real user ID, and saved-set user ID,
-+/* Fetch the real user ID, effective user ID, and saved-set user ID,
- of the calling process. */
- int
--__getresuid (uid_t *euid, uid_t *ruid, uid_t *suid)
-+__getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
- {
- error_t err;
-- uid_t eff, real, saved;
-+ uid_t real, eff, saved;
-
- HURD_CRITICAL_BEGIN;
- __mutex_lock (&_hurd_id.lock);
-@@ -42,8 +42,8 @@
- else
- {
- real = _hurd_id.aux.uids[0];
-- saved = _hurd_id.aux.nuids < 2 ? real :_hurd_id.aux.uids[1];
- eff = _hurd_id.gen.nuids < 1 ? real : _hurd_id.gen.uids[0];
-+ saved = _hurd_id.aux.nuids < 2 ? real : _hurd_id.aux.uids[1];
- }
- }
-
-@@ -53,8 +53,8 @@
- if (err)
- return __hurd_fail (err);
-
-- *euid = eff;
- *ruid = real;
-+ *euid = eff;
- *suid = saved;
- return 0;
- }
-Index: sysdeps/mach/hurd/setresgid.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/setresgid.c,v
-retrieving revision 1.2
-diff -u -r1.2 setresgid.c
---- sysdeps/mach/hurd/setresgid.c 15 Feb 2005 03:08:38 -0000 1.2
-+++ sysdeps/mach/hurd/setresgid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,5 +1,5 @@
--/* setresgid -- set effective group ID, real group ID, and saved-set group ID
-- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
-+/* setresgid -- set real group ID, effective group ID, and saved-set group ID
-+ Copyright (C) 2002, 2005, 2006 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,10 +22,10 @@
- #include <hurd.h>
- #include <hurd/id.h>
-
--/* Set the effective group ID, real group ID, and saved-set group ID,
-- of the calling process to EGID, RGID, and SGID, respectively. */
-+/* Set the real group ID, effective group ID, and saved-set group ID,
-+ of the calling process to RGID, EGID, and SGID, respectively. */
- int
--__setresgid (gid_t egid, gid_t rgid, gid_t sgid)
-+__setresgid (gid_t rgid, gid_t egid, gid_t sgid)
- {
- auth_t newauth;
- error_t err;
-Index: sysdeps/mach/hurd/setresuid.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/setresuid.c,v
-retrieving revision 1.2
-diff -u -r1.2 setresuid.c
---- sysdeps/mach/hurd/setresuid.c 15 Feb 2005 03:08:38 -0000 1.2
-+++ sysdeps/mach/hurd/setresuid.c 15 Feb 2006 16:21:41 -0000
-@@ -1,5 +1,5 @@
--/* setresuid -- set effective user ID, real user ID, and saved-set user ID
-- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
-+/* setresuid -- set real user ID, effective user ID, and saved-set user ID
-+ Copyright (C) 2002, 2005, 2006 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,10 +22,10 @@
- #include <hurd.h>
- #include <hurd/id.h>
-
--/* Set the effective user ID, real user ID, and saved-set user ID,
-- of the calling process to EUID, RUID, and SUID, respectively. */
-+/* Set the real user ID, effective user ID, and saved-set user ID,
-+ of the calling process to RUID, EUID, and SUID, respectively. */
- int
--__setresuid (uid_t euid, uid_t ruid, uid_t suid)
-+__setresuid (uid_t ruid, uid_t euid, uid_t suid)
- {
- auth_t newauth;
- error_t err;
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-getresuid-dyslexia.diff (from rev 1339, glibc-package/trunk/debian/patches/hurd-getresuid-dyslexia.diff)
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-ioctl-pfinet.diff (from rev 1339, glibc-package/trunk/debian/patches/hurd-ioctl-pfinet.diff)
Copied: glibc-package/trunk/debian/patches/hurd-i386/cvs-machrules-make.diff (from rev 1339, glibc-package/trunk/debian/patches/hurd-machrules-make.diff)
Copied: glibc-package/trunk/debian/patches/hurd-i386/local-enable-ldconfig.diff (from rev 1339, glibc-package/trunk/debian/patches/hurd-enable-ldconfig.diff)
Copied: glibc-package/trunk/debian/patches/hurd-i386/submitted-ioctl-decode-argument.diff (from rev 1339, glibc-package/trunk/debian/patches/hurd-ioctl-decode-argument.diff)
Copied: glibc-package/trunk/debian/patches/hurd-i386/submitted-sysvshm.diff (from rev 1340, glibc-package/trunk/debian/patches/hurd-sysvshm.diff)
Deleted: glibc-package/trunk/debian/patches/hurd-ioctl-decode-argument.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-ioctl-decode-argument.diff 2006-04-07 09:04:55 UTC (rev 1340)
+++ glibc-package/trunk/debian/patches/hurd-ioctl-decode-argument.diff 2006-04-07 09:45:09 UTC (rev 1341)
@@ -1,58 +0,0 @@
-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.
-
---- sysdeps/mach/hurd/ioctl.c 2005-07-26 23:26:28.000000000 +0200
-+++ sysdeps/mach/hurd/ioctl.c 2005-07-26 23:24:07.000000000 +0200
-@@ -79,7 +79,7 @@ __ioctl (int fd, unsigned long int reque
- void *p;
- #endif
-
-- void *arg;
-+ void *arg = NULL;
-
- error_t err;
-
-@@ -130,7 +130,7 @@ __ioctl (int fd, unsigned long int reque
- 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. */
-@@ -197,11 +197,15 @@ __ioctl (int fd, unsigned long int reque
- 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. */
---- sysdeps/mach/hurd/bits/ioctls.h 2005-07-26 23:29:54.000000000 +0200
-+++ sysdeps/mach/hurd/bits/ioctls.h 2005-07-26 23:19:56.000000000 +0200
-@@ -118,6 +118,7 @@
- _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))
Deleted: glibc-package/trunk/debian/patches/hurd-ioctl-pfinet.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-ioctl-pfinet.diff 2006-04-07 09:04:55 UTC (rev 1340)
+++ glibc-package/trunk/debian/patches/hurd-ioctl-pfinet.diff 2006-04-07 09:45:09 UTC (rev 1341)
@@ -1,46 +0,0 @@
-#! /bin/sh -e
-
-# All lines beginning with `# DP:' are a description of the patch.
-# DP: Description: Add SIOCGIFHWADDR ioctls for hurd-i386.
-# DP: Related bugs: #295117
-# DP: Dpatch author: GOTO Masanori <gotom@debian.org>
-# DP: Patch author: Marco Gerards <metgerards@student.han.nl>
-# DP: Upstream status: Pending
-# DP: Status Details: Currently not applied in cvs, but it's needed.
-# DP: Date: 2005-07-17
-
-PATCHLEVEL=0
-
-if [ $# -ne 2 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch -d "$2" -f --no-backup-if-mismatch -p$PATCHLEVEL < $0;;
- -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p$PATCHLEVEL < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-esac
-exit 0
-
-# append the patch here and adjust the -p? flag in the patch calls.
-2004-08-03 Marco Gerards <metgerards@student.han.nl>
-
- * sysdeps/mach/hurd/bits/ioctls.h (SIOCGIFHWADDR): New macro.
-
-Index: sysdeps/mach/hurd/bits/ioctls.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/bits/ioctls.h,v
-retrieving revision 1.7
-diff -u -p -u -p -r1.7 ioctls.h
---- sysdeps/mach/hurd/bits/ioctls.h 6 Jul 2001 04:55:58 -0000 1.7
-+++ sysdeps/mach/hurd/bits/ioctls.h 3 Aug 2004 13:55:34 -0000
-@@ -226,6 +226,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_
- #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
- #define OSIOCGIFADDR _IOWR('i',13, struct ifreq) /* get ifnet address */
- #define SIOCGIFADDR _IOWR('i',33, struct ifreq) /* get ifnet address */
-+#define SIOCGIFHWADDR _IOWR('i',39, struct ifreq) /* get hwaddress */
- #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
- #define OSIOCGIFDSTADDR _IOWR('i',15, struct ifreq) /* get p-p address */
- #define SIOCGIFDSTADDR _IOWR('i',34, struct ifreq) /* get p-p address */
Deleted: glibc-package/trunk/debian/patches/hurd-machrules-make.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-machrules-make.diff 2006-04-07 09:04:55 UTC (rev 1340)
+++ glibc-package/trunk/debian/patches/hurd-machrules-make.diff 2006-04-07 09:45:09 UTC (rev 1341)
@@ -1,35 +0,0 @@
-# All lines beginning with `# DP:' are a description of the patch.
-# DP: Description: Fix GNU/Hurd build with make-3.81.
-# DP: Dpatch author: Michael Banck <mbanck@debian.org>
-# DP: Patch author: Roland McGrath
-# DP: Upstream status: Committed to HEAD, BZ #2507
-# DP: Date: 2006-04-04
-
-2006-04-03 Roland McGrath <roland@frob.com>
-
- [BZ #2507]
- * mach/Machrules (.udeps-targets): New variable.
- ($(objpfx)%.udeps static pattern rule): Use it to avoid \ inside
- quoted string.
-
-===================================================================
-RCS file: /cvs/glibc/libc/mach/Machrules,v
-retrieving revision 1.76
-retrieving revision 1.77
-diff -u -r1.76 -r1.77
---- libc/mach/Machrules 2006/02/01 22:44:28 1.76
-+++ libc/mach/Machrules 2006/04/04 00:22:05 1.77
-@@ -138,10 +138,11 @@
- # We must use $(CFLAGS) to get -O flags that affect #if's in header files.
- $(include-%.defs) | \
- $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \
-- sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\
-- $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \
-+ sed -e 's,- *:,$(.udeps-targets):,' \
- $(sed-remove-objpfx) > $@.new
- mv -f $@.new $@
-+.udeps-targets = $@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h) \
-+ $(@:.udeps=_server.c) $(@:.udeps=_server.h)
- endif
-
- # Look for the server stub files where they will be written.
Deleted: glibc-package/trunk/debian/patches/hurd-sysvshm.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-sysvshm.diff 2006-04-07 09:04:55 UTC (rev 1340)
+++ glibc-package/trunk/debian/patches/hurd-sysvshm.diff 2006-04-07 09:45:09 UTC (rev 1341)
@@ -1,782 +0,0 @@
-# All lines beginning with `# DP:' are a description of the patch.
-# DP: Description: Implement SysV shared memory for GNU/Hurd.
-# DP: Dpatch author: Michael Banck <mbanck@debian.org>
-# DP: Patch author: Marcus Brinkmann
-# DP: Upstream status: Unsubmitted, copyright assignments needed
-# DP: Date: 2005-07-11
-
-2005-07-11 Marcus Brinkmann <marcus@gnu.org>
-
- * hurd/Makefile (routines): Add sysvshm.
- (distribute): Add sysvshm.h.
- * hurd/sysvshm.h: New file.
- * hurd/sysvshm.c: New file.
- * sysdeps/mach/hurd/bits/stat.h (S_IMMAP0): New macro.
- (S_ISPARE): Unset the S_IMMAP0 flag.
- * sysdeps/mach/hurd/ftok.c: New file.
- * sysdeps/mach/hurd/shmat.c: New file.
- * sysdeps/mach/hurd/shmctl.c: New file.
- * sysdeps/mach/hurd/shmdt.c: New file.
-
-diff -rupN libc/hurd/Makefile libc-shm/hurd/Makefile
---- libc/hurd/Makefile 2002-10-14 03:03:09.000000000 +0200
-+++ libc-shm/hurd/Makefile 2005-07-12 12:27:06.000000000 +0200
-@@ -60,6 +60,7 @@ routines = hurdstartup hurdinit \
- vpprintf \
- ports-get ports-set hurdports hurdmsg \
- errno-loc \
-+ sysvshm \
- $(sig) $(dtable) $(inlines) port-cleanup report-wait
- sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
- trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
-@@ -68,7 +69,7 @@ dtable = dtable port2fd new-fd alloc-fd
- getdport openport \
- fd-close fd-read fd-write hurdioctl ctty-input ctty-output
- inlines = $(inline-headers:%.h=%-inlines)
--distribute = hurdstartup.h hurdfault.h hurdhost.h \
-+distribute = hurdstartup.h hurdfault.h hurdhost.h sysvshm.h \
- faultexc.defs intr-rpc.defs intr-rpc.h intr-msg.h Notes
-
- # XXX this is a temporary hack; see hurdmalloc.h
-diff -rupN libc/hurd/sysvshm.c libc-shm/hurd/sysvshm.c
---- libc/hurd/sysvshm.c 1970-01-01 01:00:00.000000000 +0100
-+++ libc-shm/hurd/sysvshm.c 2005-07-11 22:57:25.000000000 +0200
-@@ -0,0 +1,96 @@
-+/* Copyright (C) 2005 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 <string.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <stddef.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <fcntl.h>
-+#include <dirent.h>
-+#include <sys/stat.h>
-+#include <sys/shm.h>
-+
-+
-+/* Description of an shm attachment. */
-+struct sysvshm_attach
-+{
-+ /* Linked list. */
-+ struct sysvshm_attach *next;
-+
-+ /* Map address. */
-+ void *addr;
-+
-+ /* Map size. */
-+ size_t size;
-+};
-+
-+/* List of attachments. */
-+static struct sysvshm_attach *attach_list;
-+
-+/* A lock to protect the linked list of shared memory attachments. */
-+static struct mutex sysvshm_lock = MUTEX_INITIALIZER;
-+
-+
-+/* Adds a segment attachment. */
-+error_t
-+__sysvshm_add (void *addr, size_t size)
-+{
-+ struct sysvshm_attach *shm;
-+
-+ shm = malloc (sizeof (*shm));
-+ if (!shm)
-+ return errno;
-+
-+ __mutex_lock (&sysvshm_lock);
-+ shm->addr = addr;
-+ shm->size = size;
-+ shm->next = attach_list;
-+ attach_list = shm;
-+ __mutex_unlock (&sysvshm_lock);
-+
-+ return 0;
-+}
-+
-+/* Removes a segment attachment. Returns its size if found, or EINVAL
-+ otherwise. */
-+error_t
-+__sysvshm_remove (void *addr, size_t *size)
-+{
-+ struct sysvshm_attach *shm;
-+ struct sysvshm_attach **pshm = &attach_list;
-+
-+ __mutex_lock (&sysvshm_lock);
-+ shm = attach_list;
-+ while (shm)
-+ {
-+ shm = *pshm;
-+ if (shm->addr == addr)
-+ {
-+ *pshm = shm->next;
-+ *size = shm->size;
-+ __mutex_unlock (&sysvshm_lock);
-+ return 0;
-+ }
-+ pshm = &shm->next;
-+ shm = shm->next;
-+ }
-+ __mutex_unlock (&sysvshm_lock);
-+ return EINVAL;
-+}
-diff -rupN libc/hurd/sysvshm.h libc-shm/hurd/sysvshm.h
---- libc/hurd/sysvshm.h 1970-01-01 01:00:00.000000000 +0100
-+++ libc-shm/hurd/sysvshm.h 2005-07-11 22:57:25.000000000 +0200
-@@ -0,0 +1,47 @@
-+/* Copyright (C) 2005 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 <paths.h>
-+#include <hurd.h>
-+
-+/* The area (from top to bottom) that is used for private keys. These
-+ are all keys that have the second highest bit set. */
-+#define SHM_PRIV_KEY_START INT_MAX
-+#define SHM_PRIV_KEY_END ((INT_MAX / 2) + 1)
-+
-+#define SHM_PREFIX "shm-"
-+#define SHM_DIR _PATH_DEV "shm/"
-+
-+/* The maximum number of characters in a shared memory segment file name.
-+ 32 is the max number of characters in a 128 bit number in hex. */
-+#if __WORDSIZE > 128
-+#error Need to increase SHM_NAMEMAX.
-+#else
-+#define SHM_NAMEMAX (sizeof (SHM_PREFIX) - 1 + 32 + 1)
-+#endif
-+
-+/* Use this with printf and its variants. */
-+#define SHM_NAMEPRI SHM_PREFIX "%0x"
-+
-+
-+/* Adds a segment attachment. */
-+error_t __sysvshm_add (void *addr, size_t size);
-+
-+/* Removes a segment attachment. Returns its size if found, or EINVAL
-+ otherwise. */
-+error_t __sysvshm_remove (void *addr, size_t *size);
-diff -rupN libc/sysdeps/mach/hurd/bits/stat.h libc-shm/sysdeps/mach/hurd/bits/stat.h
---- libc/sysdeps/mach/hurd/bits/stat.h 2005-07-11 23:39:36.000000000 +0200
-+++ libc-shm/sysdeps/mach/hurd/bits/stat.h 2005-07-11 22:58:05.000000000 +0200
-@@ -1,4 +1,4 @@
--/* Copyright (C) 1992, 93, 94, 96, 97, 99, 2000 Free Software Foundation, Inc.
-+/* Copyright (C) 1992,93,94,96,97,99,2000,2005 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
-@@ -182,8 +182,11 @@ struct stat64
- /* All the bits relevant to translators */
- #define S_ITRANS 000070000000
-
-+/* Definitely no mmaps to this. */
-+#define S_IMMAP0 000100000000
-+
- /* ALL the unused bits. */
--#define S_ISPARE (~(S_IFMT|S_ITRANS|S_INOCACHE| \
-+#define S_ISPARE (~(S_IFMT|S_ITRANS|S_INOCACHE|S_IMMAP0| \
- S_IUSEUNK|S_IUNKNOWN|07777))
- #endif
-
-diff -rupN libc/sysdeps/mach/hurd/ftok.c libc-shm/sysdeps/mach/hurd/ftok.c
---- libc/sysdeps/mach/hurd/ftok.c 1970-01-01 01:00:00.000000000 +0100
-+++ libc-shm/sysdeps/mach/hurd/ftok.c 2005-07-11 22:57:25.000000000 +0200
-@@ -0,0 +1,43 @@
-+/* Copyright (C) 1995, 1996, 2000, 2005 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-+
-+ 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 <sys/ipc.h>
-+#include <sys/stat.h>
-+
-+
-+/* In the Hurd, we use the second-to-most-significant bit as flag for
-+ private keys. We use a different order of the components so that
-+ the biggest one---the inode number---is affected by this. */
-+
-+key_t
-+ftok (pathname, proj_id)
-+ const char *pathname;
-+ int proj_id;
-+{
-+ struct stat64 st;
-+ key_t key;
-+
-+ if (__xstat64 (_STAT_VER, pathname, &st) < 0)
-+ return (key_t) -1;
-+
-+ key = ((st.st_dev & 0xff) | ((proj_id & 0xff) << 8)
-+ | ((st.st_ino & 0x3fff) << 16));
-+
-+ return key;
-+}
-diff -rupN libc/sysdeps/mach/hurd/shmat.c libc-shm/sysdeps/mach/hurd/shmat.c
---- libc/sysdeps/mach/hurd/shmat.c 1970-01-01 01:00:00.000000000 +0100
-+++ libc-shm/sysdeps/mach/hurd/shmat.c 2005-07-12 12:28:20.000000000 +0200
-@@ -0,0 +1,78 @@
-+/* Copyright (C) 2005 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 <utime.h>
-+#include <stdio.h>
-+#include <assert.h>
-+#include <sys/mman.h>
-+#include <sys/ipc.h>
-+#include <sys/shm.h>
-+#include <sys/time.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+
-+#include "sysvshm.h"
-+
-+/* Attach the shared memory segment associated with SHMID to the data
-+ segment of the calling process. SHMADDR and SHMFLG determine how
-+ and where the segment is attached. */
-+void *
-+__shmat (int shmid, const void *shmaddr, int shmflg)
-+{
-+ error_t err;
-+ char filename[sizeof (SHM_DIR) - 1 + SHM_NAMEMAX];
-+ int fd;
-+ void *addr;
-+ struct stat statbuf;
-+ int res;
-+
-+ sprintf (filename, SHM_DIR SHM_NAMEPRI, shmid);
-+ fd = __open (filename, (shmflg & SHM_RDONLY) ? O_RDONLY : O_RDWR);
-+ if (fd < 0)
-+ {
-+ if (errno == ENOENT)
-+ errno = EINVAL;
-+ return (void *) -1;
-+ }
-+
-+ res = __fstat (fd, &statbuf);
-+ if (res < 0)
-+ {
-+ __close (fd);
-+ return (void *) -1;
-+ }
-+
-+ addr = __mmap ((void *) shmaddr, statbuf.st_size,
-+ PROT_READ | ((shmflg & SHM_RDONLY) ? 0 : PROT_WRITE),
-+ MAP_SHARED, fd, 0);
-+ __close (fd);
-+ if (addr == MAP_FAILED)
-+ return (void *) -1;
-+
-+ err = __sysvshm_add (addr, statbuf.st_size);
-+ if (err)
-+ {
-+ munmap (addr, statbuf.st_size);
-+ return (void *) -1;
-+ }
-+
-+ return addr;
-+}
-+
-+weak_alias(__shmat, shmat)
-diff -rupN libc/sysdeps/mach/hurd/shmctl.c libc-shm/sysdeps/mach/hurd/shmctl.c
---- libc/sysdeps/mach/hurd/shmctl.c 1970-01-01 01:00:00.000000000 +0100
-+++ libc-shm/sysdeps/mach/hurd/shmctl.c 2005-07-12 12:28:25.000000000 +0200
-@@ -0,0 +1,132 @@
-+/* Copyright (C) 2005 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 <stdio.h>
-+#include <unistd.h>
-+#include <sys/mman.h>
-+#include <sys/ipc.h>
-+#include <sys/shm.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+
-+#include "sysvshm.h"
-+
-+/* Provide operations to control over shared memory segments. */
-+int
-+__shmctl (int id, int cmd, struct shmid_ds *buf)
-+{
-+ error_t err = 0;
-+ int fd;
-+ int res;
-+ char filename[sizeof (SHM_DIR) - 1 + SHM_NAMEMAX];
-+ struct stat statbuf;
-+
-+ sprintf (filename, SHM_DIR SHM_NAMEPRI, id);
-+ /* SysV requires read access for IPC_STAT. */
-+ fd = __open (filename, O_NORW);
-+ if (fd < 0)
-+ {
-+ if (errno == ENOENT)
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ res = __fstat (fd, &statbuf);
-+ if (res < 0)
-+ {
-+ err = errno;
-+ __close (fd);
-+ errno = err;
-+ return -1;
-+ }
-+
-+ switch (cmd)
-+ {
-+ case IPC_STAT:
-+
-+ buf->shm_perm.__key = id;
-+ buf->shm_perm.uid = statbuf.st_uid;
-+ buf->shm_perm.gid = statbuf.st_gid;
-+
-+ /* We do not support the creator. */
-+ buf->shm_perm.cuid = statbuf.st_uid;
-+ buf->shm_perm.cgid = statbuf.st_gid;
-+
-+ /* We just want the protection bits. */
-+ buf->shm_perm.mode = statbuf.st_mode & 0777;
-+ /* Hopeless. We do not support a sequence number. */
-+ buf->shm_perm.__seq = statbuf.st_ino;
-+ buf->shm_segsz = statbuf.st_size;
-+
-+ /* Hopeless. We do not support any of these. */
-+ buf->shm_atime = statbuf.st_atime;
-+ buf->shm_dtime = statbuf.st_mtime;
-+ /* Well, this comes at least close. */
-+ buf->shm_ctime = statbuf.st_ctime;
-+
-+ /* We do not support the PID. */
-+ buf->shm_cpid = 0;
-+ buf->shm_lpid = 0;
-+
-+ if (statbuf.st_mode & S_IMMAP0)
-+ buf->shm_nattch = 0;
-+ else
-+ /* 42 is the answer. Of course this is bogus, but for most
-+ applications, this should be fine. */
-+ buf->shm_nattch = 42;
-+
-+ break;
-+
-+ case IPC_SET:
-+ if (statbuf.st_uid != buf->shm_perm.uid
-+ || statbuf.st_gid != buf->shm_perm.gid)
-+ {
-+ res = __fchown (fd,
-+ (statbuf.st_uid != buf->shm_perm.uid)
-+ ? buf->shm_perm.uid : -1,
-+ (statbuf.st_gid != buf->shm_perm.gid)
-+ ? buf->shm_perm.gid : -1);
-+ if (res < 0)
-+ err = errno;
-+ }
-+
-+ if (!err && statbuf.st_mode & 0777 != buf->shm_perm.mode & 0777)
-+ {
-+ res = __fchmod (fd, (statbuf.st_mode & ~0777)
-+ | (buf->shm_perm.mode & 0777));
-+ if (res < 0)
-+ err = errno;
-+ }
-+ break;
-+
-+ case IPC_RMID:
-+ res = __unlink (filename);
-+ /* FIXME: Check error (mapping ENOENT to EINVAL). */
-+ break;
-+
-+ default:
-+ err = EINVAL;
-+ }
-+
-+ __close (fd);
-+ errno = err;
-+ return err ? -1 : 0;
-+}
-+
-+weak_alias(__shmctl, shmctl)
-diff -rupN libc/sysdeps/mach/hurd/shmdt.c libc-shm/sysdeps/mach/hurd/shmdt.c
---- libc/sysdeps/mach/hurd/shmdt.c 1970-01-01 01:00:00.000000000 +0100
-+++ libc-shm/sysdeps/mach/hurd/shmdt.c 2005-07-11 22:57:25.000000000 +0200
-@@ -0,0 +1,51 @@
-+/* Copyright (C) 2005 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 <stdio.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <assert.h>
-+#include <sys/mman.h>
-+#include <sys/ipc.h>
-+#include <sys/shm.h>
-+#include <sys/time.h>
-+#include <sys/stat.h>
-+
-+#include "sysvshm.h"
-+
-+/* Detach shared memory segment starting at address specified by
-+ SHMADDR from the caller's data segment. */
-+int
-+__shmdt (const void *shmaddr)
-+{
-+ error_t err;
-+ size_t size;
-+
-+ err = __sysvshm_remove ((void *) shmaddr, &size);
-+ if (err)
-+ {
-+ errno = err;
-+ return -1;
-+ }
-+
-+ __munmap ((void *) shmaddr, size);
-+ return 0;
-+}
-+
-+weak_alias(__shmdt, shmdt)
-diff -rupN libc/sysdeps/mach/hurd/shmget.c libc-shm/sysdeps/mach/hurd/shmget.c
---- libc/sysdeps/mach/hurd/shmget.c 1970-01-01 01:00:00.000000000 +0100
-+++ libc-shm/sysdeps/mach/hurd/shmget.c 2005-07-11 22:57:25.000000000 +0200
-@@ -0,0 +1,245 @@
-+/* Copyright (C) 2005 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 <stdbool.h>
-+#include <stdlib.h>
-+#include <errno.h>
-+#include <sys/shm.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <limits.h>
-+#include <stdio.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+
-+#include <hurd/fd.h>
-+
-+#include "sysvshm.h"
-+
-+/* Create a new shared memory segment file without linking it into the
-+ filesystem. Return the directory and file ports in R_DIR and R_FILE. */
-+static error_t
-+create_shm_file (size_t size, int flags, file_t *r_dir, file_t *r_file)
-+{
-+ error_t err;
-+ file_t dir;
-+ file_t file;
-+
-+ flags &= 0777;
-+
-+ /* Get a port to the directory that will contain the file. */
-+ dir = __file_name_lookup (SHM_DIR, 0, 0);
-+ if (dir == MACH_PORT_NULL)
-+ return errno;
-+
-+ /* Create an unnamed file in the directory. */
-+ err = __dir_mkfile (dir, O_RDWR, flags, &file);
-+ if (err)
-+ {
-+ __mach_port_deallocate (__mach_task_self (), dir);
-+ return err;
-+ }
-+
-+ err = __file_set_size (file, size);
-+ if (err)
-+ {
-+ __mach_port_deallocate (__mach_task_self (), file);
-+ __mach_port_deallocate (__mach_task_self (), dir);
-+
-+ return err;
-+ }
-+
-+ *r_dir = dir;
-+ *r_file = file;
-+
-+ return 0;
-+}
-+
-+
-+/* Open the shared memory segment *R_KEY and return a file descriptor
-+ to it in R_FD. If KEY is IPC_PRIVATE, use a private key and return
-+ it in R_KEY. */
-+static error_t
-+get_exclusive (int shmflags, size_t size, key_t *r_key, int *r_fd)
-+{
-+ error_t err;
-+ file_t dir;
-+ file_t file;
-+ char filename[SHM_NAMEMAX];
-+ key_t key = *r_key;
-+ bool is_private;
-+
-+ /* Create the shared memory segment. */
-+ err = create_shm_file (size, shmflags, &dir, &file);
-+ if (err)
-+ return err;
-+
-+ if (key == IPC_PRIVATE)
-+ {
-+ is_private = true;
-+ key = SHM_PRIV_KEY_START;
-+
-+ /* Try to link the shared memory segment into the filesystem
-+ (exclusively). Private segments have negative keys. */
-+ do
-+ {
-+ sprintf (filename, SHM_NAMEPRI, key);
-+ err = __dir_link (dir, file, filename, 1);
-+ if (!err)
-+ {
-+ /* We are done. */
-+ *r_key = key;
-+ break;
-+ }
-+ else if (err == EEXIST)
-+ {
-+ /* Check if we ran out of keys. If not, try again with new
-+ key. */
-+ if (key == SHM_PRIV_KEY_END)
-+ err = ENOSPC;
-+ else
-+ err = 0;
-+
-+ key--;
-+ }
-+ }
-+ while (!err);
-+ }
-+ else
-+ {
-+ /* Try to link the shared memory segment into the filesystem
-+ (exclusively) under the given key. */
-+ sprintf (filename, SHM_NAMEPRI, key);
-+ err = __dir_link (dir, file, filename, 1);
-+ }
-+
-+ __mach_port_deallocate (__mach_task_self (), dir);
-+
-+ if (!err)
-+ {
-+ int fd;
-+
-+ /* Get a file descriptor for that port. */
-+ fd = _hurd_intern_fd (file, O_RDWR, 1); /* dealloc on error */
-+ if (fd < 0)
-+ err = errno;
-+ else
-+ *r_fd = fd;
-+ }
-+
-+ return err;
-+}
-+
-+
-+/* Open the shared memory segment KEY (creating it if it doesn't yet
-+ exist) and return a file descriptor to it in R_FD. */
-+static error_t
-+get_shared (int shmflags, size_t size, key_t key, int *r_fd)
-+{
-+ error_t err = 0;
-+ char filename[sizeof (SHM_DIR) - 1 + SHM_NAMEMAX];
-+ int fd = -1;
-+ int create_flag;
-+
-+ create_flag = (shmflags & IPC_CREAT) ? O_CREAT : 0;
-+ sprintf (filename, SHM_DIR SHM_NAMEPRI, key);
-+
-+ do
-+ {
-+ fd = __open (filename, O_NORW | create_flag, shmflags & 0777);
-+
-+ if (fd < 0 && errno != ENOENT)
-+ /* We give up. */
-+ return errno;
-+ else if (fd >= 0)
-+ {
-+ int res;
-+ struct stat statbuf;
-+
-+ /* Check the size (we only need to do this if we did not
-+ create the shared memory segment file ourselves). */
-+ res = __fstat (fd, &statbuf);
-+ if (res < 0)
-+ {
-+ err = errno;
-+ __close (fd);
-+ return err;
-+ }
-+
-+ if (statbuf.st_size < size)
-+ {
-+ __close (fd);
-+ return EINVAL;
-+ }
-+ }
-+ else
-+ {
-+ /* The memory segment doesn't exist. */
-+ if (create_flag)
-+ {
-+ /* Try to create it exclusively. */
-+ err = get_exclusive (shmflags, size, &key, &fd);
-+ if (err == EEXIST)
-+ /* If somebody created it in the meanwhile, just try again. */
-+ err = 0;
-+ }
-+ else
-+ err = ENOENT;
-+ }
-+ }
-+ while (fd < 0 && !err);
-+
-+ if (!err)
-+ *r_fd = fd;
-+ else
-+ *r_fd = -1;
-+
-+ return err;
-+}
-+
-+/* Return an identifier for an shared memory segment of at least size
-+ SIZE which is associated with KEY. */
-+int
-+__shmget (key_t key, size_t size, int shmflags)
-+{
-+ error_t err;
-+ int fd;
-+
-+ if (key == IPC_PRIVATE || shmflags & IPC_EXCL)
-+ /* An exclusive shared memory segment must be created. */
-+ err = get_exclusive (shmflags, size, &key, &fd);
-+ else
-+ err = get_shared (shmflags, size, key, &fd);
-+
-+ if (err)
-+ {
-+ errno = err;
-+ return -1;
-+ }
-+
-+ /* From here, we can't fail. That's important, as otherwise we
-+ would need to unlink the file if we created it (in that case, the
-+ code above would have to be changed to pass a "created" flag down
-+ to the caller). */
-+
-+ __close (fd);
-+
-+ return key;
-+}
-+
-+weak_alias(__shmget, shmget)
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2006-04-07 09:04:55 UTC (rev 1340)
+++ glibc-package/trunk/debian/patches/series 2006-04-07 09:45:09 UTC (rev 1341)
@@ -71,6 +71,13 @@
hppa/cvs-pie-relocs.diff -p1
hppa/submitted-fpu.diff -p1
+hurd-i386/cvs-getresuid-dyslexia.diff -p0
+hurd-i386/cvs-ioctl-pfinet.diff -p0
+hurd-i386/cvs-machrules-make.diff -p1
+hurd-i386/local-enable-ldconfig.diff -p1
+hurd-i386/submitted-ioctl-decode-argument.diff -p0
+hurd-i386/submitted-sysvshm.diff -p1
+
i386/local-biarch.diff -p1
mips/local-mips.diff -p0
@@ -81,6 +88,7 @@
sparc/local-sparcv8-target.diff -p0
sparc/submitted-socket-weakalias.diff -p0
+hurd-i386/
glibc-i686-timing.diff -p1
glibc-sparc-timing.diff -p1
makeconfig.diff -p0
@@ -101,7 +109,6 @@
glibc23-cmov.diff -p0
libgcc-compat-all.diff -p0
libgcc-compat-other.diff -p1
-hurd-enable-ldconfig.diff -p1
#30_glibc232-base.diff -p0 # g: suspended
50_glibc232-arm-dwarf2-buildfix.diff -p0
50_glibc232-m68k-dwarf2-buildfix.diff -p0
@@ -128,7 +135,6 @@
glibc235-gcc4-sparc-mv8.diff -p0
glibc235-gcc4-mips-inline.diff -p0
glibc235-gcc4-mips-sysdeps.diff -p0
-hurd-ioctl-pfinet.diff -p0
glibc235-hppa-lt.diff -p1
glibc235-hppa-sysdeps.diff -p1
glibc235-gcc4-alpha-profile.diff -p0
@@ -144,11 +150,7 @@
powerpc-executable-got.diff -p0
glibc235-nis-netgrp.diff
forward-backward-collation.diff
-hurd-getresuid-dyslexia.diff -p0
-hurd-ioctl-decode-argument.diff -p0
resource_h.diff -p1
hppa-inlining.diff -p1
strfmon.diff
siginfo_h.diff -p1
-hurd-machrules-make.diff -p1
-hurd-sysvshm.diff -p1
Reply to: