Remove unnecessary code from x86-32 SSSE3 strncmp
[platform/upstream/glibc.git] / include / stdlib.h
1 #ifndef _STDLIB_H
2
3 #ifdef __need_malloc_and_calloc
4 #define __Need_M_And_C
5 #endif
6
7 #include <stddef.h>
8 #include <stdlib/stdlib.h>
9
10 /* Now define the internal interfaces.  */
11 #ifndef __Need_M_And_C
12 # ifndef _ISOMAC
13 #  include <sys/stat.h>
14 # endif
15
16 __BEGIN_DECLS
17
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)
32
33 libc_hidden_proto (exit)
34 libc_hidden_proto (abort)
35 libc_hidden_proto (getenv)
36 libc_hidden_proto (bsearch)
37 libc_hidden_proto (qsort)
38 libc_hidden_proto (qsort_r)
39 libc_hidden_proto (lrand48_r)
40 libc_hidden_proto (wctomb)
41 libc_hidden_proto (__secure_getenv)
42
43 extern long int __random (void);
44 extern void __srandom (unsigned int __seed);
45 extern char *__initstate (unsigned int __seed, char *__statebuf,
46                           size_t __statelen);
47 extern char *__setstate (char *__statebuf);
48 extern int __random_r (struct random_data *__buf, int32_t *__result);
49 extern int __srandom_r (unsigned int __seed, struct random_data *__buf);
50 extern int __initstate_r (unsigned int __seed, char *__statebuf,
51                           size_t __statelen, struct random_data *__buf);
52 extern int __setstate_r (char *__statebuf, struct random_data *__buf);
53 extern int __rand_r (unsigned int *__seed);
54 extern int __erand48_r (unsigned short int __xsubi[3],
55                         struct drand48_data *__buffer, double *__result);
56 extern int __nrand48_r (unsigned short int __xsubi[3],
57                         struct drand48_data *__buffer,
58                         long int *__result);
59 extern int __jrand48_r (unsigned short int __xsubi[3],
60                         struct drand48_data *__buffer,
61                         long int *__result);
62 extern int __srand48_r (long int __seedval,
63                         struct drand48_data *__buffer);
64 extern int __seed48_r (unsigned short int __seed16v[3],
65                        struct drand48_data *__buffer);
66 extern int __lcong48_r (unsigned short int __param[7],
67                         struct drand48_data *__buffer);
68
69 /* Internal function to compute next state of the generator.  */
70 extern int __drand48_iterate (unsigned short int __xsubi[3],
71                               struct drand48_data *__buffer);
72
73 /* Global state for non-reentrant functions.  Defined in drand48-iter.c.  */
74 extern struct drand48_data __libc_drand48_data attribute_hidden;
75
76 extern int __setenv (__const char *__name, __const char *__value,
77                      int __replace);
78 extern int __unsetenv (__const char *__name);
79 extern int __clearenv (void);
80 extern char *__canonicalize_file_name (__const char *__name);
81 extern char *__realpath (__const char *__name, char *__resolved);
82 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
83 # ifndef _ISOMAC
84 extern int __ptsname_internal (int fd, char *buf, size_t buflen,
85                                struct stat64 *stp);
86 # endif
87 extern int __getpt (void);
88 extern int __posix_openpt (int __oflag);
89
90 extern int __add_to_environ (const char *name, const char *value,
91                              const char *combines, int replace);
92
93 extern void _quicksort (void *const pbase, size_t total_elems,
94                         size_t size, __compar_d_fn_t cmp, void *arg);
95
96 extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
97
98 extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
99 extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d)
100      attribute_hidden;
101
102 extern void __cxa_finalize (void *d);
103
104 extern int __posix_memalign (void **memptr, size_t alignment, size_t size);
105
106 extern void *__libc_memalign (size_t alignment, size_t size)
107      __attribute_malloc__;
108
109 extern int __libc_system (const char *line);
110
111
112 extern double __strtod_internal (__const char *__restrict __nptr,
113                                  char **__restrict __endptr, int __group)
114      __THROW __nonnull ((1)) __wur;
115 extern float __strtof_internal (__const char *__restrict __nptr,
116                                 char **__restrict __endptr, int __group)
117      __THROW __nonnull ((1)) __wur;
118 extern long double __strtold_internal (__const char *__restrict __nptr,
119                                        char **__restrict __endptr,
120                                        int __group)
121      __THROW __nonnull ((1)) __wur;
122 extern long int __strtol_internal (__const char *__restrict __nptr,
123                                    char **__restrict __endptr,
124                                    int __base, int __group)
125      __THROW __nonnull ((1)) __wur;
126 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
127                                              char **__restrict __endptr,
128                                              int __base, int __group)
129      __THROW __nonnull ((1)) __wur;
130 __extension__
131 extern long long int __strtoll_internal (__const char *__restrict __nptr,
132                                          char **__restrict __endptr,
133                                          int __base, int __group)
134      __THROW __nonnull ((1)) __wur;
135 __extension__
136 extern unsigned long long int __strtoull_internal (__const char *
137                                                    __restrict __nptr,
138                                                    char **__restrict __endptr,
139                                                    int __base, int __group)
140      __THROW __nonnull ((1)) __wur;
141 libc_hidden_proto (__strtof_internal)
142 libc_hidden_proto (__strtod_internal)
143 libc_hidden_proto (__strtold_internal)
144 libc_hidden_proto (__strtol_internal)
145 libc_hidden_proto (__strtoll_internal)
146 libc_hidden_proto (__strtoul_internal)
147 libc_hidden_proto (__strtoull_internal)
148
149 extern double ____strtod_l_internal (__const char *__restrict __nptr,
150                                      char **__restrict __endptr, int __group,
151                                      __locale_t __loc);
152 extern float ____strtof_l_internal (__const char *__restrict __nptr,
153                                     char **__restrict __endptr, int __group,
154                                     __locale_t __loc);
155 extern long double ____strtold_l_internal (__const char *__restrict __nptr,
156                                            char **__restrict __endptr,
157                                            int __group, __locale_t __loc);
158 extern long int ____strtol_l_internal (__const char *__restrict __nptr,
159                                        char **__restrict __endptr,
160                                        int __base, int __group,
161                                        __locale_t __loc);
162 extern unsigned long int ____strtoul_l_internal (__const char *
163                                                  __restrict __nptr,
164                                                  char **__restrict __endptr,
165                                                  int __base, int __group,
166                                                  __locale_t __loc);
167 __extension__
168 extern long long int ____strtoll_l_internal (__const char *__restrict __nptr,
169                                              char **__restrict __endptr,
170                                              int __base, int __group,
171                                              __locale_t __loc);
172 __extension__
173 extern unsigned long long int ____strtoull_l_internal (__const char *
174                                                        __restrict __nptr,
175                                                        char **
176                                                        __restrict __endptr,
177                                                        int __base, int __group,
178                                                        __locale_t __loc);
179
180 libc_hidden_proto (____strtof_l_internal)
181 libc_hidden_proto (____strtod_l_internal)
182 libc_hidden_proto (____strtold_l_internal)
183 libc_hidden_proto (____strtol_l_internal)
184 libc_hidden_proto (____strtoll_l_internal)
185 libc_hidden_proto (____strtoul_l_internal)
186 libc_hidden_proto (____strtoull_l_internal)
187
188 libc_hidden_proto (strtof)
189 libc_hidden_proto (strtod)
190 libc_hidden_proto (strtold)
191 libc_hidden_proto (strtol)
192 libc_hidden_proto (strtoll)
193 libc_hidden_proto (strtoul)
194 libc_hidden_proto (strtoull)
195
196 extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
197                      int *__restrict __sign);
198 extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
199                      int *__restrict __sign);
200 extern char *__gcvt (double __value, int __ndigit, char *__buf);
201 extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
202                      int *__restrict __sign, char *__restrict __buf,
203                      size_t __len);
204 extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
205                      int *__restrict __sign, char *__restrict __buf,
206                      size_t __len);
207 extern char *__qecvt (long double __value, int __ndigit,
208                       int *__restrict __decpt, int *__restrict __sign);
209 extern char *__qfcvt (long double __value, int __ndigit,
210                       int *__restrict __decpt, int *__restrict __sign);
211 extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
212 extern int __qecvt_r (long double __value, int __ndigit,
213                       int *__restrict __decpt, int *__restrict __sign,
214                       char *__restrict __buf, size_t __len);
215 extern int __qfcvt_r (long double __value, int __ndigit,
216                       int *__restrict __decpt, int *__restrict __sign,
217                       char *__restrict __buf, size_t __len);
218
219 # ifndef NOT_IN_libc
220 #  undef MB_CUR_MAX
221 #  define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX))
222
223 # define __cxa_atexit(func, arg, d) INTUSE(__cxa_atexit) (func, arg, d)
224 # endif
225
226 extern void *__default_morecore (ptrdiff_t) __THROW;
227 libc_hidden_proto (__default_morecore)
228
229 struct abort_msg_s
230 {
231   unsigned int size;
232   char msg[0];
233 };
234 extern struct abort_msg_s *__abort_msg;
235 libc_hidden_proto (__abort_msg)
236
237 __END_DECLS
238
239 #endif
240
241 #undef __Need_M_And_C
242
243 #endif  /* include/stdlib.h */