00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #ifndef _GLIBCXX_CSTDLIB
00046 #define _GLIBCXX_CSTDLIB 1
00047
00048 #pragma GCC system_header
00049
00050 #include <bits/c++config.h>
00051 #include <cstddef>
00052
00053 #if !_GLIBCXX_HOSTED
00054
00055
00056
00057
00058
00059 #define EXIT_SUCCESS 0
00060 #define EXIT_FAILURE 1
00061
00062 _GLIBCXX_BEGIN_NAMESPACE(std)
00063
00064 extern "C" void abort(void);
00065 extern "C" int atexit(void (*)());
00066 extern "C" void exit(int);
00067
00068 _GLIBCXX_END_NAMESPACE
00069
00070 #else
00071
00072 #include <stdlib.h>
00073
00074
00075 #undef abort
00076 #undef abs
00077 #undef atexit
00078 #undef atof
00079 #undef atoi
00080 #undef atol
00081 #undef bsearch
00082 #undef calloc
00083 #undef div
00084 #undef exit
00085 #undef free
00086 #undef getenv
00087 #undef labs
00088 #undef ldiv
00089 #undef malloc
00090 #undef mblen
00091 #undef mbstowcs
00092 #undef mbtowc
00093 #undef qsort
00094 #undef rand
00095 #undef realloc
00096 #undef srand
00097 #undef strtod
00098 #undef strtol
00099 #undef strtoul
00100 #undef system
00101 #undef wcstombs
00102 #undef wctomb
00103
00104 _GLIBCXX_BEGIN_NAMESPACE(std)
00105
00106 using ::div_t;
00107 using ::ldiv_t;
00108
00109 using ::abort;
00110 using ::abs;
00111 using ::atexit;
00112 using ::atof;
00113 using ::atoi;
00114 using ::atol;
00115 using ::bsearch;
00116 using ::calloc;
00117 using ::div;
00118 using ::exit;
00119 using ::free;
00120 using ::getenv;
00121 using ::labs;
00122 using ::ldiv;
00123 using ::malloc;
00124 #ifdef _GLIBCXX_HAVE_MBSTATE_T
00125 using ::mblen;
00126 using ::mbstowcs;
00127 using ::mbtowc;
00128 #endif // _GLIBCXX_HAVE_MBSTATE_T
00129 using ::qsort;
00130 using ::rand;
00131 using ::realloc;
00132 using ::srand;
00133 using ::strtod;
00134 using ::strtol;
00135 using ::strtoul;
00136 using ::system;
00137 #ifdef _GLIBCXX_USE_WCHAR_T
00138 using ::wcstombs;
00139 using ::wctomb;
00140 #endif // _GLIBCXX_USE_WCHAR_T
00141
00142 inline long
00143 abs(long __i) { return labs(__i); }
00144
00145 inline ldiv_t
00146 div(long __i, long __j) { return ldiv(__i, __j); }
00147
00148 _GLIBCXX_END_NAMESPACE
00149
00150 #if _GLIBCXX_USE_C99
00151
00152 #undef _Exit
00153 #undef llabs
00154 #undef lldiv
00155 #undef atoll
00156 #undef strtoll
00157 #undef strtoull
00158 #undef strtof
00159 #undef strtold
00160
00161 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
00162
00163 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00164 using ::lldiv_t;
00165 #endif
00166 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
00167 extern "C" void (_Exit)(int);
00168 #endif
00169 #if !_GLIBCXX_USE_C99_DYNAMIC
00170 using ::_Exit;
00171 #endif
00172
00173 inline long long
00174 abs(long long __x) { return __x >= 0 ? __x : -__x; }
00175
00176 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00177 using ::llabs;
00178
00179 inline lldiv_t
00180 div(long long __n, long long __d)
00181 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
00182
00183 using ::lldiv;
00184 #endif
00185
00186 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00187 extern "C" long long int (atoll)(const char *);
00188 extern "C" long long int
00189 (strtoll)(const char * restrict, char ** restrict, int);
00190 extern "C" unsigned long long int
00191 (strtoull)(const char * restrict, char ** restrict, int);
00192 #endif
00193 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00194 using ::atoll;
00195 using ::strtoll;
00196 using ::strtoull;
00197 #endif
00198 using ::strtof;
00199 using ::strtold;
00200
00201 _GLIBCXX_END_NAMESPACE
00202
00203 _GLIBCXX_BEGIN_NAMESPACE(std)
00204
00205 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00206 using ::__gnu_cxx::lldiv_t;
00207 #endif
00208 using ::__gnu_cxx::_Exit;
00209 using ::__gnu_cxx::abs;
00210 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00211 using ::__gnu_cxx::llabs;
00212 using ::__gnu_cxx::div;
00213 using ::__gnu_cxx::lldiv;
00214 #endif
00215 using ::__gnu_cxx::atoll;
00216 using ::__gnu_cxx::strtof;
00217 using ::__gnu_cxx::strtoll;
00218 using ::__gnu_cxx::strtoull;
00219 using ::__gnu_cxx::strtold;
00220
00221 _GLIBCXX_END_NAMESPACE
00222
00223 #endif // _GLIBCXX_USE_C99
00224
00225 #endif // !_GLIBCXX_HOSTED
00226
00227 #endif