1998-09-07 07:45:24 +08:00
|
|
|
#ifndef _STDLIB_H
|
1998-09-14 19:43:26 +08:00
|
|
|
|
|
|
|
#ifdef __need_malloc_and_calloc
|
|
|
|
#define __Need_M_And_C
|
|
|
|
#endif
|
|
|
|
|
1995-02-18 09:27:10 +08:00
|
|
|
#include <stdlib/stdlib.h>
|
1998-08-10 01:39:48 +08:00
|
|
|
|
|
|
|
/* Now define the internal interfaces. */
|
1998-09-14 19:43:26 +08:00
|
|
|
#ifndef __Need_M_And_C
|
1999-11-24 01:22:17 +08:00
|
|
|
extern int32_t __random (void);
|
|
|
|
extern void __srandom (unsigned int __seed);
|
2000-02-25 03:12:31 +08:00
|
|
|
extern char *__initstate (unsigned int __seed, char *__statebuf,
|
1999-11-24 01:22:17 +08:00
|
|
|
size_t __statelen);
|
2000-02-25 03:12:31 +08:00
|
|
|
extern char *__setstate (char *__statebuf);
|
1999-11-24 01:22:17 +08:00
|
|
|
extern int __random_r (struct random_data *__buf, int32_t *__result);
|
|
|
|
extern int __srandom_r (unsigned int __seed, struct random_data *__buf);
|
2000-02-25 06:08:02 +08:00
|
|
|
extern int __initstate_r (unsigned int __seed, char *__statebuf,
|
1999-11-24 01:22:17 +08:00
|
|
|
size_t __statelen, struct random_data *__buf);
|
2000-02-25 06:08:02 +08:00
|
|
|
extern int __setstate_r (char *__statebuf, struct random_data *__buf);
|
1999-11-24 01:22:17 +08:00
|
|
|
extern int __rand_r (unsigned int *__seed);
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __erand48_r (unsigned short int __xsubi[3],
|
1999-11-24 01:22:17 +08:00
|
|
|
struct drand48_data *__buffer, double *__result);
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __nrand48_r (unsigned short int __xsubi[3],
|
|
|
|
struct drand48_data *__buffer,
|
1999-11-24 01:22:17 +08:00
|
|
|
long int *__result);
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __jrand48_r (unsigned short int __xsubi[3],
|
|
|
|
struct drand48_data *__buffer,
|
1999-11-24 01:22:17 +08:00
|
|
|
long int *__result);
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __srand48_r (long int __seedval,
|
1999-11-24 01:22:17 +08:00
|
|
|
struct drand48_data *__buffer);
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __seed48_r (unsigned short int __seed16v[3],
|
1999-11-24 01:22:17 +08:00
|
|
|
struct drand48_data *__buffer);
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __lcong48_r (unsigned short int __param[7],
|
1999-11-24 01:22:17 +08:00
|
|
|
struct drand48_data *__buffer);
|
1998-08-10 01:39:48 +08:00
|
|
|
|
|
|
|
/* Internal function to compute next state of the generator. */
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __drand48_iterate (unsigned short int __xsubi[3],
|
1999-11-24 01:22:17 +08:00
|
|
|
struct drand48_data *__buffer);
|
1998-08-10 01:39:48 +08:00
|
|
|
|
1999-10-19 21:53:34 +08:00
|
|
|
extern int __setenv (__const char *__name, __const char *__value,
|
1999-11-24 01:22:17 +08:00
|
|
|
int __replace);
|
|
|
|
extern void __unsetenv (__const char *__name);
|
|
|
|
extern int __clearenv (void);
|
|
|
|
extern char *__canonicalize_file_name (__const char *__name);
|
|
|
|
extern char *__realpath (__const char *__name, char *__resolved);
|
|
|
|
extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
|
|
|
|
extern int __getpt (void);
|
1999-07-30 04:40:05 +08:00
|
|
|
|
|
|
|
extern int __add_to_environ (const char *name, const char *value,
|
|
|
|
const char *combines, int replace);
|
1999-10-29 05:38:59 +08:00
|
|
|
|
|
|
|
extern void _quicksort (void *const pbase, size_t total_elems,
|
|
|
|
size_t size, __compar_fn_t cmp);
|
|
|
|
|
2000-03-20 15:07:18 +08:00
|
|
|
extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
|
|
|
|
|
2000-08-23 15:22:48 +08:00
|
|
|
extern int __posix_memalign (void **memptr, size_t alignment, size_t size)
|
|
|
|
__attribute_malloc__;
|
2000-04-15 01:44:22 +08:00
|
|
|
|
1998-09-07 07:45:24 +08:00
|
|
|
#endif
|
1998-09-14 19:43:26 +08:00
|
|
|
#undef __Need_M_And_C
|
|
|
|
|
|
|
|
#endif /* include/stdlib.h */
|