65 lines
2.0 KiB
C
65 lines
2.0 KiB
C
/*
|
|
* This file is part of the UCB release of Plan 9. It is subject to the license
|
|
* terms in the LICENSE file found in the top-level directory of this
|
|
* distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
|
|
* part of the UCB release of Plan 9, including this file, may be copied,
|
|
* modified, propagated, or distributed except according to the terms contained
|
|
* in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef __STDLIB_H
|
|
#define __STDLIB_H
|
|
#pragma lib "/$M/lib/ape/libap.a"
|
|
|
|
#include <stddef.h>
|
|
|
|
#define EXIT_FAILURE 1
|
|
#define EXIT_SUCCESS 0
|
|
#define MB_CUR_MAX 3
|
|
#define RAND_MAX 32767
|
|
|
|
typedef struct { int quot, rem; } div_t;
|
|
typedef struct { long quot, rem; } ldiv_t;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
extern double atof(const char *);
|
|
extern int atoi(const char *);
|
|
extern long int atol(const char *);
|
|
extern long long atoll(const char *);
|
|
extern double strtod(const char *, char **);
|
|
extern long int strtol(const char *, char **, int);
|
|
extern unsigned long int strtoul(const char *, char **, int);
|
|
extern long long int strtoll(const char *, char **, int);
|
|
extern unsigned long long int strtoull(const char *, char **, int);
|
|
extern int rand(void);
|
|
extern void srand(unsigned int seed);
|
|
extern void *calloc(size_t, size_t);
|
|
extern void free(void *);
|
|
extern void *malloc(size_t);
|
|
extern void *realloc(void *, size_t);
|
|
extern void abort(void);
|
|
extern int atexit(void (*func)(void));
|
|
extern void exit(int);
|
|
extern char *getenv(const char *);
|
|
extern int system(const char *);
|
|
extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
|
|
extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
|
|
extern int abs(int);
|
|
extern div_t div(int, int);
|
|
extern long int labs(long int);
|
|
extern ldiv_t ldiv(long int, long int);
|
|
extern int mblen(const char *, size_t);
|
|
extern int mbtowc(wchar_t *, const char *, size_t);
|
|
extern int wctomb(char *, wchar_t);
|
|
extern size_t mbstowcs(wchar_t *, const char *, size_t);
|
|
extern size_t wcstombs(char *, const wchar_t *, size_t);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __STDLIB_H */
|