Back to index

glibc  2.9
stdlib.h
Go to the documentation of this file.
00001 #ifndef _STDLIB_H
00002 
00003 #ifdef __need_malloc_and_calloc
00004 #define __Need_M_And_C
00005 #endif
00006 
00007 #include <stddef.h>
00008 #include <stdlib/stdlib.h>
00009 
00010 /* Now define the internal interfaces.  */
00011 #ifndef __Need_M_And_C
00012 
00013 __BEGIN_DECLS
00014 
00015 extern __typeof (strtol_l) __strtol_l;
00016 extern __typeof (strtoul_l) __strtoul_l;
00017 extern __typeof (strtoll_l) __strtoll_l;
00018 extern __typeof (strtoull_l) __strtoull_l;
00019 extern __typeof (strtod_l) __strtod_l;
00020 extern __typeof (strtof_l) __strtof_l;
00021 extern __typeof (strtold_l) __strtold_l;
00022 libc_hidden_proto (__strtol_l)
00023 libc_hidden_proto (__strtoul_l)
00024 libc_hidden_proto (__strtoll_l)
00025 libc_hidden_proto (__strtoull_l)
00026 libc_hidden_proto (__strtod_l)
00027 libc_hidden_proto (__strtof_l)
00028 libc_hidden_proto (__strtold_l)
00029 
00030 libc_hidden_proto (exit)
00031 libc_hidden_proto (abort)
00032 libc_hidden_proto (getenv)
00033 libc_hidden_proto (bsearch)
00034 libc_hidden_proto (qsort)
00035 libc_hidden_proto (qsort_r)
00036 libc_hidden_proto (lrand48_r)
00037 libc_hidden_proto (wctomb)
00038 libc_hidden_proto (__secure_getenv)
00039 
00040 extern long int __random (void);
00041 extern void __srandom (unsigned int __seed);
00042 extern char *__initstate (unsigned int __seed, char *__statebuf,
00043                        size_t __statelen);
00044 extern char *__setstate (char *__statebuf);
00045 extern int __random_r (struct random_data *__buf, int32_t *__result);
00046 extern int __srandom_r (unsigned int __seed, struct random_data *__buf);
00047 extern int __initstate_r (unsigned int __seed, char *__statebuf,
00048                        size_t __statelen, struct random_data *__buf);
00049 extern int __setstate_r (char *__statebuf, struct random_data *__buf);
00050 extern int __rand_r (unsigned int *__seed);
00051 extern int __erand48_r (unsigned short int __xsubi[3],
00052                      struct drand48_data *__buffer, double *__result);
00053 extern int __nrand48_r (unsigned short int __xsubi[3],
00054                      struct drand48_data *__buffer,
00055                      long int *__result);
00056 extern int __jrand48_r (unsigned short int __xsubi[3],
00057                      struct drand48_data *__buffer,
00058                      long int *__result);
00059 extern int __srand48_r (long int __seedval,
00060                      struct drand48_data *__buffer);
00061 extern int __seed48_r (unsigned short int __seed16v[3],
00062                      struct drand48_data *__buffer);
00063 extern int __lcong48_r (unsigned short int __param[7],
00064                      struct drand48_data *__buffer);
00065 
00066 /* Internal function to compute next state of the generator.  */
00067 extern int __drand48_iterate (unsigned short int __xsubi[3],
00068                            struct drand48_data *__buffer);
00069 
00070 /* Global state for non-reentrant functions.  Defined in drand48-iter.c.  */
00071 extern struct drand48_data __libc_drand48_data attribute_hidden;
00072 
00073 extern int __setenv (__const char *__name, __const char *__value,
00074                    int __replace);
00075 extern int __unsetenv (__const char *__name);
00076 extern int __clearenv (void);
00077 extern char *__canonicalize_file_name (__const char *__name);
00078 extern char *__realpath (__const char *__name, char *__resolved);
00079 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
00080 extern int __getpt (void);
00081 extern int __posix_openpt (int __oflag);
00082 
00083 extern int __add_to_environ (const char *name, const char *value,
00084                           const char *combines, int replace);
00085 
00086 extern void _quicksort (void *const pbase, size_t total_elems,
00087                      size_t size, __compar_d_fn_t cmp, void *arg);
00088 
00089 extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
00090 
00091 extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
00092 extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d)
00093      attribute_hidden;
00094 
00095 extern void __cxa_finalize (void *d);
00096 
00097 extern int __posix_memalign (void **memptr, size_t alignment, size_t size);
00098 
00099 extern void *__libc_memalign (size_t alignment, size_t size)
00100      __attribute_malloc__;
00101 
00102 extern int __libc_system (const char *line);
00103 
00104 
00105 extern double __strtod_internal (__const char *__restrict __nptr,
00106                              char **__restrict __endptr, int __group)
00107      __THROW __nonnull ((1)) __wur;
00108 extern float __strtof_internal (__const char *__restrict __nptr,
00109                             char **__restrict __endptr, int __group)
00110      __THROW __nonnull ((1)) __wur;
00111 extern long double __strtold_internal (__const char *__restrict __nptr,
00112                                    char **__restrict __endptr,
00113                                    int __group)
00114      __THROW __nonnull ((1)) __wur;
00115 extern long int __strtol_internal (__const char *__restrict __nptr,
00116                                char **__restrict __endptr,
00117                                int __base, int __group)
00118      __THROW __nonnull ((1)) __wur;
00119 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
00120                                         char **__restrict __endptr,
00121                                         int __base, int __group)
00122      __THROW __nonnull ((1)) __wur;
00123 __extension__
00124 extern long long int __strtoll_internal (__const char *__restrict __nptr,
00125                                     char **__restrict __endptr,
00126                                     int __base, int __group)
00127      __THROW __nonnull ((1)) __wur;
00128 __extension__
00129 extern unsigned long long int __strtoull_internal (__const char *
00130                                              __restrict __nptr,
00131                                              char **__restrict __endptr,
00132                                              int __base, int __group)
00133      __THROW __nonnull ((1)) __wur;
00134 libc_hidden_proto (__strtof_internal)
00135 libc_hidden_proto (__strtod_internal)
00136 libc_hidden_proto (__strtold_internal)
00137 libc_hidden_proto (__strtol_internal)
00138 libc_hidden_proto (__strtoll_internal)
00139 libc_hidden_proto (__strtoul_internal)
00140 libc_hidden_proto (__strtoull_internal)
00141 
00142 extern double ____strtod_l_internal (__const char *__restrict __nptr,
00143                                  char **__restrict __endptr, int __group,
00144                                  __locale_t __loc);
00145 extern float ____strtof_l_internal (__const char *__restrict __nptr,
00146                                 char **__restrict __endptr, int __group,
00147                                 __locale_t __loc);
00148 extern long double ____strtold_l_internal (__const char *__restrict __nptr,
00149                                       char **__restrict __endptr,
00150                                       int __group, __locale_t __loc);
00151 extern long int ____strtol_l_internal (__const char *__restrict __nptr,
00152                                    char **__restrict __endptr,
00153                                    int __base, int __group,
00154                                    __locale_t __loc);
00155 extern unsigned long int ____strtoul_l_internal (__const char *
00156                                            __restrict __nptr,
00157                                            char **__restrict __endptr,
00158                                            int __base, int __group,
00159                                            __locale_t __loc);
00160 __extension__
00161 extern long long int ____strtoll_l_internal (__const char *__restrict __nptr,
00162                                         char **__restrict __endptr,
00163                                         int __base, int __group,
00164                                         __locale_t __loc);
00165 __extension__
00166 extern unsigned long long int ____strtoull_l_internal (__const char *
00167                                                  __restrict __nptr,
00168                                                  char **
00169                                                  __restrict __endptr,
00170                                                  int __base, int __group,
00171                                                  __locale_t __loc);
00172 
00173 libc_hidden_proto (____strtof_l_internal)
00174 libc_hidden_proto (____strtod_l_internal)
00175 libc_hidden_proto (____strtold_l_internal)
00176 libc_hidden_proto (____strtol_l_internal)
00177 libc_hidden_proto (____strtoll_l_internal)
00178 libc_hidden_proto (____strtoul_l_internal)
00179 libc_hidden_proto (____strtoull_l_internal)
00180 
00181 libc_hidden_proto (strtof)
00182 libc_hidden_proto (strtod)
00183 libc_hidden_proto (strtold)
00184 libc_hidden_proto (strtol)
00185 libc_hidden_proto (strtoll)
00186 libc_hidden_proto (strtoul)
00187 libc_hidden_proto (strtoull)
00188 
00189 extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
00190                    int *__restrict __sign);
00191 extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
00192                    int *__restrict __sign);
00193 extern char *__gcvt (double __value, int __ndigit, char *__buf);
00194 extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
00195                    int *__restrict __sign, char *__restrict __buf,
00196                    size_t __len);
00197 extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
00198                    int *__restrict __sign, char *__restrict __buf,
00199                    size_t __len);
00200 extern char *__qecvt (long double __value, int __ndigit,
00201                     int *__restrict __decpt, int *__restrict __sign);
00202 extern char *__qfcvt (long double __value, int __ndigit,
00203                     int *__restrict __decpt, int *__restrict __sign);
00204 extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
00205 extern int __qecvt_r (long double __value, int __ndigit,
00206                     int *__restrict __decpt, int *__restrict __sign,
00207                     char *__restrict __buf, size_t __len);
00208 extern int __qfcvt_r (long double __value, int __ndigit,
00209                     int *__restrict __decpt, int *__restrict __sign,
00210                     char *__restrict __buf, size_t __len);
00211 
00212 # ifndef NOT_IN_libc
00213 #  undef MB_CUR_MAX
00214 #  define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX))
00215 
00216 # define __cxa_atexit(func, arg, d) INTUSE(__cxa_atexit) (func, arg, d)
00217 # endif
00218 
00219 #endif
00220 
00221 extern void *__default_morecore (ptrdiff_t) __THROW;
00222 libc_hidden_proto (__default_morecore)
00223 
00224 __END_DECLS
00225 
00226 #undef __Need_M_And_C
00227 
00228 #endif  /* include/stdlib.h */