mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2025-04-20 01:47:12 +02:00
errno: add the errno variable and base macros
A <bits/errno.h> file will likely by added later on for each target to add more specific values.
This commit is contained in:
parent
c87805ef10
commit
5f48a6b4e0
3 changed files with 17 additions and 0 deletions
|
@ -73,6 +73,7 @@ set(SOURCES
|
||||||
src/libc/ctype/isxdigit.c
|
src/libc/ctype/isxdigit.c
|
||||||
src/libc/ctype/tolower.c
|
src/libc/ctype/tolower.c
|
||||||
src/libc/ctype/toupper.c
|
src/libc/ctype/toupper.c
|
||||||
|
src/libc/errno/errno.c
|
||||||
src/libc/locale/setlocale.c
|
src/libc/locale/setlocale.c
|
||||||
src/libc/locale/localeconv.c
|
src/libc/locale/localeconv.c
|
||||||
src/libc/stdio/vsnprintf.c
|
src/libc/stdio/vsnprintf.c
|
||||||
|
|
12
include/errno.h
Normal file
12
include/errno.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef __ERRNO_H__
|
||||||
|
# define __ERRNO_H__
|
||||||
|
|
||||||
|
/* Initialized to 0 at startup. Currently not TLS, maybe in the future if
|
||||||
|
threads are supported. */
|
||||||
|
extern int errno;
|
||||||
|
|
||||||
|
#define EDOM 1
|
||||||
|
#define EILSEQ 2
|
||||||
|
#define ERANGE 3
|
||||||
|
|
||||||
|
#endif /*__ERRNO_H__*/
|
4
src/libc/errno/errno.c
Normal file
4
src/libc/errno/errno.c
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
/* The initial value is 0 at program startup */
|
||||||
|
int errno = 0;
|
Loading…
Add table
Reference in a new issue