git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/AxWin3 - Fiddling
[tpg/acess2.git]
/
Usermode
/
Libraries
/
libc.so_src
/
stdlib.c
diff --git
a/Usermode/Libraries/libc.so_src/stdlib.c
b/Usermode/Libraries/libc.so_src/stdlib.c
index
94d9d1d
..
191f526
100644
(file)
--- a/
Usermode/Libraries/libc.so_src/stdlib.c
+++ b/
Usermode/Libraries/libc.so_src/stdlib.c
@@
-13,6
+13,8
@@
#define _stdout 1
\r
#define _stdin 0
\r
\r
#define _stdout 1
\r
#define _stdin 0
\r
\r
+extern void *_crt0_exit_handler;
\r
+
\r
// === PROTOTYPES ===
\r
EXPORT int atoi(const char *str);
\r
EXPORT void exit(int status);
\r
// === PROTOTYPES ===
\r
EXPORT int atoi(const char *str);
\r
EXPORT void exit(int status);
\r
@@
-24,6
+26,8
@@
void (*g_stdlib_exithandler)(void);
void atexit(void (*__func)(void))
\r
{
\r
g_stdlib_exithandler = __func;
\r
void atexit(void (*__func)(void))
\r
{
\r
g_stdlib_exithandler = __func;
\r
+ // TODO: Replace with meta-function to allow multiple atexit() handlers
\r
+ _crt0_exit_handler = __func;
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
UCC
git Repository :: git.ucc.asn.au