summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib')
-rw-r--r--src/lib/libc/stdlib/atexit.c4
-rw-r--r--src/lib/libc/stdlib/atexit.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/atexit.c b/src/lib/libc/stdlib/atexit.c
index a33080571f..4ccf84562c 100644
--- a/src/lib/libc/stdlib/atexit.c
+++ b/src/lib/libc/stdlib/atexit.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: atexit.c,v 1.21 2015/04/07 01:27:07 guenther Exp $ */ 1/* $OpenBSD: atexit.c,v 1.22 2015/10/25 18:01:24 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 2002 Daniel Hartmeier 3 * Copyright (c) 2002 Daniel Hartmeier
4 * All rights reserved. 4 * All rights reserved.
@@ -103,6 +103,7 @@ unlock:
103 _ATEXIT_UNLOCK(); 103 _ATEXIT_UNLOCK();
104 return (ret); 104 return (ret);
105} 105}
106DEF_STRONG(__cxa_atexit);
106 107
107/* 108/*
108 * Call all handlers registered with __cxa_atexit() for the shared 109 * Call all handlers registered with __cxa_atexit() for the shared
@@ -180,6 +181,7 @@ restart:
180 181
181 } 182 }
182} 183}
184DEF_STRONG(__cxa_finalize);
183 185
184/* 186/*
185 * Register the cleanup function 187 * Register the cleanup function
diff --git a/src/lib/libc/stdlib/atexit.h b/src/lib/libc/stdlib/atexit.h
index 3de2aa3bf6..e2e821de04 100644
--- a/src/lib/libc/stdlib/atexit.h
+++ b/src/lib/libc/stdlib/atexit.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: atexit.h,v 1.9 2014/06/18 19:01:10 kettenis Exp $ */ 1/* $OpenBSD: atexit.h,v 1.10 2015/10/25 18:01:24 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2002 Daniel Hartmeier 4 * Copyright (c) 2002 Daniel Hartmeier
@@ -41,7 +41,12 @@ struct atexit {
41 } fns[1]; /* the table itself */ 41 } fns[1]; /* the table itself */
42}; 42};
43 43
44__BEGIN_HIDDEN_DECLS
44extern struct atexit *__atexit; /* points to head of LIFO stack */ 45extern struct atexit *__atexit; /* points to head of LIFO stack */
46__END_HIDDEN_DECLS
45 47
46int __cxa_atexit(void (*)(void *), void *, void *); 48int __cxa_atexit(void (*)(void *), void *, void *);
47void __cxa_finalize(void *); 49void __cxa_finalize(void *);
50
51PROTO_NORMAL(__cxa_atexit);
52PROTO_NORMAL(__cxa_finalize);