summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--hurd/hurdmsg.c63
-rw-r--r--hurd/hurdprio.c8
-rw-r--r--hurd/msgstub.c26
-rw-r--r--sysdeps/mach/hurd/bind.c2
-rw-r--r--sysdeps/mach/hurd/connect.c4
-rw-r--r--sysdeps/mach/hurd/getpriority.c7
-rw-r--r--sysdeps/mach/hurd/sendto.c4
8 files changed, 66 insertions, 61 deletions
diff --git a/ChangeLog b/ChangeLog
index efe148bee6..d141bcbc44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Fri Nov  3 17:27:49 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
+
+	* sysdeps/mach/hurd/sendto.c: Don't pass BINDING arg to
+	socket_create_address.
+	* sysdeps/mach/hurd/connect.c: Likewise.
+	* sysdeps/mach/hurd/bind.c: Likewise.
+
+	* hurd/hurdprio.c (_hurd_priority_which_map): Pass threadwaits
+	args to proc_getprocinfo.
+	* sysdeps/mach/hurd/getpriority.c: Likewise.
+
+	* hurd/hurdmsg.c (_S_msg_report_wait): New stub function.
+
 Thu Nov  2 19:24:37 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
 	* sysdeps/unix/sysv/linux/i386/sysdep.S (errno): Define as common.
diff --git a/hurd/hurdmsg.c b/hurd/hurdmsg.c
index 57b6b8dd67..ba19a4538d 100644
--- a/hurd/hurdmsg.c
+++ b/hurd/hurdmsg.c
@@ -32,8 +32,8 @@ Cambridge, MA 02139, USA.  */
 /* Snarfing and frobbing the init ports.  */
 
 kern_return_t
-_S_msg_get_init_port (mach_port_t msgport, mach_port_t auth, int which,
-		  mach_port_t *result, mach_msg_type_name_t *result_type)
+  _S_msg_get_init_port (mach_port_t msgport, mach_port_t auth, int which,
+			mach_port_t *result, mach_msg_type_name_t *result_type)
 {
   AUTHCHECK;
   *result_type = MACH_MSG_TYPE_MOVE_SEND;
@@ -44,7 +44,7 @@ _S_msg_get_init_port (mach_port_t msgport, mach_port_t auth, int which,
 
 kern_return_t
 _S_msg_set_init_port (mach_port_t msgport, mach_port_t auth,
-		  int which, mach_port_t port)
+		      int which, mach_port_t port)
 {
   error_t err;
 
@@ -59,9 +59,9 @@ _S_msg_set_init_port (mach_port_t msgport, mach_port_t auth,
 
 kern_return_t
 _S_msg_get_init_ports (mach_port_t msgport, mach_port_t auth,
-		   mach_port_t **ports,
-		   mach_msg_type_name_t *ports_type,
-		   mach_msg_type_number_t *nports)
+		       mach_port_t **ports,
+		       mach_msg_type_name_t *ports_type,
+		       mach_msg_type_number_t *nports)
 {
   mach_msg_type_number_t i;
   error_t err;
@@ -93,7 +93,7 @@ _S_msg_get_init_ports (mach_port_t msgport, mach_port_t auth,
 
 kern_return_t
 _S_msg_set_init_ports (mach_port_t msgport, mach_port_t auth,
-		   mach_port_t *ports, mach_msg_type_number_t nports)
+		       mach_port_t *ports, mach_msg_type_number_t nports)
 {
   mach_msg_type_number_t i;
   error_t err;
@@ -158,7 +158,7 @@ get_int (int which, int *value)
 
 kern_return_t
 _S_msg_get_init_int (mach_port_t msgport, mach_port_t auth,
-		 int which, int *value)
+		     int which, int *value)
 {
   AUTHCHECK;
 
@@ -167,7 +167,7 @@ _S_msg_get_init_int (mach_port_t msgport, mach_port_t auth,
 
 kern_return_t
 _S_msg_get_init_ints (mach_port_t msgport, mach_port_t auth,
-		  int **values, mach_msg_type_number_t *nvalues)
+		      int **values, mach_msg_type_number_t *nvalues)
 {
   error_t err;
   mach_msg_type_number_t i;
@@ -246,7 +246,7 @@ set_int (int which, int value)
 
 kern_return_t
 _S_msg_set_init_int (mach_port_t msgport, mach_port_t auth,
-		 int which, int value)
+		     int which, int value)
 {
   AUTHCHECK;
 
@@ -255,7 +255,7 @@ _S_msg_set_init_int (mach_port_t msgport, mach_port_t auth,
 
 kern_return_t
 _S_msg_set_init_ints (mach_port_t msgport, mach_port_t auth,
-		  int *values, mach_msg_type_number_t nvalues)
+		      int *values, mach_msg_type_number_t nvalues)
 {
   error_t err;
   mach_msg_type_number_t i;
@@ -278,8 +278,8 @@ _S_msg_set_init_ints (mach_port_t msgport, mach_port_t auth,
 
 
 kern_return_t
-_S_msg_get_fd (mach_port_t msgport, mach_port_t auth,
-	   int which, mach_port_t *result, mach_msg_type_name_t *result_type)
+_S_msg_get_fd (mach_port_t msgport, mach_port_t auth, int which,
+	       mach_port_t *result, mach_msg_type_name_t *result_type)
 {
   AUTHCHECK;
 
@@ -295,7 +295,7 @@ _S_msg_get_fd (mach_port_t msgport, mach_port_t auth,
 
 kern_return_t
 _S_msg_set_fd (mach_port_t msgport, mach_port_t auth,
-	   int which, mach_port_t port)
+	       int which, mach_port_t port)
 {
   AUTHCHECK;
 
@@ -307,8 +307,8 @@ _S_msg_set_fd (mach_port_t msgport, mach_port_t auth,
 
 kern_return_t
 _S_msg_get_env_variable (mach_port_t msgport,
-		     char *variable,
-		     char **data, mach_msg_type_number_t *datalen)
+			 char *variable,
+			 char **data, mach_msg_type_number_t *datalen)
 {
   const char *value = getenv (variable);
 
@@ -324,9 +324,9 @@ _S_msg_get_env_variable (mach_port_t msgport,
 
 kern_return_t
 _S_msg_set_env_variable (mach_port_t msgport, mach_port_t auth,
-		     char *variable,
-		     char *value,
-		     int replace)
+			 char *variable,
+			 char *value,
+			 int replace)
 {
   AUTHCHECK;
 
@@ -337,7 +337,7 @@ _S_msg_set_env_variable (mach_port_t msgport, mach_port_t auth,
 
 kern_return_t
 _S_msg_get_environment (mach_port_t msgport,
-		    char **data, mach_msg_type_number_t *datalen)
+			char **data, mach_msg_type_number_t *datalen)
 {
   /* Pack the environment into an array with nulls separating elements.  */
   if (__environ != NULL)
@@ -369,7 +369,7 @@ _S_msg_get_environment (mach_port_t msgport,
 
 kern_return_t
 _S_msg_set_environment (mach_port_t msgport, mach_port_t auth,
-		    char *data, mach_msg_type_number_t datalen)
+			char *data, mach_msg_type_number_t datalen)
 {
   int _hurd_split_args (char *, mach_msg_type_number_t, char **);
   int envc;
@@ -433,19 +433,26 @@ _S_msg_clear_some_exec_flags (mach_port_t process, mach_port_t auth,
 
 kern_return_t
 _S_msg_get_dtable (mach_port_t process,
-	       mach_port_t refport,
-	       portarray_t *dtable,
-	       mach_msg_type_name_t *dtablePoly,
-	       mach_msg_type_number_t *dtableCnt)
+		   mach_port_t refport,
+		   portarray_t *dtable,
+		   mach_msg_type_name_t *dtablePoly,
+		   mach_msg_type_number_t *dtableCnt)
 { return EOPNOTSUPP; }
 
 kern_return_t
 _S_msg_set_dtable (mach_port_t process,
-	       mach_port_t refport,
-	       portarray_t dtable,
-	       mach_msg_type_number_t dtableCnt)
+		   mach_port_t refport,
+		   portarray_t dtable,
+		   mach_msg_type_number_t dtableCnt)
 { return EOPNOTSUPP; }
 
 kern_return_t
 _S_msg_startup_dosync (mach_port_t process)
 { return EOPNOTSUPP; }
+
+kern_return_t
+_S_msg_report_wait (mach_port_t process,
+		    mach_port_t thread,
+		    string_t wait_desc,
+		    int *wait_rpc)
+{ return EOPNOTSUPP; }
diff --git a/hurd/hurdprio.c b/hurd/hurdprio.c
index 9360738988..9c9ed2ba7e 100644
--- a/hurd/hurdprio.c
+++ b/hurd/hurdprio.c
@@ -59,10 +59,16 @@ _hurd_priority_which_map (enum __priority_which which, int who,
 	  /* Get procinfo to check the owner.  */
 	  int *oldpi = pi;
 	  mach_msg_type_number_t oldpisize = pisize;
+	  char *tw = 0;
+	  size_t twsz = 0;
 	  if (err = __USEPORT (PROC, __proc_getprocinfo (port, pids[i],
 							 pi_flags,
-							 &pi, &pisize)))
+							 &pi, &pisize,
+							 &tw, &twsz)))
 	    continue;
+	  if (twsz)
+	    /* Gratuitous.  */
+	    __vm_deallocate (__mach_task_self (), tw, twsz);
 	  if (pi != oldpi && oldpi != pibuf)
 	    /* Old buffer from last call was not reused; free it.  */
 	    __vm_deallocate (__mach_task_self (),
diff --git a/hurd/msgstub.c b/hurd/msgstub.c
deleted file mode 100644
index d4b59ed635..0000000000
--- a/hurd/msgstub.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <hurd.h>
-
-/* XXX */
-#define STUB(fn) error_t fn (mach_port_t port) { return EOPNOTSUPP; }
-
-STUB(_S_get_init_ports)
-STUB(_S_set_init_ports)
-STUB(_S_get_init_port)
-STUB(_S_set_init_port)
-STUB(_S_get_init_ints)
-STUB(_S_set_init_ints)
-STUB(_S_get_init_int)
-STUB(_S_set_init_int)
-STUB(_S_get_dtable)
-STUB(_S_set_dtable)
-STUB(_S_get_fd)
-STUB(_S_set_fd)
-STUB(_S_get_environment)
-STUB(_S_set_environment)
-STUB(_S_get_env_variable)
-STUB(_S_set_env_variable)
-STUB(_S_io_select_done)
-STUB(_S_startup_dosync)
-
-STUB(_S_dir_changed)
-STUB(_S_file_changed)
diff --git a/sysdeps/mach/hurd/bind.c b/sysdeps/mach/hurd/bind.c
index 5b041f3558..399c23ed22 100644
--- a/sysdeps/mach/hurd/bind.c
+++ b/sysdeps/mach/hurd/bind.c
@@ -96,7 +96,7 @@ DEFUN(bind, (fd, addr, len),
 			    err = __socket_create_address (port,
 							   addr->sa_family,
 							   (char *) addr, len,
-							   &aport, 1);
+							   &aport);
 			  if (! err)
 			    {
 			      err = __socket_bind (port, aport);
diff --git a/sysdeps/mach/hurd/connect.c b/sysdeps/mach/hurd/connect.c
index e015a14c50..019d1ea108 100644
--- a/sysdeps/mach/hurd/connect.c
+++ b/sysdeps/mach/hurd/connect.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995 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
@@ -61,7 +61,7 @@ DEFUN(connect, (fd, addr, len),
 			    err = __socket_create_address (port,
 							   addr->sa_family,
 							   (char *) addr, len,
-							   &aport, 0);
+							   &aport);
 			  if (! err)
 			    {
 			      err = __socket_connect (port, aport);
diff --git a/sysdeps/mach/hurd/getpriority.c b/sysdeps/mach/hurd/getpriority.c
index 933592fe8e..3d7af4d3bb 100644
--- a/sysdeps/mach/hurd/getpriority.c
+++ b/sysdeps/mach/hurd/getpriority.c
@@ -41,9 +41,14 @@ getpriority (enum __priority_which which, int who)
 	{
 	  int *oldpi = pi;
 	  unsigned int oldpisize = pisize;
+	  char *tw = 0;
+	  size_t twsz = 0;
 	  onerr = __USEPORT (PROC, __proc_getprocinfo (port, pid,
 						       PI_FETCH_TASKINFO,
-						       &pi, &pisize));
+						       &pi, &pisize,
+						       &tw, &twsz));
+	  if (twsz)
+	    __vm_deallocate (__mach_task_self (), tw, twsz);
 	  if (pi != oldpi && oldpi != pibuf)
 	    /* Old buffer from last call was not reused; free it.  */
 	    __vm_deallocate (__mach_task_self (),
diff --git a/sysdeps/mach/hurd/sendto.c b/sysdeps/mach/hurd/sendto.c
index 94becae0a4..b468ba7606 100644
--- a/sysdeps/mach/hurd/sendto.c
+++ b/sysdeps/mach/hurd/sendto.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 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 @@ DEFUN(sendto, (fd, buf, n, flags, addr, addr_len),
 							   addr->sa_family,
 							   (char *) addr,
 							   addr_len,
-							   &aport, 1);
+							   &aport);
 			  if (! err)
 			    {
 			      /* Send the data.  */