1 --- atexit.c.orig Thu Mar 11 13:16:53 2004
2 +++ atexit.c Mon Mar 15 12:47:39 2004
7 +#if defined(__DYNAMIC__)
8 +#include <mach-o/dyld.h>
9 +#endif /* defined(__DYNAMIC__) */
11 #include "un-namespace.h"
14 fn.fn_type = ATEXIT_FN_STD;
15 fn.fn_ptr.std_func = func;;
17 +#if defined(__DYNAMIC__)
18 + fn.fn_dso = (void *)_dyld_get_image_header_containing_address((unsigned long) func);
19 +#else /* ! defined(__DYNAMIC__) */
21 +#endif /* defined(__DYNAMIC__) */
23 error = atexit_register(&fn);