mirror of
https://github.com/tailix/libkernaux.git
synced 2024-11-13 11:04:27 -05:00
Add libc header <errno.h> (#111)
This commit is contained in:
parent
86542dbef8
commit
666b2cdc7e
5 changed files with 26 additions and 0 deletions
|
@ -79,6 +79,7 @@ zero). Work-in-progress APIs can change at any time.
|
||||||
* [Example: vsnprintf](/examples/printf_str_va.c)
|
* [Example: vsnprintf](/examples/printf_str_va.c)
|
||||||
* libc replacement (*work in progress*)
|
* libc replacement (*work in progress*)
|
||||||
* [ctype.h](/libc/include/ctype.h)
|
* [ctype.h](/libc/include/ctype.h)
|
||||||
|
* [errno.h](/libc/include/errno.h)
|
||||||
* [inttypes.h](/libc/include/inttypes.h)
|
* [inttypes.h](/libc/include/inttypes.h)
|
||||||
* [setjmp.h](/libc/include/setjmp.h)
|
* [setjmp.h](/libc/include/setjmp.h)
|
||||||
* [stdlib.h](/libc/include/stdlib.h)
|
* [stdlib.h](/libc/include/stdlib.h)
|
||||||
|
|
|
@ -10,6 +10,7 @@ endif
|
||||||
|
|
||||||
libc_la_SOURCES = \
|
libc_la_SOURCES = \
|
||||||
src/ctype.c \
|
src/ctype.c \
|
||||||
|
src/errno.c \
|
||||||
src/stdlib.c \
|
src/stdlib.c \
|
||||||
src/string.c
|
src/string.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
nobase_include_HEADERS = \
|
nobase_include_HEADERS = \
|
||||||
ctype.h \
|
ctype.h \
|
||||||
|
errno.h \
|
||||||
inttypes.h \
|
inttypes.h \
|
||||||
setjmp.h \
|
setjmp.h \
|
||||||
stdlib.h \
|
stdlib.h \
|
||||||
|
|
16
libc/include/errno.h
Normal file
16
libc/include/errno.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef _ERRNO_H
|
||||||
|
#define _ERRNO_H 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ERANGE 1
|
||||||
|
|
||||||
|
extern int errno;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
7
libc/src/errno.c
Normal file
7
libc/src/errno.c
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int errno = 0;
|
Loading…
Reference in a new issue