Commit Graph

20 Commits

Author SHA1 Message Date
Yann MAGNIN bdf9566723 fxlibc - v1.4.3 : fix vhex missing headers
@update
> CMakeLists.txt
 | remove the generation of the shared version of the fxlibc (deprecated, unused)
> include/errno
 | add some error macros needed in vhex
> src/string/strerror
 | add EINTR support
 | add EAGAIN support
 | add ENOMEDIUM support
 | add EMEDIUMTYPE support

@fix
> include/target/vhex
 | add missing headers
2022-07-30 17:57:08 +02:00
Yann MAGNIN 619afe25da fxlibc - v1.4.2 : fix reallocarray() + remove old Vhex/Casiowin sources
@update
> CMakeLists.txt
  | remove casiowin-* target (unused)
  | remove x86-generic target (unused)
  | update files location
  | remove old vhex sources files (deprecated, unused)
> src/posix
  | remove this folder
> src/libc
  | move its content to src/
  | remove thread module
> src/stdlib/reallocarray
  | check if the multiplication overflow failed
  | set appropriate errno value if multiplication failed
2022-06-03 16:25:31 +02:00
Lephenixnoir 294fda9731
stdio: share the FILE implementation between all versions 2022-01-13 21:28:19 +01:00
Lephenixnoir 6ec0c24e2d
stdio: ungetc(), update (+) and append (a) modes (DONE) 2022-01-12 10:20:30 +01:00
Lephenixnoir b6dbdf321d
stdio: error handling and positioning functions (WIP) 2022-01-02 22:09:06 +01:00
Lephenixnoir a12b84f1ef
stdio: opening primitives for FILE (WIP) 2022-01-02 19:22:43 +01:00
Lephenixnoir 51528170bb
stdio: FILE barebones with buffering model (WIP) 2022-01-02 19:22:42 +01:00
Lephenixnoir e479393a9c
unistd, dirent: definitions for directory functions 2021-12-21 18:55:23 +01:00
Lephenixnoir c2feb94710
fcntl, unistd: declarations for the Unix file API 2021-12-13 18:37:04 +01:00
Lephenixnoir 6e42995388
stdio: add general file management definitions 2021-06-13 18:18:32 +02:00
Lephenixnoir ed8134970b
add nonstandard GNU endian.h 2021-06-08 10:05:00 +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 13c3390b22
setjmp: expose setjmp and longjmp to sh-generic
... instead of vhex-generic, where it doesn't really belong because Vhex
might run on other architectures.
2021-05-29 09:56:47 +02:00
Lephenixnoir 591e453717
sh-generic: add CPU capabilities for optimized SH4 code
On sh-generic targets, the headers <bits/cpucap.h> (in C) and
<bits/asm/cpucap.h> (in assembler) provide definitions to acces the
__cpucap symbol which provides information on the CPU.

Currently, a single capability __CPUCAP_SH4ALDSP is defined; it
represents the SH4 extended instructions together with the integrated
DSP instructions. The main uses of this capability are [movua.l]
(unaligned reads) and [ldrc] (built-in tight loops).

Capabilities are initialized to 0 (their safest default) and the runtime
can enable them based on what hardware is running.
2021-05-23 15:31:01 +02:00
Lephenixnoir 97d52ff0b1
stdio: declare stdin, stdout and stderr on all targets
This is needed for some basic stuff like assert.
2021-05-16 18:12:45 +02:00
Lephenixnoir 6275b3e73b
move bits/unistd_32.h to bits/asm on all targets
Only Vhex had it at the correct place previously.
2021-05-11 09:22:34 +02:00
Lephenixnoir f6bed55f75
update header guard convention 2021-05-09 23:00:11 +02:00
Lephenixnoir f58187c55e
remove unneeded __SUPPORT macros 2021-05-09 22:11:49 +02:00
Lephenixnoir e719af2f63
update include hierarchy 2021-05-09 17:59:07 +02:00