Revert "Revert "Initial commit - work done up through 11 Feb 2020""

This reverts commit 56f77cf071.

oops
This commit is contained in:
Gitea 2020-02-11 23:23:27 -06:00
parent 56f77cf071
commit 36cb297b57
27 changed files with 478 additions and 0 deletions

91
include/math.h Executable file
View file

@ -0,0 +1,91 @@
#ifndef _MATH_H
#define _MATH_H
#include <sys/types.h>
#if FLT_EVAL_METHOD == 1
typedef float_t double;
typedef double_t double;
#elseif FLT_EVAL_METHOD == 2
typedef float_t long double;
typedef double_t long double;
#else
typedef float_t float;
typedef double_t double;
#endif
#define M_E 2.718281828
#define M_PI 3.14159265
#define PI 3.14159265
double acos(double);
float acosf(float);
long double acosl(long double);
double asin(double);
float asinf(float);
long double asinl(long double);
double atan(double);
float atanf(float);
long double atanl(long double);
double atan2(double);
float atan2f(float);
long double atan2l(long double);
double cos(double);
float cosf(float);
long double cosl(long double);
double sin(double);
float sinf(float);
long double sinl(long double);
double tan(double);
float tanf(float);
long double tanl(long double);
double acosh(double);
float acoshf(float);
long double acoshl(long double);
double asinh(double);
float asinhf(float);
long double asinhl(long double);
double atanh(double);
float atanhf(float);
long double atanhl(long double);
double cosh(double);
float coshf(float);
long double coshl(long double);
double sinh(double);
float sinhf(float);
long double sinhl(long double);
double tanh(double);
float tanhf(float);
long double tanhl(long double);
double exp(double);
float expf(float);
long double expl(double);
double exp2(double);
float exp2f(float);
long double exp2l(double);
double expm1(double);
float expm1f(float);
long double expm1l(double);
double frexp(double, int *);
float frexpf(float, int *);
long double frexpl(double, int *);
#endif

14
include/stdio.h Executable file
View file

@ -0,0 +1,14 @@
#ifndef _STDIO_H
#define _STDIO_H
#include <sys/cdefs.h>
#define EOF (-1)
int printf(const char * __restrict, ...);
int putchar(int);
int puts(const char *);
#endif

9
include/stdlib.h Executable file
View file

@ -0,0 +1,9 @@
#ifndef _STDLIB_H
#define _STDLIB_H
#include <sys/cdefs.h>
__attribute__((__noreturn__))
void abort(void);
#endif

15
include/string.h Executable file
View file

@ -0,0 +1,15 @@
#ifndef _STRING_H
#define _STRING_H
#include <sys/cdefs.h>
#include <stddef.h>
int memcmp(const void *, const void *, size_t);
void * memcpy(void * __restrict, const void * __restrict, size_t);
void * memmove(void *, const void *, size_t);
void * memset(void *, int, size_t);
size_t strlen(const char *);
#endif

6
include/sys/cdefs.h Executable file
View file

@ -0,0 +1,6 @@
#ifndef _SYS_CDEFS_H
#define _SYS_CDEFS_H
#define __fenix_libc 1
#endif

4
include/sys/types.h Executable file
View file

@ -0,0 +1,4 @@
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H
#endif /* not _HEADER */