Update minimal required bunutils version to 2.22
[glibc.git] / include / stdlib.h
blob8d8c75368f314266ad11ebc44155a5130b45028f
1 #ifndef _STDLIB_H
3 #ifdef __need_malloc_and_calloc
4 #define __Need_M_And_C
5 #endif
7 #ifndef _ISOMAC
8 # include <stddef.h>
9 #endif
10 #include <stdlib/stdlib.h>
12 /* Now define the internal interfaces. */
13 #if !defined __Need_M_And_C && !defined _ISOMAC
14 # include <sys/stat.h>
16 __BEGIN_DECLS
18 extern __typeof (strtol_l) __strtol_l;
19 extern __typeof (strtoul_l) __strtoul_l;
20 extern __typeof (strtoll_l) __strtoll_l;
21 extern __typeof (strtoull_l) __strtoull_l;
22 extern __typeof (strtod_l) __strtod_l;
23 extern __typeof (strtof_l) __strtof_l;
24 extern __typeof (strtold_l) __strtold_l;
25 libc_hidden_proto (__strtol_l)
26 libc_hidden_proto (__strtoul_l)
27 libc_hidden_proto (__strtoll_l)
28 libc_hidden_proto (__strtoull_l)
29 libc_hidden_proto (__strtod_l)
30 libc_hidden_proto (__strtof_l)
31 libc_hidden_proto (__strtold_l)
33 libc_hidden_proto (exit)
34 libc_hidden_proto (abort)
35 libc_hidden_proto (getenv)
36 extern __typeof (secure_getenv) __libc_secure_getenv;
37 libc_hidden_proto (__libc_secure_getenv)
38 libc_hidden_proto (bsearch)
39 libc_hidden_proto (qsort)
40 libc_hidden_proto (qsort_r)
41 libc_hidden_proto (lrand48_r)
42 libc_hidden_proto (wctomb)
44 extern long int __random (void);
45 extern void __srandom (unsigned int __seed);
46 extern char *__initstate (unsigned int __seed, char *__statebuf,
47 size_t __statelen);
48 extern char *__setstate (char *__statebuf);
49 extern int __random_r (struct random_data *__buf, int32_t *__result);
50 extern int __srandom_r (unsigned int __seed, struct random_data *__buf);
51 extern int __initstate_r (unsigned int __seed, char *__statebuf,
52 size_t __statelen, struct random_data *__buf);
53 extern int __setstate_r (char *__statebuf, struct random_data *__buf);
54 extern int __rand_r (unsigned int *__seed);
55 extern int __erand48_r (unsigned short int __xsubi[3],
56 struct drand48_data *__buffer, double *__result);
57 extern int __nrand48_r (unsigned short int __xsubi[3],
58 struct drand48_data *__buffer,
59 long int *__result);
60 extern int __jrand48_r (unsigned short int __xsubi[3],
61 struct drand48_data *__buffer,
62 long int *__result);
63 extern int __srand48_r (long int __seedval,
64 struct drand48_data *__buffer);
65 extern int __seed48_r (unsigned short int __seed16v[3],
66 struct drand48_data *__buffer);
67 extern int __lcong48_r (unsigned short int __param[7],
68 struct drand48_data *__buffer);
70 /* Internal function to compute next state of the generator. */
71 extern int __drand48_iterate (unsigned short int __xsubi[3],
72 struct drand48_data *__buffer);
74 /* Global state for non-reentrant functions. Defined in drand48-iter.c. */
75 extern struct drand48_data __libc_drand48_data attribute_hidden;
77 extern int __setenv (const char *__name, const char *__value, int __replace);
78 extern int __unsetenv (const char *__name);
79 extern int __clearenv (void);
80 extern char *__mktemp (char *__template) __THROW __nonnull ((1));
81 extern char *__canonicalize_file_name (const char *__name);
82 extern char *__realpath (const char *__name, char *__resolved);
83 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
84 # ifndef _ISOMAC
85 extern int __ptsname_internal (int fd, char *buf, size_t buflen,
86 struct stat64 *stp);
87 # endif
88 extern int __getpt (void);
89 extern int __posix_openpt (int __oflag);
91 extern int __add_to_environ (const char *name, const char *value,
92 const char *combines, int replace);
94 extern void _quicksort (void *const pbase, size_t total_elems,
95 size_t size, __compar_d_fn_t cmp, void *arg);
97 extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
99 extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
100 libc_hidden_proto (__cxa_atexit);
102 extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg,
103 void *d);
104 extern void __call_tls_dtors (void)
105 #ifndef SHARED
106 __attribute__ ((weak))
107 #endif
109 libc_hidden_proto (__call_tls_dtors)
111 extern void __cxa_finalize (void *d);
113 extern int __posix_memalign (void **memptr, size_t alignment, size_t size);
115 extern void *__libc_memalign (size_t alignment, size_t size)
116 __attribute_malloc__;
118 extern int __libc_system (const char *line);
121 extern double __strtod_internal (const char *__restrict __nptr,
122 char **__restrict __endptr, int __group)
123 __THROW __nonnull ((1)) __wur;
124 extern float __strtof_internal (const char *__restrict __nptr,
125 char **__restrict __endptr, int __group)
126 __THROW __nonnull ((1)) __wur;
127 extern long double __strtold_internal (const char *__restrict __nptr,
128 char **__restrict __endptr,
129 int __group)
130 __THROW __nonnull ((1)) __wur;
131 extern long int __strtol_internal (const char *__restrict __nptr,
132 char **__restrict __endptr,
133 int __base, int __group)
134 __THROW __nonnull ((1)) __wur;
135 extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
136 char **__restrict __endptr,
137 int __base, int __group)
138 __THROW __nonnull ((1)) __wur;
139 __extension__
140 extern long long int __strtoll_internal (const char *__restrict __nptr,
141 char **__restrict __endptr,
142 int __base, int __group)
143 __THROW __nonnull ((1)) __wur;
144 __extension__
145 extern unsigned long long int __strtoull_internal (const char *
146 __restrict __nptr,
147 char **__restrict __endptr,
148 int __base, int __group)
149 __THROW __nonnull ((1)) __wur;
150 libc_hidden_proto (__strtof_internal)
151 libc_hidden_proto (__strtod_internal)
152 libc_hidden_proto (__strtold_internal)
153 libc_hidden_proto (__strtol_internal)
154 libc_hidden_proto (__strtoll_internal)
155 libc_hidden_proto (__strtoul_internal)
156 libc_hidden_proto (__strtoull_internal)
158 extern double ____strtod_l_internal (const char *__restrict __nptr,
159 char **__restrict __endptr, int __group,
160 __locale_t __loc);
161 extern float ____strtof_l_internal (const char *__restrict __nptr,
162 char **__restrict __endptr, int __group,
163 __locale_t __loc);
164 extern long double ____strtold_l_internal (const char *__restrict __nptr,
165 char **__restrict __endptr,
166 int __group, __locale_t __loc);
167 extern long int ____strtol_l_internal (const char *__restrict __nptr,
168 char **__restrict __endptr,
169 int __base, int __group,
170 __locale_t __loc);
171 extern unsigned long int ____strtoul_l_internal (const char *
172 __restrict __nptr,
173 char **__restrict __endptr,
174 int __base, int __group,
175 __locale_t __loc);
176 __extension__
177 extern long long int ____strtoll_l_internal (const char *__restrict __nptr,
178 char **__restrict __endptr,
179 int __base, int __group,
180 __locale_t __loc);
181 __extension__
182 extern unsigned long long int ____strtoull_l_internal (const char *
183 __restrict __nptr,
184 char **
185 __restrict __endptr,
186 int __base, int __group,
187 __locale_t __loc);
189 libc_hidden_proto (____strtof_l_internal)
190 libc_hidden_proto (____strtod_l_internal)
191 libc_hidden_proto (____strtold_l_internal)
192 libc_hidden_proto (____strtol_l_internal)
193 libc_hidden_proto (____strtoll_l_internal)
194 libc_hidden_proto (____strtoul_l_internal)
195 libc_hidden_proto (____strtoull_l_internal)
197 libc_hidden_proto (strtof)
198 libc_hidden_proto (strtod)
199 libc_hidden_proto (strtold)
200 libc_hidden_proto (strtol)
201 libc_hidden_proto (strtoll)
202 libc_hidden_proto (strtoul)
203 libc_hidden_proto (strtoull)
205 extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
206 int *__restrict __sign);
207 extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
208 int *__restrict __sign);
209 extern char *__gcvt (double __value, int __ndigit, char *__buf);
210 extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
211 int *__restrict __sign, char *__restrict __buf,
212 size_t __len);
213 extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
214 int *__restrict __sign, char *__restrict __buf,
215 size_t __len);
216 extern char *__qecvt (long double __value, int __ndigit,
217 int *__restrict __decpt, int *__restrict __sign);
218 extern char *__qfcvt (long double __value, int __ndigit,
219 int *__restrict __decpt, int *__restrict __sign);
220 extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
221 extern int __qecvt_r (long double __value, int __ndigit,
222 int *__restrict __decpt, int *__restrict __sign,
223 char *__restrict __buf, size_t __len);
224 extern int __qfcvt_r (long double __value, int __ndigit,
225 int *__restrict __decpt, int *__restrict __sign,
226 char *__restrict __buf, size_t __len);
228 # ifndef NOT_IN_libc
229 # undef MB_CUR_MAX
230 # define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX))
231 # endif
233 extern void *__default_morecore (ptrdiff_t) __THROW;
234 libc_hidden_proto (__default_morecore)
236 struct abort_msg_s
238 unsigned int size;
239 char msg[0];
241 extern struct abort_msg_s *__abort_msg;
242 libc_hidden_proto (__abort_msg)
244 __END_DECLS
246 #endif
248 #undef __Need_M_And_C
250 #endif /* include/stdlib.h */