about summary refs log tree commit diff
path: root/sysdeps/mach
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c53
-rw-r--r--sysdeps/mach/hurd/i386/sigcontextinfo.h22
-rw-r--r--sysdeps/mach/hurd/sigsuspend.c6
3 files changed, 30 insertions, 51 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 44049cef57..8edde69337 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -122,6 +122,7 @@ _dl_sysdep_start (void **start_argptr,
 
 unfmh();			/* XXX */
 
+#if 0				/* XXX make this work for real someday... */
       if (_dl_hurd_data->user_entry == (vm_address_t) &ENTRY_POINT)
 	/* We were invoked as a command, not as the program interpreter.
 	   The generic ld.so code supports this: it will parse the args
@@ -166,6 +167,7 @@ unfmh();			/* XXX */
 	       can be retrieved by the program later.  */
 	    l->l_info[DT_NULL] = (void *) memobj;
 	  }
+#endif
 
       /* Call elf/rtld.c's main program.  It will set everything
 	 up and leave us to transfer control to USER_ENTRY.  */
@@ -643,58 +645,13 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
   return result;
 }
 
-void weak_function
-_dl_sysdep_fatal (const char *msg, ...)
-{
-  va_list ap;
-
-  va_start (ap, msg);
-  do
-    {
-      size_t len = strlen (msg);
-      mach_msg_type_number_t nwrote;
-      do
-	{
-	  if (__io_write (_hurd_init_dtable[2], msg, len, -1, &nwrote))
-	    break;
-	  len -= nwrote;
-	  msg += nwrote;
-	} while (nwrote > 0);
-      msg = va_arg (ap, const char *);
-    } while (msg);
-  va_end (ap);
-
-  _exit (127);
-}
-
 
 void weak_function
-_dl_sysdep_error (const char *msg, ...)
+_dl_sysdep_output (int fd, const char *msg, ...)
 {
   va_list ap;
 
-  va_start (ap, msg);
-  do
-    {
-      size_t len = strlen (msg);
-      mach_msg_type_number_t nwrote;
-      do
-	{
-	  if (__io_write (_hurd_init_dtable[2], msg, len, -1, &nwrote))
-	    break;
-	  len -= nwrote;
-	  msg += nwrote;
-	} while (nwrote > 0);
-      msg = va_arg (ap, const char *);
-    } while (msg);
-  va_end (ap);
-}
-
-
-void weak_function
-_dl_sysdep_message (const char *msg, ...)
-{
-  va_list ap;
+  assert(fd < _hurd_init_dtablesize);
 
   va_start (ap, msg);
   do
@@ -703,7 +660,7 @@ _dl_sysdep_message (const char *msg, ...)
       mach_msg_type_number_t nwrote;
       do
 	{
-	  if (__io_write (_hurd_init_dtable[1], msg, len, -1, &nwrote))
+	  if (__io_write (_hurd_init_dtable[fd], msg, len, -1, &nwrote))
 	    break;
 	  len -= nwrote;
 	  msg += nwrote;
diff --git a/sysdeps/mach/hurd/i386/sigcontextinfo.h b/sysdeps/mach/hurd/i386/sigcontextinfo.h
new file mode 100644
index 0000000000..6dd80f25ea
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/sigcontextinfo.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 1998 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 Library General Public License as
+   published by the Free Software Foundation; either version 2 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#define SIGCONTEXT struct sigcontext
+#define GET_PC(ctx)	((void *) (ctx).sc_eip)
+#define GET_FRAME(ctx)	((void *) (ctx).sc_ebp)
+#define GET_STACK(ctx)	((void *) (ctx).sc_uesp)
diff --git a/sysdeps/mach/hurd/sigsuspend.c b/sysdeps/mach/hurd/sigsuspend.c
index ec7849557a..58f1417699 100644
--- a/sysdeps/mach/hurd/sigsuspend.c
+++ b/sysdeps/mach/hurd/sigsuspend.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,98 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
@@ -23,9 +23,8 @@
 
 /* Change the set of blocked signals to SET,
    wait until a signal arrives, and restore the set of blocked signals.  */
-/* XXX should be __sigsuspend ? */
 int
-sigsuspend (set)
+__sigsuspend (set)
      const sigset_t *set;
 {
   struct hurd_sigstate *ss;
@@ -80,3 +79,4 @@ sigsuspend (set)
   errno = EINTR;
   return -1;
 }
+weak_alias (__sigsuspend, sigsuspend)