Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/i386/modules/klibc/onexit.c

Source at commit 655 created 13 years 4 months ago.
By meklort, Modules update. removed hardcoding for dyld_stub_bunder in modules.c Added a subset of klibc for a more complete c library implimentation. Added a subset of uclibc++ for an initial c++ implimentation. Note: cout / cin / file io has been disabled. Also note that exceptions and rtti is disabled. Modified the helow world code foa small c++ test.
1/*
2 * onexit.c
3 */
4
5#include "libsaio.h"
6#include "atexit.h"
7
8int on_exit(void (*fctn) (int, void *), void *arg)
9{
10struct atexit *as = malloc(sizeof(struct atexit));
11
12if (!as)
13return -1;
14
15as->fctn = fctn;
16as->arg = arg;
17
18as->next = __atexit_list;
19__atexit_list = as;
20
21return 0;
22}
23

Archive Download this file

Revision: 655