X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2b83f27e1980a6c5de752bd55c0ff76f53ec15f6..4aca08ce404ffaa63000c218e8e042d7b27fbfcc:/sbr/done.c diff --git a/sbr/done.c b/sbr/done.c index cd76fac5..8b197b25 100644 --- a/sbr/done.c +++ b/sbr/done.c @@ -5,20 +5,8 @@ * complete copyright information. */ -#include - -/* It's undefined behaviour in C99 to convert from a function pointer to - * a data-object pointer, e.g. void pointer. gcc's -pedantic warns of - * this and can stop compilation. POSIX requires the operation however, - * e.g. for dlsym(3), and so we know it's safe on POSIX platforms, e.g. - * the pointers are of the same size. Thus use a union to subvert gcc's - * check. The function-pointer equivalent of a void pointer is any - * function-pointer type as all function pointers are defined to be - * convertible from one another; use the simplest available. */ -typedef union { - void *v; - void (*f)(void); -} generic_pointer; +#include "h/mh.h" +#include "error.h" static void (*altexit)(int) NORETURN = exit;