69 lines
1.3 KiB
C
Executable file
69 lines
1.3 KiB
C
Executable file
/*
|
|
* <stdlib.h> - standard library definitions
|
|
*
|
|
* This header is a part of the FENIX C Library and is free software.
|
|
* You can redistribute and/or modify it subject to the terms of the
|
|
* Clumsy Wolf Public License v4. For more details, see the file COPYING.
|
|
*
|
|
* The FENIX C Library is distributed WITH NO WARRANTY WHATSOEVER. See
|
|
* The CWPL for more details.
|
|
*/
|
|
|
|
#ifndef _STDLIB_H
|
|
#define _STDLIB_H
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#ifndef NULL
|
|
#define NULL (void *) 0
|
|
#endif
|
|
|
|
#define __need_size_t
|
|
#define __need_wchar_t
|
|
#include <sys/types.h>
|
|
|
|
#define EXIT_FAILURE 1
|
|
#define EXIT_SUCCESS 0
|
|
|
|
#define RAND_MAX 2147483647
|
|
|
|
#define MB_CUR_MAX (size_t) 1
|
|
|
|
int _rand_state[624] = { 0 };
|
|
unsigned int _rand_seed = 5489;
|
|
int _rand_index = 625;
|
|
|
|
typedef struct _f_div_t {
|
|
int quot;
|
|
int rem;
|
|
} div_t;
|
|
|
|
typedef struct _f_ldiv_t {
|
|
long quot;
|
|
long rem;
|
|
} ldiv_t;
|
|
|
|
typedef struct _f_lldiv_t {
|
|
long long quot;
|
|
long long rem;
|
|
} lldiv_t;
|
|
|
|
__attribute__((__noreturn__))
|
|
void abort(void);
|
|
|
|
void srand(unsigned int);
|
|
int rand(void);
|
|
|
|
div_t div(int, int);
|
|
ldiv_t ldiv(long, long);
|
|
lldiv_t lldiv(long long, long long);
|
|
|
|
int abs(int);
|
|
long labs(long);
|
|
long long llabs(long long);
|
|
|
|
void * bsearch(const void *, const void *, size_t, size_t,
|
|
int (*compar)(const void *, const void *));
|
|
|
|
#endif
|