xref: /netbsd-src/distrib/utils/zcat/misc.c (revision 16045db7050a79dbc51d4283d17cf3f1e5c96b8d)
1 #include <assert.h>
2 #include <signal.h>
3 
4 /* Avoid stdio */
__assert(const char * a,int b,const char * c)5 __dead void __assert(const char *a, int b, const char *c) {
6 	kill(0, SIGQUIT);
7 }
__assert13(const char * a,int b,const char * c,const char * d)8 __dead void __assert13(const char *a, int b, const char *c, const char *d) {
9 	kill(0, SIGQUIT);
10 }
__diagassert(const char * a,int b,const char * x)11 void __diagassert(const char *a, int b, const char *x) {
12 	kill(0, SIGQUIT);
13 }
__diagassert13(const char * a,int b,const char * c,const char * d)14 void __diagassert13(const char * a, int b, const char *c, const char *d) {
15 	kill(0, SIGQUIT);
16 }
17 
18 /* Avoid mutexes environment rbree, thread stuff */
19 void _libc_init(void);
_libc_init(void)20 void _libc_init(void) {
21 }
22 
23 /* Avoid finalizers, etc. */
24 int atexit(void (*)(void));
25 
atexit(void (* p)(void))26 int atexit(void (*p)(void)) {
27 	return 0;
28 }
29 
30 void __cxa_finalize(void *);
__cxa_finalize(void * dso)31 void __cxa_finalize(void *dso) { }
32 
33 int __cxa_atexit(void (*func)(void *), void *arg, void *dso);
34 int
__cxa_atexit(void (* func)(void *),void * arg,void * dso)35 __cxa_atexit(void (*func)(void *), void *arg, void *dso)
36 {
37 	return 0;
38 }
39