libc testsuite + fixes

git-svn-id: svn://kolibrios.org@6433 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
siemargl
2016-05-19 12:15:22 +00:00
parent cd8030cee3
commit ace23ebbe2
86 changed files with 3327 additions and 197 deletions

View File

@@ -3,14 +3,15 @@
#include "kolibrisys.h"
#define RAND_MAX 65535
#ifndef NULL
# define NULL ((void*)0)
#endif
//#define isspace(c) ((c)==' ')
#define abs(i) (((i)<0)?(-(i)):(i))
#define labs(li) abs(li)
extern int atoib(char *s,int b);
extern int atoi(char *s);
extern unsigned char tolower(unsigned char c);
extern unsigned char toupper(unsigned char c);
extern char *itoab(int n,char* s,int b);
extern char *itoa(int n,char* s);
@@ -25,6 +26,20 @@ double strtod (const char* str, char** endptr);
long double strtold (const char* str, char** endptr);
float strtof (const char* str, char** endptr);
void* calloc (size_t num, size_t size);
#define exit(a) _ksys_exit()
#endif
#define abort() exit(-1)
typedef struct {
int quot;
int rem;
} div_t;
typedef div_t ldiv_t;
div_t div (int numer, int denom);
#define ldiv(a, b) div(a, b)
#define atol(a) atoi(a)
#endif