3 #ifdef __need_malloc_and_calloc
8 #include <stdlib/stdlib.h>
10 /* Now define the internal interfaces. */
11 #ifndef __Need_M_And_C
13 libc_hidden_proto (exit)
14 libc_hidden_proto (abort)
15 libc_hidden_proto (getenv)
16 libc_hidden_proto (bsearch)
17 libc_hidden_proto (qsort)
18 libc_hidden_proto (ecvt_r)
19 libc_hidden_proto (fcvt_r)
20 libc_hidden_proto (qecvt_r)
21 libc_hidden_proto (qfcvt_r)
22 libc_hidden_proto (lrand48_r)
23 libc_hidden_proto (__secure_getenv)
24 libc_hidden_proto (__strtof_internal)
25 libc_hidden_proto (__strtod_internal)
26 libc_hidden_proto (__strtold_internal)
27 libc_hidden_proto (__strtol_internal)
28 libc_hidden_proto (__strtoll_internal)
29 libc_hidden_proto (__strtoul_internal)
30 libc_hidden_proto (__strtoull_internal)
32 extern long int __random (void);
33 extern void __srandom (unsigned int __seed);
34 extern char *__initstate (unsigned int __seed, char *__statebuf,
36 extern char *__setstate (char *__statebuf);
37 extern int __random_r (struct random_data *__buf, int32_t *__result);
38 extern int __srandom_r (unsigned int __seed, struct random_data *__buf);
39 extern int __initstate_r (unsigned int __seed, char *__statebuf,
40 size_t __statelen, struct random_data *__buf);
41 extern int __setstate_r (char *__statebuf, struct random_data *__buf);
42 extern int __rand_r (unsigned int *__seed);
43 extern int __erand48_r (unsigned short int __xsubi[3],
44 struct drand48_data *__buffer, double *__result);
45 extern int __nrand48_r (unsigned short int __xsubi[3],
46 struct drand48_data *__buffer,
48 extern int __jrand48_r (unsigned short int __xsubi[3],
49 struct drand48_data *__buffer,
51 extern int __srand48_r (long int __seedval,
52 struct drand48_data *__buffer);
53 extern int __seed48_r (unsigned short int __seed16v[3],
54 struct drand48_data *__buffer);
55 extern int __lcong48_r (unsigned short int __param[7],
56 struct drand48_data *__buffer);
58 /* Internal function to compute next state of the generator. */
59 extern int __drand48_iterate (unsigned short int __xsubi[3],
60 struct drand48_data *__buffer);
62 /* Global state for non-reentrant functions. Defined in drand48-iter.c. */
63 extern struct drand48_data __libc_drand48_data attribute_hidden;
65 extern int __setenv (__const char *__name, __const char *__value,
67 extern int __unsetenv (__const char *__name);
68 extern int __clearenv (void);
69 extern char *__canonicalize_file_name (__const char *__name);
70 extern char *__realpath (__const char *__name, char *__resolved);
71 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
72 extern int __getpt (void);
73 extern int __posix_openpt (int __oflag);
75 extern int __add_to_environ (const char *name, const char *value,
76 const char *combines, int replace);
78 extern void _quicksort (void *const pbase, size_t total_elems,
79 size_t size, __compar_fn_t cmp);
81 extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
83 extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
84 extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d)
87 extern void __cxa_finalize (void *d);
89 extern int __posix_memalign (void **memptr, size_t alignment, size_t size)
91 extern void *__libc_memalign (size_t alignment, size_t size)
94 extern int __libc_system (const char *line);
96 extern double ____strtod_l_internal (__const char *__restrict __nptr,
97 char **__restrict __endptr, int __group,
98 __locale_t __loc) __THROW;
99 extern float ____strtof_l_internal (__const char *__restrict __nptr,
100 char **__restrict __endptr, int __group,
101 __locale_t __loc) __THROW;
102 extern long double ____strtold_l_internal (__const char *__restrict __nptr,
103 char **__restrict __endptr,
104 int __group, __locale_t __loc)
106 extern long int ____strtol_l_internal (__const char *__restrict __nptr,
107 char **__restrict __endptr,
108 int __base, int __group,
109 __locale_t __loc) __THROW;
110 extern unsigned long int ____strtoul_l_internal (__const char *
112 char **__restrict __endptr,
113 int __base, int __group,
114 __locale_t __loc) __THROW;
116 extern long long int ____strtoll_l_internal (__const char *__restrict __nptr,
117 char **__restrict __endptr,
118 int __base, int __group,
119 __locale_t __loc) __THROW;
121 extern unsigned long long int ____strtoull_l_internal (__const char *
125 int __base, int __group,
129 libc_hidden_proto (____strtof_l_internal)
130 libc_hidden_proto (____strtod_l_internal)
131 libc_hidden_proto (____strtold_l_internal)
132 libc_hidden_proto (____strtol_l_internal)
133 libc_hidden_proto (____strtoll_l_internal)
134 libc_hidden_proto (____strtoul_l_internal)
135 libc_hidden_proto (____strtoull_l_internal)
137 extern __inline double
138 __strtod_l (__const char *__restrict __nptr, char **__restrict __endptr,
139 __locale_t __loc) __THROW
141 return ____strtod_l_internal (__nptr, __endptr, 0, __loc);
143 extern __inline long int
144 __strtol_l (__const char *__restrict __nptr, char **__restrict __endptr,
145 int __base, __locale_t __loc) __THROW
147 return ____strtol_l_internal (__nptr, __endptr, __base, 0, __loc);
149 extern __inline unsigned long int
150 __strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr,
151 int __base, __locale_t __loc) __THROW
153 return ____strtoul_l_internal (__nptr, __endptr, __base, 0, __loc);
155 extern __inline float
156 __strtof_l (__const char *__restrict __nptr, char **__restrict __endptr,
157 __locale_t __loc) __THROW
159 return ____strtof_l_internal (__nptr, __endptr, 0, __loc);
161 extern __inline long double
162 __strtold_l (__const char *__restrict __nptr, char **__restrict __endptr,
163 __locale_t __loc) __THROW
165 return ____strtold_l_internal (__nptr, __endptr, 0, __loc);
167 __extension__ extern __inline long long int
168 __strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr,
169 int __base, __locale_t __loc) __THROW
171 return ____strtoll_l_internal (__nptr, __endptr, __base, 0, __loc);
173 __extension__ extern __inline unsigned long long int
174 __strtoull_l (__const char * __restrict __nptr, char **__restrict __endptr,
175 int __base, __locale_t __loc) __THROW
177 return ____strtoull_l_internal (__nptr, __endptr, __base, 0, __loc);
183 # define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX))
185 # define __cxa_atexit(func, arg, d) INTUSE(__cxa_atexit) (func, arg, d)
190 extern void * __default_morecore (ptrdiff_t);
191 libc_hidden_proto (__default_morecore)
193 #undef __Need_M_And_C
195 #endif /* include/stdlib.h */