Commit Graph

18 Commits

Author SHA1 Message Date
Lephenixnoir 7c4de3e295
dso, stdlib: __cxa_atexit(), __dso_handle, atexit() (TEST) 2023-04-01 20:30:30 +02:00
Lephenixnoir 8231557ff5
add declarations for unsupported functions for libstdc++
So that it compiles - it won't link but we can leave that for later.
2022-08-19 15:49:52 +02:00
Lephenixnoir a6dbcfb227
add C++ header guards 2021-06-28 15:49:05 +02:00
Lephenixnoir 518a866750
use __restrict__ in headers for g++ compatibility 2021-06-13 18:17:40 +02:00
Lephenixnoir 009a2eef6e
stdlib: add TinyMT-based rand, and malloc/etc for gint 2021-06-07 22:00:41 +02:00
Lephenixnoir d261db447b
add some function attributes 2021-05-30 15:09:33 +02:00
Lephenixnoir cd7fe7a329
signal: simple implementation (DONE)
This version of signal (which does not rely on a notion of userland
processes and is thus excluded from Vhex) follows C99 semantics but does
not generate any signals by default.

Basically, the signal function sets up function pointers and the signal
function calls them. Termination signals call exit() while other signals
call _Exit(), which is a quicker program termination similar to abort().

C99 allows programs to long jump out of signal handlers (!) which is
unbelievably scary because it would bypass stack switching code in Vhex
as well as normal interrupt handler termination in gint.
2021-05-30 15:09:33 +02:00
Lephenixnoir 4b90740d3b
stdlib: add exit() based on target-provided _Exit()
This is implemented for gint only currently; on Vhex, _Exit() is likely
just going to be a syscall. For CASIOWIN, this is slightly more
difficult, as there is no native exit syscall.
2021-05-29 16:45:35 +02:00
Lephenixnoir f5cca84ae8
stdlib: add and test strtod, strtof and atof (DONE)
This uses a generic function strto_fp similar to strto_int that is used
for strtol and its derivatives.
2021-05-21 23:56:35 +02:00
Lephenixnoir ade01b532e
stdlib: add atoi, atol and atoll 2021-05-20 11:35:14 +02:00
Lephenixnoir b1dc3e77de
stdlib: add and test strtoull (DONE) 2021-05-19 21:50:08 +02:00
Lephenixnoir e4c385d0df
stdlib: safeguard prototypes against user-defined macros 2021-05-19 10:12:41 +02:00
Lephenixnoir 73b536bbb6
stdlib: add abs, labs, llabs, div, ldiv, lldiv (TEST) 2021-05-18 21:25:45 +02:00
Lephenixnoir f6bed55f75
update header guard convention 2021-05-09 23:00:11 +02:00
Lephenixnoir e719af2f63
update include hierarchy 2021-05-09 17:59:07 +02:00
Yatis f76757ecd2 Fix installation / uninstallation rules + Fix compilation ABI support 2020-11-03 15:15:01 +01:00
Yatis aeedfcdb02 project architecture rework + handle ABI specific code (WIP) 2020-10-14 11:45:08 +02:00
Yatis 8fac0c2272 Initial commit 2020-09-17 19:27:01 +02:00