about summary refs log tree commit diff
path: root/mach
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /mach
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'mach')
-rw-r--r--mach/Machrules14
-rw-r--r--mach/err_kern.sub11
-rw-r--r--mach/err_server.sub26
-rw-r--r--mach/err_us.sub26
-rw-r--r--mach/error_compat.c41
-rw-r--r--mach/errorlib.h28
-rw-r--r--mach/errstring.c40
-rw-r--r--mach/mach/error.h23
-rw-r--r--mach/mach_error.c48
-rw-r--r--mach/mach_error.h33
-rw-r--r--mach/mig-reply.c53
-rw-r--r--mach/msg-destroy.c31
-rw-r--r--mach/msgserver.c40
-rw-r--r--mach/setup-thread.c4
-rw-r--r--mach/shortcut.awk2
15 files changed, 133 insertions, 287 deletions
diff --git a/mach/Machrules b/mach/Machrules
index 79dec997e9..37693aec43 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -1,5 +1,5 @@
 # Rules for MiG interfaces that want to go into the C library.
-# Copyright (C) 1991,92,93,94,95,96,98,99,2001,02
+# Copyright (C) 1991,1992,1993,1994,1995,1996,1998,1999,2001,2002,2006
 #	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -138,10 +138,11 @@ $(patsubst %,$(objpfx)%.udeps,$(user-interfaces)):
 # 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.
@@ -158,14 +159,14 @@ $(objpfx)%_server.c $(objpfx)%_server.h:
 
 # To get header files that declare both the straight and __ functions,
 # we generate two files and paste them together.
-$(objpfx)%.uh:; $(mig.uh)
+$(patsubst %,$(objpfx)%.uh,$(user-interfaces)): $(objpfx)%.uh:; $(mig.uh)
 define mig.uh
 $(make-target-directory)
 $(include-%.defs) | \
 $(MIG) - /dev/null $(MIGFLAGS) $(MIGFLAGS-$*) \
        -header $@ -server /dev/null -user /dev/null
 endef
-$(objpfx)%.__h:; $(mig.__h)
+$(patsubst %,$(objpfx)%.__h,$(user-interfaces)): $(objpfx)%.__h:; $(mig.__h)
 define mig.__h
 $(make-target-directory)
 $(include-%.defs) | \
@@ -173,7 +174,8 @@ $(MIG) - /dev/null $(MIGFLAGS) $(MIGFLAGS-$*) -prefix __ \
        -header $@ -server /dev/null -user /dev/null
 endef
 
-$(objpfx)%.h: $(objpfx)%.__h $(objpfx)%.uh
+$(patsubst %,$(objpfx)%.h,$(user-interfaces)): $(objpfx)%.h: $(objpfx)%.__h \
+							     $(objpfx)%.uh
 # The last line of foo.__h is "#endif _foo_user_".
 # The first two lines of foo.uh are "#ifndef _foo_user_"/"#define _foo_user_".
 	(sed -e '$$d' $<; sed -e '1,2d' $(word 2,$^)) > $@-new
diff --git a/mach/err_kern.sub b/mach/err_kern.sub
index e2e498d2b7..ab00ae40f2 100644
--- a/mach/err_kern.sub
+++ b/mach/err_kern.sub
@@ -24,16 +24,7 @@
  * rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.5  1996/12/20 01:32:34  drepper
- * Update from main archive 961219
- *
- * Revision 1.5  1996/12/19 20:23:39  drepper
- * Spelling corrections.
- *
- * Revision 1.4  1993/12/17 06:14:52  mib
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.3  92/04/01  19:38:02  rpd
  * 	Added err_codes_device.
diff --git a/mach/err_server.sub b/mach/err_server.sub
index 1594246462..a2f806aa09 100644
--- a/mach/err_server.sub
+++ b/mach/err_server.sub
@@ -1,48 +1,45 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  */
 /*
  * HISTORY
- * $Log$
- * Revision 1.1  1992/10/06 18:29:53  roland
- * entered into RCS
  *
  * Revision 2.2  92/01/16  00:10:29  rpd
  * 	Moved from user collection to mk collection.
- * 
+ *
  * Revision 2.3  91/08/29  15:51:39  rpd
  * 	Fixed err_codes_netname.
  * 	[91/08/22            rpd]
- * 
+ *
  * Revision 2.2  91/03/27  16:05:51  mrt
  * 	First checkin
- * 
+ *
  * Revision 2.3  90/10/29  17:27:20  dpj
  * 	Merged-up to U25
  * 	[90/09/02  20:00:25  dpj]
- * 
+ *
  */
 /*
  *	File:	err_server.sub
@@ -371,4 +368,3 @@ static struct error_subsystem err_server_sub[] = {
 	},
 
 };
-
diff --git a/mach/err_us.sub b/mach/err_us.sub
index 7261165d8d..184f11d369 100644
--- a/mach/err_us.sub
+++ b/mach/err_us.sub
@@ -1,40 +1,37 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  */
 /*
  * HISTORY
- * $Log$
- * Revision 1.2  1993/11/23 21:14:05  mib
- * entered into RCS
  *
  * Revision 2.2  92/01/16  00:10:45  rpd
  * 	Moved from user collection to mk collection.
- * 
+ *
  * Revision 2.2  91/03/27  16:06:06  mrt
  * 	First checkin
- * 
+ *
  */
 /*
  *	File:	err_us.sub
@@ -49,8 +46,3 @@
 static struct error_subsystem err_us_sub[] = {
 	{0,0,0}
 };
-
-
-
-
-
diff --git a/mach/error_compat.c b/mach/error_compat.c
index e874dd43d4..8f7bd87c0f 100644
--- a/mach/error_compat.c
+++ b/mach/error_compat.c
@@ -1,54 +1,33 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
 
 /* This file was broken out from:
-	$Log$
-	Revision 1.2  1997/03/16 17:41:36  drepper
-	(__mach_error_map_compat): Give full prototype.
-
-	Revision 1.2  1997/03/14 15:26:28  thomas
-	Wed Mar  5 10:40:05 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>
-
-		* mach/mach_error.c (mach_error_string_int): Give full prototype.
-		* mach/errstring.c (mach_error_string_int): Likewise.
-		* mach/error_compat.c (__mach_error_map_compat): Likewise.
-
-		* mach/spin-solid.c: Include <mach/mach_traps.h>.
-		* mach/spin-solid.c (__spin_lock_solid): Provide arg to
-		swtch_pri.
-
-		* mach/mach_init.c: Include <mach/mig_support.h>.
-
-		* mach/mach_error.h (mach_error_string, mach_error,
-		mach_error_type): Always provide prototypes.
-
-	Revision 1.1  1993/11/30 17:35:24  roland
-	entered into RCS
 
 	Revision 2.3  92/04/01  19:38:18  rpd
+
    The static do_compat function is renamed to be globally accessible.
  */
 
@@ -62,9 +41,9 @@ __mach_error_map_compat(mach_error_t  *org_err)
 {
 	mach_error_t		err = *org_err;
 
-	/* 
-	 * map old error numbers to 
-	 * to new error sys & subsystem 
+	/*
+	 * map old error numbers to
+	 * to new error sys & subsystem
 	 */
 
 	if ((-200 < err) && (err <= -100))
diff --git a/mach/errorlib.h b/mach/errorlib.h
index 7fe6350b43..ff0c55eb36 100644
--- a/mach/errorlib.h
+++ b/mach/errorlib.h
@@ -1,47 +1,41 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.5  1995/03/10 23:57:44  roland
- * (errors): Use const for decl.
- *
- * Revision 1.4  1993/12/17  21:56:16  roland
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.3  92/03/31  15:18:52  rpd
  * 	Added KERN_DEVICE_MOD for device errors.
  * 	[92/03/09            rpd]
- * 
+ *
  * Revision 2.2  92/01/16  00:21:17  rpd
  * 	Moved from user collection to mk collection.
- * 
+ *
  * Revision 2.2  91/03/27  15:37:37  mrt
  * 	First checkin
- * 
+ *
  */
 /*
  *	File:	errorlib.h
diff --git a/mach/errstring.c b/mach/errstring.c
index e56fa728cc..52cf1eb46e 100644
--- a/mach/errstring.c
+++ b/mach/errstring.c
@@ -1,62 +1,40 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.2  1997/03/16 17:41:48  drepper
- * (mach_error_string_int): Give full prototype.
- *
- * Revision 1.2  1997/03/14 15:26:29  thomas
- * Wed Mar  5 10:40:05 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>
- *
- * 	* mach/mach_error.c (mach_error_string_int): Give full prototype.
- * 	* mach/errstring.c (mach_error_string_int): Likewise.
- * 	* mach/error_compat.c (__mach_error_map_compat): Likewise.
- *
- * 	* mach/spin-solid.c: Include <mach/mach_traps.h>.
- * 	* mach/spin-solid.c (__spin_lock_solid): Provide arg to
- * 	swtch_pri.
- *
- * 	* mach/mach_init.c: Include <mach/mig_support.h>.
- *
- * 	* mach/mach_error.h (mach_error_string, mach_error,
- * 	mach_error_type): Always provide prototypes.
- *
- * Revision 1.1  1993/11/30 17:35:58  roland
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.3  92/04/01  19:38:18  rpd
  * 	Updated do_compat for kernel device errors,
  * 	bootstrap file-system errors.
  * 	[92/03/09            rpd]
- * 
+ *
  * Revision 2.2  92/02/20  15:58:08  elf
  * 	Created from mach_error.c.
  * 	[92/02/11            rpd]
- * 
+ *
  */
 
 #define EXPORT_BOOLEAN
diff --git a/mach/mach/error.h b/mach/mach/error.h
index 70f189f65e..084d8afd37 100644
--- a/mach/mach/error.h
+++ b/mach/mach/error.h
@@ -25,28 +25,7 @@
  * the rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.3  1997/03/16 17:43:08  drepper
- * (mach_error_fn_t): Comment out declaration; it appears to be entirely
- * unused dead code.
- *
- * Revision 1.3  1997/03/14 15:27:35  thomas
- * Wed Mar  5 10:40:05 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>
- *
- * 	* mach/mach/mach_traps.h: Include <mach/kern_return.h>.
- *
- * 	* mach/mach/error.h (mach_error_fn_t): Comment out declaration; it
- * 	appears to be entirely unused dead code.
- *
- * Revision 1.2  1996/12/20 01:32:36  drepper
- * Update from main archive 961219
- *
- * Revision 1.2  1996/12/19 20:23:56  drepper
- * Spelling corrections.
- *
- * Revision 1.1  1993/12/17 21:40:28  roland
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.6  93/01/14  17:41:31  danner
  * 	Standardized include symbol name.
diff --git a/mach/mach_error.c b/mach/mach_error.c
index f6f945fd73..8bbb2ec74e 100644
--- a/mach/mach_error.c
+++ b/mach/mach_error.c
@@ -1,73 +1,51 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.2  1997/03/16 17:42:02  drepper
- * (mach_error_string_int): Give full prototype.
- *
- * Revision 1.2  1997/03/14 15:26:30  thomas
- * Wed Mar  5 10:40:05 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>
- *
- * 	* mach/mach_error.c (mach_error_string_int): Give full prototype.
- * 	* mach/errstring.c (mach_error_string_int): Likewise.
- * 	* mach/error_compat.c (__mach_error_map_compat): Likewise.
- *
- * 	* mach/spin-solid.c: Include <mach/mach_traps.h>.
- * 	* mach/spin-solid.c (__spin_lock_solid): Provide arg to
- * 	swtch_pri.
- *
- * 	* mach/mach_init.c: Include <mach/mig_support.h>.
- *
- * 	* mach/mach_error.h (mach_error_string, mach_error,
- * 	mach_error_type): Always provide prototypes.
- *
- * Revision 1.1  1992/10/06 18:29:54  roland
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.4  92/02/19  15:10:52  elf
  * 	Moved mach_error_string and mach_error_type to mach_error_string.c.
  * 	[92/02/11            rpd]
- * 
+ *
  * Revision 2.3  92/01/23  15:22:06  rpd
  * 	Changed <servers/errorlib.h> to <errorlib.h>.
  * 	[92/01/16            rpd]
- * 
+ *
  * Revision 2.2  92/01/16  00:08:03  rpd
  * 	Moved from user collection to mk collection.
- * 
+ *
  * Revision 2.3  91/08/29  15:51:50  rpd
  * 	Changed IPC_MIG_MOD to MACH_IPC_MIG_MOD, to get the new error strings.
  * 	[91/08/22            rpd]
- * 
+ *
  * Revision 2.2  91/03/27  16:06:29  mrt
  * 	Changed include of "errorlib.h" to <servers/errorlib.h>
  * 	Added new copyright
  * 	[91/03/20            mrt]
- * 
+ *
  */
 /*
  * 	File:	mach_error.c
@@ -85,7 +63,7 @@
 extern char * mach_error_string_int(mach_error_t, boolean_t *);
 
 void
-mach_error( str, err )	
+mach_error( str, err )
 	char	*str;
 	mach_error_t		err;
 {
diff --git a/mach/mach_error.h b/mach/mach_error.h
index 78f7c526ea..fc4a3fed7e 100644
--- a/mach/mach_error.h
+++ b/mach/mach_error.h
@@ -24,38 +24,7 @@
  * rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.4  2001/04/01 05:03:14  roland
- * 2001-03-11  Roland McGrath  <roland@frob.com>
- *
- * 	* mach/mach_error.h: Fix ancient #endif syntax.
- * 	* hurd/hurdmalloc.c: Likewise.
- *
- * Revision 1.3  1997/03/16 17:42:25  drepper
- * (mach_error_string, mach_error, mach_error_type): Always provide
- * prototypes.
- * (mach_error_fn_t): Comment out declaration; it appears to be entirely
- * unused dead code.
- *
- * Revision 1.3  1997/03/14 15:26:31  thomas
- * Wed Mar  5 10:40:05 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>
- *
- * 	* mach/mach_error.c (mach_error_string_int): Give full prototype.
- * 	* mach/errstring.c (mach_error_string_int): Likewise.
- * 	* mach/error_compat.c (__mach_error_map_compat): Likewise.
- *
- * 	* mach/spin-solid.c: Include <mach/mach_traps.h>.
- * 	* mach/spin-solid.c (__spin_lock_solid): Provide arg to
- * 	swtch_pri.
- *
- * 	* mach/mach_init.c: Include <mach/mig_support.h>.
- *
- * 	* mach/mach_error.h (mach_error_string, mach_error,
- * 	mach_error_type): Always provide prototypes.
- *
- * Revision 1.2  1993/11/23 20:39:08  mib
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.2  92/01/16  00:08:10  rpd
  * 	Moved from user collection to mk collection.
diff --git a/mach/mig-reply.c b/mach/mig-reply.c
new file mode 100644
index 0000000000..3b02028858
--- /dev/null
+++ b/mach/mig-reply.c
@@ -0,0 +1,53 @@
+/* Copyright (C) 1992, 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.  */
+
+#include <mach.h>
+
+/* These functions are called by MiG-generated code.  */
+
+static mach_port_t reply_port;
+
+/* Called by MiG to get a reply port.  */
+mach_port_t
+__mig_get_reply_port (void)
+{
+  if (reply_port == MACH_PORT_NULL)
+    reply_port = __mach_reply_port ();
+
+  return reply_port;
+}
+
+/* Called by MiG to deallocate the reply port.  */
+void
+__mig_dealloc_reply_port (void)
+{
+  mach_port_t port = reply_port;
+  reply_port = MACH_PORT_NULL;	/* So the mod_refs RPC won't use it.  */
+  __mach_port_mod_refs (__mach_task_self (), port,
+			MACH_PORT_RIGHT_RECEIVE, -1);
+}
+
+
+/* Called at startup with CPROC == NULL.  cthreads has a different version
+   of this function that is sometimes called with a `cproc_t' pointer.  */
+void
+__mig_init (void *cproc)
+{
+  if (cproc == 0)
+    reply_port = MACH_PORT_NULL;
+}
diff --git a/mach/msg-destroy.c b/mach/msg-destroy.c
index 9ecbdc0512..19f96d4e21 100644
--- a/mach/msg-destroy.c
+++ b/mach/msg-destroy.c
@@ -24,36 +24,7 @@
  * the rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.6  2002/02/17 07:13:36  roland
- * 2002-02-16  Roland McGrath  <roland@frob.com>
- *
- * 	* mach/msg-destroy.c (__mach_msg_destroy) [MACH_MSG_PORT_DESCRIPTOR]:
- * 	Grok the OSF flavor of message format.
- * 	(mach_msg_destroy_port): For MAKE_SEND and
- * 	MAKE_SEND_ONCE rights, create an destroy a right to ensure proper
- * 	no-senders notification.
- *
- * Revision 1.5  1997/06/21 01:40:07  drepper
- * More 64bit changes.
- *
- * Revision 1.4  1996/11/15 19:44:43  thomas
- * Tue Nov 12 16:58:41 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>
- *
- * 	* mach/mach.h (__mach_msg_destroy, mach_msg_destroy, __mach_msg):
- *  	Provide prototypes.
- *
- * 	* mach/msg-destroy.c (mach_msg_destroy_port,
- * 	mach_msg_destroy_memory): Use prototype	syntax.
- * 	* hurd/hurdmalloc.c (more_memory, malloc_fork_prepare,
- * 	malloc_fork_parent, malloc_fork_child): Likewise.
- *
- * Revision 1.3  1995/01/23 22:16:52  roland
- * (mach_msg_destroy): Define as weak alias for __mach_msg_destroy.
- *
- * Revision 1.2  1993/08/03  06:13:18  roland
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.4  91/05/14  17:53:15  mrt
  * 	Correcting copyright
diff --git a/mach/msgserver.c b/mach/msgserver.c
index 82dc3d0c8f..9478ae1914 100644
--- a/mach/msgserver.c
+++ b/mach/msgserver.c
@@ -47,45 +47,7 @@
  * the rights to redistribute these changes.
  */
 /*
- * HISTORY
- * $Log$
- * Revision 1.9  2002/02/18 20:56:35  roland
- * 2002-02-18  Roland McGrath  <roland@frob.com>
- *
- * 	* mach/msgserver.c (__mach_msg_server_timeout) [! MACH_RCV_LARGE]:
- * 	Double MAX_SIZE and don't retry on MACH_RCV_TOO_LARGE.
- *
- * Revision 1.8  2002/02/17 07:13:32  roland
- * 2002-02-16  Roland McGrath  <roland@frob.com>
- *
- * 	* mach/msgserver.c [NDR_CHAR_ASCII] (mig_reply_header_t): #define as
- * 	mig_reply_error_t for OSF Mach variant.
- *
- * Revision 1.7  2001/07/06 04:55:34  aj
- * Update to LGPL v2.1.
- *
- * Revision 1.6  2001/04/09 21:23:38  roland
- * 2001-04-07  Roland McGrath  <roland@frob.com>
- *
- * 	* mach/msgserver.c (__mach_msg_server_timeout): Add an assert.
- *
- * Revision 1.5  1996/12/20 01:32:35  drepper
- * Update from main archive 961219
- *
- * Revision 1.5  1996/12/19 20:23:45  drepper
- * Spelling corrections.
- *
- * Revision 1.4  1996/01/29 15:44:23  roland
- * Declare DEMUX arg with prototype.
- *
- * Revision 1.3  1995/01/21  15:00:57  roland
- * Converted to use weak aliases with macros from libc-symbols.h.
- *
- * Revision 1.2  1994/10/10  07:20:14  roland
- * Increase default MAX_SIZE to two pages.
- *
- * Revision 1.1  1993/12/06  23:25:25  roland
- * entered into RCS
+ * (pre-GNU) HISTORY
  *
  * Revision 2.4  91/05/14  17:53:22  mrt
  * 	Correcting copyright
diff --git a/mach/setup-thread.c b/mach/setup-thread.c
index 937e9ca593..fecffd9f06 100644
--- a/mach/setup-thread.c
+++ b/mach/setup-thread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,94,95,97,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,94,1995,1997,2002,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
@@ -17,7 +17,7 @@
    02111-1307 USA.  */
 
 #include <mach.h>
-#include "thread_state.h"
+#include <thread_state.h>
 #include <string.h>
 #include <mach/machine/vm_param.h>
 #include "sysdep.h"		/* Defines stack direction.  */
diff --git a/mach/shortcut.awk b/mach/shortcut.awk
index 1857998122..ea283d49ba 100644
--- a/mach/shortcut.awk
+++ b/mach/shortcut.awk
@@ -7,6 +7,8 @@ BEGIN { print "/* This file is generated by shortcut.awk.  */";
 
 $1 == "LINTLIBRARY" { print "#include <mach.h>"; next }
 
+$1 == "weak_alias" { next }
+
 # Copy the first line of the definition, but
 # replace the function name (RPC) with CALL.
 $NF == rpc \