Yann MAGNIN
996b2b8ded
fxlibc - v1.4.1 : update Vhex stdlib
...
@update
> malloc : do not use syscall, involve kmalloc
> realloc : do not use syscall, involve krealloc
> free : do not use syscall, involve kfree
@fix
> _Exit : remove syscall
9 months ago
Lephenixnoir
d50e44c563
C++ __restrict__, update STATUS, minor formatting
10 months ago
Lephenixnoir
94faa6cbea
Merge pull request 'Add getline(3) & getdelim(3)' ( #2 ) from Alice/fxlibc:dev into dev
...
Reviewed-on: #2
10 months ago
Alice Rozengarden
3f5989ceab
Add getline(3) & getdelim(3)
10 months ago
Lephenixnoir
3c29639988
string: fix a bug in SuperH memset
10 months ago
Lephenixnoir
4d464bde01
bump version to 1.4.0
11 months ago
Lephenixnoir
809238e5b8
errno: add EINTR and EAGAIN
11 months ago
Yann MAGNIN
fa4adc5620
add PIC option + vxsdk support
1 year ago
Lephenixnoir
71866ed769
stdio: stdin/stdout/stderr, perror, final adjustments
...
Support for <stdio.h> will stop here for now.
1 year ago
Lephenixnoir
ed873a652e
stdio: fgetc(), fgets(), tests for fputc() and fputs() (DONE)
1 year ago
Lephenixnoir
294fda9731
stdio: share the FILE implementation between all versions
1 year ago
Lephenixnoir
f1512125d0
stdio: initial versions of fputc() and fputs() (TEST)
1 year ago
Lephenixnoir
6ec0c24e2d
stdio: ungetc(), update (+) and append (a) modes (DONE)
1 year ago
Lephenixnoir
06b66252c9
stdio: line buffering, test fgetpos and fsetpos (DONE)
1 year ago
Lephenixnoir
0c2f81e5bb
string: add and test a naive memrchr (DONE)
1 year ago
Lephenixnoir
909c7df815
stdio: fixes for initial fread() et fwrite() (TEST)
1 year ago
Lephenixnoir
4461bdb96a
stdio: basic fread/fwrite (WIP)
1 year ago
Lephenixnoir
b6dbdf321d
stdio: error handling and positioning functions (WIP)
1 year ago
Lephenixnoir
a12b84f1ef
stdio: opening primitives for FILE (WIP)
1 year ago
Lephenixnoir
51528170bb
stdio: FILE barebones with buffering model (WIP)
1 year ago
Lephenixnoir
b53078776d
stdio: enable dprintf() and vdprintf()
1 year ago
Lephenixnoir
3046304497
stdlib: set errno=ENOMEM after failed malloc()
1 year ago
Lephenixnoir
f7b85f18bd
time: do not depend on gint headers
...
They're usually not installed yet
1 year ago
Lephenixnoir
bd0dd3a8d2
bump version to 1.3.0
1 year ago
Lephenixnoir
dbfefe5172
errno: add ENOTEMPTY for rmdir()
1 year ago
Lephenixnoir
937b7bfb63
stat: definitions required to support stat(2)
1 year ago
Lephenixnoir
e479393a9c
unistd, dirent: definitions for directory functions
1 year ago
Lephenixnoir
c2feb94710
fcntl, unistd: declarations for the Unix file API
1 year ago
Lephenixnoir
92ccd8b1db
time: add support for C99 <time.h> (DONE)
1 year ago
Lephenixnoir
e71f9867e2
support for shared libgcc in vhex
1 year ago
Lephenixnoir
164b33b26d
cmake: initial support for shared vhex library
...
Using the previously-tested trick with `ld -shared`.
1 year ago
Lephenixnoir
df4c13b007
stdlib: fix bad memset in calloc()
1 year ago
Lephenixnoir
a0ceeefaf4
string: fix strtok detecting NUL only after separators
1 year ago
Lephenixnoir
ea35c18c41
stdlib: add qsort (TEST)
2 years ago
Lephenixnoir
a6dbcfb227
add C++ header guards
2 years ago
Lephenixnoir
f5571e2b3d
time: add general definitions
2 years ago
Lephenixnoir
6e42995388
stdio: add general file management definitions
2 years ago
Lephenixnoir
518a866750
use __restrict__ in headers for g++ compatibility
2 years ago
Lephenixnoir
6be2a3d52e
bump version to 1.2.0
2 years ago
Lephenixnoir
dcaf203f46
stdio: improve printf extension API and type size support
2 years ago
Lephenixnoir
ed8134970b
add nonstandard GNU endian.h
2 years ago
Lephenixnoir
009a2eef6e
stdlib: add TinyMT-based rand, and malloc/etc for gint
2 years ago
Lephenixnoir
625a6af459
stdio: add asprintf and vasprintf
2 years ago
Lephenixnoir
f52e0923bc
stdio: move the printf implementation from gint
2 years ago
Lephenixnoir
66463bfe17
assert: fix silly mistake
2 years ago
Lephenixnoir
d261db447b
add some function attributes
2 years ago
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.
2 years ago
Lephenixnoir
04e910441a
cmake: fix install dirs reversing at second build
2 years ago
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.
2 years ago
Lephenixnoir
73d6b2eb7c
setjmp: do not disable interrupts ( #1 ) (DONE)
...
SR.BL=1 could cause problems if setjmp or longjmp is loader over a page
boundary and the second page is not loaded when interrupts are masked.
SR.IMASK=15 is another option, but it seems unnecessary per #1 .
Blocking interrupts in longjmp did not make too much sense because the
blocked SR was immediately replaced by the restored one.
2 years ago