1 --- atexit.c.orig 2004-03-11 13:16:53.000000000 -0800
2 +++ atexit.c 2004-09-15 00:14:26.000000000 -0700
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);
26 * handlers are called.
29 -__cxa_finalize(void *dso)
30 +__cxa_finalize(const void *dso)