X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibc.so_src%2Fstdlib.c;h=191f5261bd7d588e5e711670941b59fe39ccf682;hb=71b1271511ad01f042d2e51673dd57cce1b0fd9c;hp=94d9d1dc3505ec5dbc243688b91c4be3d4dc3f85;hpb=3dedfe567817548ecc164ab497bcbb2395045659;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libc.so_src/stdlib.c b/Usermode/Libraries/libc.so_src/stdlib.c index 94d9d1dc..191f5261 100644 --- a/Usermode/Libraries/libc.so_src/stdlib.c +++ b/Usermode/Libraries/libc.so_src/stdlib.c @@ -13,6 +13,8 @@ #define _stdout 1 #define _stdin 0 +extern void *_crt0_exit_handler; + // === PROTOTYPES === EXPORT int atoi(const char *str); EXPORT void exit(int status); @@ -24,6 +26,8 @@ void (*g_stdlib_exithandler)(void); void atexit(void (*__func)(void)) { g_stdlib_exithandler = __func; + // TODO: Replace with meta-function to allow multiple atexit() handlers + _crt0_exit_handler = __func; } /**