mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-05 20:39:16 +00:00
feat(userspace/libc): support for linux target
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -166,8 +166,10 @@ export char *strerror(int errnum)
|
||||
return (char *)"State not recoverable";
|
||||
case ENOTSOCK:
|
||||
return (char *)"Not a socket";
|
||||
#if ENOTSUP != EOPNOTSUPP
|
||||
case ENOTSUP:
|
||||
return (char *)"Not supported";
|
||||
#endif
|
||||
case ENOTTY:
|
||||
return (char *)"Inappropriate I/O control operation";
|
||||
case ENXIO:
|
||||
|
@ -1700,3 +1700,21 @@ export double yn(int n, double x)
|
||||
}
|
||||
return by;
|
||||
}
|
||||
|
||||
void sincos(double x, double *s, double *c)
|
||||
{
|
||||
*s = sin(x);
|
||||
*c = cos(x);
|
||||
}
|
||||
|
||||
void sincosf(float x, float *s, float *c)
|
||||
{
|
||||
*s = sinf(x);
|
||||
*c = cosf(x);
|
||||
}
|
||||
|
||||
void sincosl(long double x, long double *s, long double *c)
|
||||
{
|
||||
*s = sinl(x);
|
||||
*c = cosl(x);
|
||||
}
|
||||
|
@ -65,6 +65,14 @@ export int sigaction(int sig, const struct sigaction *restrict act, struct sigac
|
||||
|
||||
export int sigaddset(sigset_t *set, int signo)
|
||||
{
|
||||
#ifndef SIGNAL_MAX
|
||||
#ifdef NSIG
|
||||
#define SIGNAL_MAX NSIG
|
||||
#else
|
||||
#error "NSIG is not defined"
|
||||
#endif // NSIG
|
||||
#endif // SIGNAL_MAX
|
||||
|
||||
if (set == NULL || signo <= 0 || signo >= SIGNAL_MAX)
|
||||
{
|
||||
errno = EINVAL;
|
||||
|
@ -563,8 +563,10 @@ export char *strsignal(int signum)
|
||||
{
|
||||
switch (signum)
|
||||
{
|
||||
#ifdef SIGNULL
|
||||
case SIGNULL:
|
||||
return "NULL signal";
|
||||
#endif
|
||||
case SIGABRT:
|
||||
return "Aborted";
|
||||
case SIGALRM:
|
||||
|
Reference in New Issue
Block a user