Go to the documentation of this file.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 #pragma GCC system_header
00042
00043 #include <bits/c++config.h>
00044
00045 #ifndef _GLIBCXX_CSTDLIB
00046 #define _GLIBCXX_CSTDLIB 1
00047
00048 #if !_GLIBCXX_HOSTED
00049
00050
00051
00052
00053
00054 #define EXIT_SUCCESS 0
00055 #define EXIT_FAILURE 1
00056
00057 namespace std
00058 {
00059 extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
00060 extern "C" int atexit(void (*)()) throw ();
00061 extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
00062 }
00063
00064 #else
00065
00066 #include <stdlib.h>
00067
00068
00069 #undef abort
00070 #undef abs
00071 #undef atexit
00072 #undef atof
00073 #undef atoi
00074 #undef atol
00075 #undef bsearch
00076 #undef calloc
00077 #undef div
00078 #undef exit
00079 #undef free
00080 #undef getenv
00081 #undef labs
00082 #undef ldiv
00083 #undef malloc
00084 #undef mblen
00085 #undef mbstowcs
00086 #undef mbtowc
00087 #undef qsort
00088 #undef rand
00089 #undef realloc
00090 #undef srand
00091 #undef strtod
00092 #undef strtol
00093 #undef strtoul
00094 #undef system
00095 #undef wcstombs
00096 #undef wctomb
00097
00098 namespace std _GLIBCXX_VISIBILITY(default)
00099 {
00100 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00101
00102 using ::div_t;
00103 using ::ldiv_t;
00104
00105 using ::abort;
00106 using ::abs;
00107 using ::atexit;
00108 using ::atof;
00109 using ::atoi;
00110 using ::atol;
00111 using ::bsearch;
00112 using ::calloc;
00113 using ::div;
00114 using ::exit;
00115 using ::free;
00116 using ::getenv;
00117 using ::labs;
00118 using ::ldiv;
00119 using ::malloc;
00120 #ifdef _GLIBCXX_HAVE_MBSTATE_T
00121 using ::mblen;
00122 using ::mbstowcs;
00123 using ::mbtowc;
00124 #endif // _GLIBCXX_HAVE_MBSTATE_T
00125 using ::qsort;
00126 using ::rand;
00127 using ::realloc;
00128 using ::srand;
00129 using ::strtod;
00130 using ::strtol;
00131 using ::strtoul;
00132 using ::system;
00133 #ifdef _GLIBCXX_USE_WCHAR_T
00134 using ::wcstombs;
00135 using ::wctomb;
00136 #endif // _GLIBCXX_USE_WCHAR_T
00137
00138 inline long
00139 abs(long __i) { return labs(__i); }
00140
00141 inline ldiv_t
00142 div(long __i, long __j) { return ldiv(__i, __j); }
00143
00144 _GLIBCXX_END_NAMESPACE_VERSION
00145 }
00146
00147 #if _GLIBCXX_USE_C99
00148
00149 #undef _Exit
00150 #undef llabs
00151 #undef lldiv
00152 #undef atoll
00153 #undef strtoll
00154 #undef strtoull
00155 #undef strtof
00156 #undef strtold
00157
00158 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
00159 {
00160 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00161
00162 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00163 using ::lldiv_t;
00164 #endif
00165 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
00166 extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
00167 #endif
00168 #if !_GLIBCXX_USE_C99_DYNAMIC
00169 using ::_Exit;
00170 #endif
00171
00172 inline long long
00173 abs(long long __x) { return __x >= 0 ? __x : -__x; }
00174
00175 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00176 using ::llabs;
00177
00178 inline lldiv_t
00179 div(long long __n, long long __d)
00180 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
00181
00182 using ::lldiv;
00183 #endif
00184
00185 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00186 extern "C" long long int (atoll)(const char *) throw ();
00187 extern "C" long long int
00188 (strtoll)(const char * __restrict, char ** __restrict, int) throw ();
00189 extern "C" unsigned long long int
00190 (strtoull)(const char * __restrict, char ** __restrict, int) throw ();
00191 #endif
00192 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00193 using ::atoll;
00194 using ::strtoll;
00195 using ::strtoull;
00196 #endif
00197 using ::strtof;
00198 using ::strtold;
00199
00200 _GLIBCXX_END_NAMESPACE_VERSION
00201 }
00202
00203 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
00222 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00223
00224 namespace std
00225 {
00226 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00227
00228 using std::lldiv_t;
00229
00230
00231 using std::llabs;
00232 using std::lldiv;
00233 #endif
00234
00235 using std::atoll;
00236 using std::strtoll;
00237 using std::strtoull;
00238
00239 using std::strtof;
00240 using std::strtold;
00241
00242
00243 using std::abs;
00244 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00245 using std::div;
00246 #endif
00247 }
00248
00249 #endif // __GXX_EXPERIMENTAL_CXX0X__
00250
00251 #endif // _GLIBCXX_USE_C99
00252
00253 #endif // !_GLIBCXX_HOSTED
00254
00255 #endif