diff options
author | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
commit | fa40f30b4253b1e05c46cc5e0c111176825b7623 (patch) | |
tree | 76cf2d26c0ce0ee7c6a2c1a1a2b65bc4d8e33029 /mdk-stage1/dietlibc/include/stdlib.h | |
parent | 327bd24f8e4291bd1882de1990dd7339f781a9cb (diff) | |
download | drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.gz drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.bz2 drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.xz drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.zip |
This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'.Corpo_2_1_1
Diffstat (limited to 'mdk-stage1/dietlibc/include/stdlib.h')
-rw-r--r-- | mdk-stage1/dietlibc/include/stdlib.h | 75 |
1 files changed, 54 insertions, 21 deletions
diff --git a/mdk-stage1/dietlibc/include/stdlib.h b/mdk-stage1/dietlibc/include/stdlib.h index 6a13a48ff..5824a6ffa 100644 --- a/mdk-stage1/dietlibc/include/stdlib.h +++ b/mdk-stage1/dietlibc/include/stdlib.h @@ -1,32 +1,38 @@ #ifndef _STDLIB_H #define _STDLIB_H +#ifndef __ASSEMBLER__ + #include <sys/cdefs.h> #include <sys/types.h> +#include <alloca.h> -#define __LIBC_DIETLIBC__ - -void *calloc(size_t nmemb, size_t size) __THROW; -void *malloc(size_t size) __THROW; +void *calloc(size_t nmemb, size_t size) __attribute_malloc__ __THROW; +void *malloc(size_t size) __attribute_malloc__ __THROW; void free(void *ptr) __THROW; -void *realloc(void *ptr, size_t size) __THROW; +void *realloc(void *ptr, size_t size) __attribute_malloc__ __THROW; char *getenv(const char *name) __THROW __pure__; int putenv(const char *string) __THROW; int setenv(const char *name, const char *value, int overwrite) __THROW; void unsetenv(const char *name) __THROW; +int system (const char * string) __THROW; int atexit(void (*function)(void)) __THROW; +float strtof(const char *nptr, char **endptr) __THROW; double strtod(const char *nptr, char **endptr) __THROW; +long double strtold(const char *nptr, char **endptr) __THROW; long int strtol(const char *nptr, char **endptr, int base) __THROW; unsigned long int strtoul(const char *nptr, char **endptr, int base) __THROW; -int __ltostr(char *s, int size, unsigned long i, int base, char UpCase) __THROW; -#ifdef __GNUC__ -long long int strtoll(const char *nptr, char **endptr, int base) __THROW; -unsigned long long int strtoull(const char *nptr, char **endptr, int base) __THROW; -int __lltostr(char *s, int size, unsigned long long i, int base, char UpCase) __THROW; +extern int __ltostr(char *s, unsigned int size, unsigned long i, unsigned int base, int UpCase) __THROW; +extern int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned int prec2) __THROW; + +#ifndef __STRICT_ANSI__ +__extension__ long long int strtoll(const char *nptr, char **endptr, int base) __THROW; +__extension__ unsigned long long int strtoull(const char *nptr, char **endptr, int base) __THROW; +__extension__ int __lltostr(char *s, unsigned int size, unsigned long long i, unsigned int base, int UpCase) __THROW; #endif int atoi(const char *nptr) __THROW; @@ -36,32 +42,59 @@ double atof(const char *nptr) __THROW; void exit(int status) __THROW __attribute__((noreturn)); void abort(void) __THROW; -/* warning: the rand() implementation of the diet libc really sucks. */ -#define RAND_MAX 32767 - extern int rand(void) __THROW; +extern int rand_r(unsigned int *seed) __THROW; extern void srand(unsigned int seed) __THROW; +#ifdef _BSD_SOURCE +extern int random(void) __THROW; +extern void srandom(unsigned int seed) __THROW; +#endif + +typedef unsigned short randbuf[3]; +double drand48(void) __THROW; +long lrand48(void) __THROW; +long mrand48(void) __THROW; +void srand48(long seed) __THROW; +unsigned short *seed48(randbuf buf) __THROW; +void lcong48(unsigned short param[7]) __THROW; +long jrand48(randbuf buf) __THROW; +long nrand48(randbuf buf) __THROW; +double erand48(randbuf buf) __THROW; void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) __THROW; void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) __THROW; extern char **environ; -#define EXIT_SUCCESS 0 -#define EXIT_FAILURE 1 - /* now this function is the greatest bullshit I have ever seen. * The ISO people must be out of their minds. */ typedef struct { int quot,rem; } div_t; div_t div(int numer, int denom) __THROW __attribute__((const)); -void *alloca(size_t size) __THROW; /* gcc built-in */ - char *realpath(const char *path, char *resolved_path) __THROW; -int abs(int j) __THROW; +int mkstemp(char *_template); +char* mkdtemp(char *_template); + +char* mktemp(char *_template); + +int abs(int i) __THROW __attribute__((const)); +long int labs(long int i) __THROW __attribute__((const)); +__extension__ long long int llabs(long long int i) __THROW __attribute__((const)); + +#ifdef _XOPEN_SOURCE +int grantpt (int fd) __THROW; +int unlockpt (int fd) __THROW; +char *ptsname (int fd) __THROW; +#endif + +#endif + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 + +#define RAND_MAX ((1<<31) -2) -long int random(void) __THROW; -void srandom(unsigned int seed) __THROW; +#define MB_CUR_MAX 1 #endif |