typo
[glibc.git] / include / stdlib.h
blob27111b8a854967dea0a5e6021d8ce1cacb06738c
1 #ifndef _STDLIB_H
3 #ifdef __need_malloc_and_calloc
4 #define __Need_M_And_C
5 #endif
7 #include <stddef.h>
8 #include <stdlib/stdlib.h>
10 /* Now define the internal interfaces. */
11 #ifndef __Need_M_And_C
13 __BEGIN_DECLS
15 extern __typeof (strtol_l) __strtol_l;
16 extern __typeof (strtoul_l) __strtoul_l;
17 extern __typeof (strtoll_l) __strtoll_l;
18 extern __typeof (strtoull_l) __strtoull_l;
19 extern __typeof (strtod_l) __strtod_l;
20 extern __typeof (strtof_l) __strtof_l;
21 extern __typeof (strtold_l) __strtold_l;
23 libc_hidden_proto (exit)
24 libc_hidden_proto (abort)
25 libc_hidden_proto (getenv)
26 libc_hidden_proto (bsearch)
27 libc_hidden_proto (qsort)
28 libc_hidden_proto (lrand48_r)
29 libc_hidden_proto (wctomb)
30 libc_hidden_proto (__secure_getenv)
31 libc_hidden_proto (__strtof_internal)
32 libc_hidden_proto (__strtod_internal)
33 libc_hidden_proto (__strtold_internal)
34 libc_hidden_proto (__strtol_internal)
35 libc_hidden_proto (__strtoll_internal)
36 libc_hidden_proto (__strtoul_internal)
37 libc_hidden_proto (__strtoull_internal)
39 extern long int __random (void);
40 extern void __srandom (unsigned int __seed);
41 extern char *__initstate (unsigned int __seed, char *__statebuf,
42 size_t __statelen);
43 extern char *__setstate (char *__statebuf);
44 extern int __random_r (struct random_data *__buf, int32_t *__result);
45 extern int __srandom_r (unsigned int __seed, struct random_data *__buf);
46 extern int __initstate_r (unsigned int __seed, char *__statebuf,
47 size_t __statelen, struct random_data *__buf);
48 extern int __setstate_r (char *__statebuf, struct random_data *__buf);
49 extern int __rand_r (unsigned int *__seed);
50 extern int __erand48_r (unsigned short int __xsubi[3],
51 struct drand48_data *__buffer, double *__result);
52 extern int __nrand48_r (unsigned short int __xsubi[3],
53 struct drand48_data *__buffer,
54 long int *__result);
55 extern int __jrand48_r (unsigned short int __xsubi[3],
56 struct drand48_data *__buffer,
57 long int *__result);
58 extern int __srand48_r (long int __seedval,
59 struct drand48_data *__buffer);
60 extern int __seed48_r (unsigned short int __seed16v[3],
61 struct drand48_data *__buffer);
62 extern int __lcong48_r (unsigned short int __param[7],
63 struct drand48_data *__buffer);
65 /* Internal function to compute next state of the generator. */
66 extern int __drand48_iterate (unsigned short int __xsubi[3],
67 struct drand48_data *__buffer);
69 /* Global state for non-reentrant functions. Defined in drand48-iter.c. */
70 extern struct drand48_data __libc_drand48_data attribute_hidden;
72 extern int __setenv (__const char *__name, __const char *__value,
73 int __replace);
74 extern int __unsetenv (__const char *__name);
75 extern int __clearenv (void);
76 extern char *__canonicalize_file_name (__const char *__name);
77 extern char *__realpath (__const char *__name, char *__resolved);
78 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
79 extern int __getpt (void);
80 extern int __posix_openpt (int __oflag);
82 extern int __add_to_environ (const char *name, const char *value,
83 const char *combines, int replace);
85 extern void _quicksort (void *const pbase, size_t total_elems,
86 size_t size, __compar_fn_t cmp);
88 extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
90 extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
91 extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d)
92 attribute_hidden;
94 extern void __cxa_finalize (void *d);
96 extern int __posix_memalign (void **memptr, size_t alignment, size_t size);
98 extern void *__libc_memalign (size_t alignment, size_t size)
99 __attribute_malloc__;
101 extern int __libc_system (const char *line);
103 extern double ____strtod_l_internal (__const char *__restrict __nptr,
104 char **__restrict __endptr, int __group,
105 __locale_t __loc);
106 extern float ____strtof_l_internal (__const char *__restrict __nptr,
107 char **__restrict __endptr, int __group,
108 __locale_t __loc);
109 extern long double ____strtold_l_internal (__const char *__restrict __nptr,
110 char **__restrict __endptr,
111 int __group, __locale_t __loc);
112 extern long int ____strtol_l_internal (__const char *__restrict __nptr,
113 char **__restrict __endptr,
114 int __base, int __group,
115 __locale_t __loc);
116 extern unsigned long int ____strtoul_l_internal (__const char *
117 __restrict __nptr,
118 char **__restrict __endptr,
119 int __base, int __group,
120 __locale_t __loc);
121 __extension__
122 extern long long int ____strtoll_l_internal (__const char *__restrict __nptr,
123 char **__restrict __endptr,
124 int __base, int __group,
125 __locale_t __loc);
126 __extension__
127 extern unsigned long long int ____strtoull_l_internal (__const char *
128 __restrict __nptr,
129 char **
130 __restrict __endptr,
131 int __base, int __group,
132 __locale_t __loc);
134 libc_hidden_proto (____strtof_l_internal)
135 libc_hidden_proto (____strtod_l_internal)
136 libc_hidden_proto (____strtold_l_internal)
137 libc_hidden_proto (____strtol_l_internal)
138 libc_hidden_proto (____strtoll_l_internal)
139 libc_hidden_proto (____strtoul_l_internal)
140 libc_hidden_proto (____strtoull_l_internal)
142 extern __inline double
143 __NTH (__strtod_l (__const char *__restrict __nptr, char **__restrict __endptr,
144 __locale_t __loc))
146 return ____strtod_l_internal (__nptr, __endptr, 0, __loc);
148 extern __inline long int
149 __NTH (__strtol_l (__const char *__restrict __nptr, char **__restrict __endptr,
150 int __base, __locale_t __loc))
152 return ____strtol_l_internal (__nptr, __endptr, __base, 0, __loc);
154 extern __inline unsigned long int
155 __NTH (__strtoul_l (__const char *__restrict __nptr,
156 char **__restrict __endptr, int __base, __locale_t __loc))
158 return ____strtoul_l_internal (__nptr, __endptr, __base, 0, __loc);
160 extern __inline float
161 __NTH (__strtof_l (__const char *__restrict __nptr, char **__restrict __endptr,
162 __locale_t __loc))
164 return ____strtof_l_internal (__nptr, __endptr, 0, __loc);
166 extern __inline long double
167 __NTH (__strtold_l (__const char *__restrict __nptr,
168 char **__restrict __endptr, __locale_t __loc))
170 return ____strtold_l_internal (__nptr, __endptr, 0, __loc);
172 __extension__ extern __inline long long int
173 __NTH (__strtoll_l (__const char *__restrict __nptr,
174 char **__restrict __endptr, int __base, __locale_t __loc))
176 return ____strtoll_l_internal (__nptr, __endptr, __base, 0, __loc);
178 __extension__ extern __inline unsigned long long int
179 __NTH (__strtoull_l (__const char * __restrict __nptr,
180 char **__restrict __endptr, int __base, __locale_t __loc))
182 return ____strtoull_l_internal (__nptr, __endptr, __base, 0, __loc);
185 extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
186 int *__restrict __sign);
187 extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
188 int *__restrict __sign);
189 extern char *__gcvt (double __value, int __ndigit, char *__buf);
190 extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
191 int *__restrict __sign, char *__restrict __buf,
192 size_t __len);
193 extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
194 int *__restrict __sign, char *__restrict __buf,
195 size_t __len);
196 extern char *__qecvt (long double __value, int __ndigit,
197 int *__restrict __decpt, int *__restrict __sign);
198 extern char *__qfcvt (long double __value, int __ndigit,
199 int *__restrict __decpt, int *__restrict __sign);
200 extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
201 extern int __qecvt_r (long double __value, int __ndigit,
202 int *__restrict __decpt, int *__restrict __sign,
203 char *__restrict __buf, size_t __len);
204 extern int __qfcvt_r (long double __value, int __ndigit,
205 int *__restrict __decpt, int *__restrict __sign,
206 char *__restrict __buf, size_t __len);
208 # ifndef NOT_IN_libc
209 # undef MB_CUR_MAX
210 # define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX))
212 # define __cxa_atexit(func, arg, d) INTUSE(__cxa_atexit) (func, arg, d)
213 # endif
215 #endif
217 extern void *__default_morecore (ptrdiff_t) __THROW;
218 libc_hidden_proto (__default_morecore)
220 __END_DECLS
222 #undef __Need_M_And_C
224 #endif /* include/stdlib.h */