This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

hurd dl-sysdep.c fix



Here is a trivial patch to today's CVS repository that made libc build ok
for the hurd for me (not that it actually runs, I haven't tested it).  This
probably duplicates some of Mark Kettenis's changes, but this is relative
to the CVS state as of right now.


1998-07-19  Roland McGrath  <roland@baalperazim.frob.com>

	* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the
	magic memobj port arg parsing stuff.  Fix it someday when we are ready
	to really use it.
	(_dl_sysdep_output): New function, modified from _dl_sysdep_error.
	(_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed.

Index: libc/sysdeps/mach/hurd/dl-sysdep.c
===================================================================
RCS file: /egcs/carton/cvsfiles/libc/sysdeps/mach/hurd/dl-sysdep.c,v
retrieving revision 1.42
diff -u -b -p -r1.42 dl-sysdep.c
--- dl-sysdep.c	1998/07/17 12:35:36	1.42
+++ dl-sysdep.c	1998/07/19 22:52:10
@@ -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 *platfo
   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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]