]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/bootstrap_custom/server/src/ARCH-amd64/libc32/include/stdlib.h
fiasco: bootstrap: copy bootstrap into bootstrap_custom for to port this into Jailhouse.
[l4.git] / l4 / pkg / bootstrap_custom / server / src / ARCH-amd64 / libc32 / include / stdlib.h
1 #ifndef _STDLIB_H
2 #define _STDLIB_H
3
4 #include <cdefs.h>
5 #include <stddef.h>
6
7 __BEGIN_DECLS
8
9 int atexit(void (*function)(void));
10
11 double strtod(const char *nptr, char **endptr);
12 long int strtol(const char *nptr, char **endptr, int base);
13 unsigned long int strtoul(const char *nptr, char **endptr, int base);
14
15 extern int __ltostr(char *s, unsigned int size, unsigned long i, unsigned int base, int UpCase);
16 extern int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec);
17
18 #ifndef __STRICT_ANSI__
19 __extension__ long long int strtoll(const char *nptr, char **endptr, int base);
20 __extension__ unsigned long long int strtoull(const char *nptr, char **endptr, int base);
21 __extension__ int __lltostr(char *s, unsigned int size, unsigned long long i, unsigned int base, int UpCase);
22 #endif
23
24 int atoi(const char *nptr);
25 long int atol(const char *nptr);
26 double atof(const char *nptr);
27
28 #define EXIT_FAILURE 1
29 #define EXIT_SUCCESS 0
30
31 void exit(int status) __attribute__((noreturn));
32 void abort(void);
33
34 /* warning: the rand() implementation of the diet libc really sucks. */
35 #define RAND_MAX 32767
36
37 typedef struct { int quot,rem; } div_t;
38 div_t div(int numer, int denom) __attribute__((const));
39
40 typedef struct { long int quot,rem; } ldiv_t;
41 ldiv_t ldiv(long int numer, long int denom) __attribute__((const));
42
43 typedef struct { long long int quot,rem; } lldiv_t;
44 lldiv_t lldiv(long long int numer, long long int denom) __attribute__((const));
45
46 int abs(int i) __attribute__((const));
47 long int labs(long int i) __attribute__((const));
48 __extension__ long long int llabs(long long int i) __attribute__((const));
49
50 __END_DECLS
51
52 #endif