summary refs log tree commit diff
path: root/stdlib/exit.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-19 12:11:38 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-19 12:11:38 +0000
commit2c6cfe6853a30deb4af842aacc924fa298d0521a (patch)
tree7fcc409e499bb8e3d96522f7fc2393fc10e53db2 /stdlib/exit.c
parent3ccb96cd41b38d0159bdf8aad229c3599864c65d (diff)
downloadglibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.tar.gz
glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.tar.xz
glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.zip
Updated to fedora-glibc-20051219T1003 cvs/fedora-glibc-2_3_90-19
Diffstat (limited to 'stdlib/exit.c')
-rw-r--r--stdlib/exit.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/stdlib/exit.c b/stdlib/exit.c
index e5e25960b1..bc4cb0fd08 100644
--- a/stdlib/exit.c
+++ b/stdlib/exit.c
@@ -19,6 +19,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <sysdep.h>
 #include "exit.h"
 
 #include "set-hooks.h"
@@ -45,17 +46,33 @@ exit (int status)
 	    &__exit_funcs->fns[--__exit_funcs->idx];
 	  switch (f->flavor)
 	    {
+	      void (*atfct) (void);
+	      void (*onfct) (int status, void *arg);
+	      void (*cxafct) (void *arg, int status);
+
 	    case ef_free:
 	    case ef_us:
 	      break;
 	    case ef_on:
-	      (*f->func.on.fn) (status, f->func.on.arg);
+	      onfct = f->func.on.fn;
+#ifdef PTR_DEMANGLE
+	      PTR_DEMANGLE (onfct);
+#endif
+	      onfct (status, f->func.on.arg);
 	      break;
 	    case ef_at:
-	      (*f->func.at) ();
+	      atfct = f->func.at;
+#ifdef PTR_DEMANGLE
+	      PTR_DEMANGLE (atfct);
+#endif
+	      atfct ();
 	      break;
 	    case ef_cxa:
-	      (*f->func.cxa.fn) (f->func.cxa.arg, status);
+	      cxafct = f->func.cxa.fn;
+#ifdef PTR_DEMANGLE
+	      PTR_DEMANGLE (cxafct);
+#endif
+	      cxafct (f->func.cxa.arg, status);
 	      break;
 	    }
 	}