about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/Makefile2
-rw-r--r--sysdeps/generic/make_siglist.c11
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c23
3 files changed, 24 insertions, 12 deletions
diff --git a/sysdeps/generic/Makefile b/sysdeps/generic/Makefile
index 1315a26b95..dc31a50fcd 100644
--- a/sysdeps/generic/Makefile
+++ b/sysdeps/generic/Makefile
@@ -53,6 +53,8 @@ $(objpfx)siglist.c: $(objpfx)make_siglist
 
 $(objpfx)make_siglist: $(sysdep_dir)/generic/make_siglist.c
 	$(native-compile)
+	-DSIGNUM_H=\"`cd $(dir $(firstword $(wildcard \
+			 $(+sysdep_dirs:%=%/signum.h)))); pwd`/signum.h\"
 
 generated := $(generated) make_siglist siglist.c
 endif
diff --git a/sysdeps/generic/make_siglist.c b/sysdeps/generic/make_siglist.c
index 34abf80513..a38ab6aa2e 100644
--- a/sysdeps/generic/make_siglist.c
+++ b/sysdeps/generic/make_siglist.c
@@ -15,14 +15,19 @@ You should have received a copy of the GNU General Public License
 along with the GNU C Library; see the file COPYING.  If not, write to
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <signal.h>
 #include <stdio.h>
+#include <signal.h>
 
+/* Get this configuration's defns of the signal numbers.  */
+#define _SIGNAL_H 1
+#include SIGNUM_H
 
 /* Make a definition for sys_siglist.  */
 
 
 #undef	HAVE_SYS_SIGLIST
+#define HAVE_STRSIGNAL
+#define HAVE_PSIGNAL
 #define sys_siglist my_siglist	/* Avoid clash with signal.h.  */
 
 #include "signame.c"
@@ -35,11 +40,11 @@ main()
 
   signame_init ();
 
-  puts ("#include \"ansidecl.h\"\n#include <stddef.h>\n");
+  puts ("#include <stddef.h>\n");
 
   puts ("\n/* This is a list of all known signal numbers.  */");
 
-  puts ("\nCONST char *CONST _sys_siglist[] =\n  {");
+  puts ("\nconst char *const _sys_siglist[] =\n  {");
 
   for (i = 0; i < NSIG; ++i)
     printf ("    \"%s\",\n", sys_siglist[i]);
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 0144958766..f8997fe025 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -159,12 +159,6 @@ unfmh();			/* XXX */
 		  _dl_hurd_data->phdrsz / sizeof (Elf32_Phdr),
 		  &_dl_hurd_data->user_entry);
 
-      /* Deallocate the reply port and task port rights acquired by
-	 __mach_init.  We are done with them now, and the user will
-	 reacquire them for himself when he wants them.  */
-      __mig_dealloc_reply_port (MACH_PORT_NULL);
-      __mach_port_deallocate (__mach_task_self (), __mach_task_self_);
-
       if (_dl_skip_args && _dl_argv[-_dl_skip_args] == (char *) p)
 	{
 	  /* We are ignoring the first few arguments, but we have no Hurd
@@ -198,6 +192,16 @@ fmh();				/* XXX */
   LOSE;
   abort ();
 }
+
+void
+_dl_sysdep_start_cleanup (void)
+{
+  /* Deallocate the reply port and task port rights acquired by
+     __mach_init.  We are done with them now, and the user will
+     reacquire them for himself when he wants them.  */
+  __mig_dealloc_reply_port (MACH_PORT_NULL);
+  __mach_port_deallocate (__mach_task_self (), __mach_task_self_);
+}
 
 int
 _dl_sysdep_open_zero_fill (void)
@@ -567,13 +571,14 @@ malloc (size_t n)
   ptr += n;
   return block;
 }
-
 weak_symbol (malloc)
 
-/* These should never be called.  */
+/* This should never be called.  */
 void *realloc (void *ptr, size_t n) { ptr += n; abort (); }
-void free (void *ptr) { ptr = ptr; abort (); }
 weak_symbol (realloc)
+
+/* This will rarely be called.  */
+void free (void *ptr) { ptr = ptr; }
 weak_symbol (free)
 
 /* Avoid signal frobnication in setjmp/longjmp.  */