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 _GLIBCXX_BEGIN_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 _GLIBCXX_END_NAMESPACE
00064
00065 #else
00066
00067 #include <stdlib.h>
00068
00069
00070 #undef abort
00071 #undef abs
00072 #undef atexit
00073 #undef atof
00074 #undef atoi
00075 #undef atol
00076 #undef bsearch
00077 #undef calloc
00078 #undef div
00079 #undef exit
00080 #undef free
00081 #undef getenv
00082 #undef labs
00083 #undef ldiv
00084 #undef malloc
00085 #undef mblen
00086 #undef mbstowcs
00087 #undef mbtowc
00088 #undef qsort
00089 #undef rand
00090 #undef realloc
00091 #undef srand
00092 #undef strtod
00093 #undef strtol
00094 #undef strtoul
00095 #undef system
00096 #undef wcstombs
00097 #undef wctomb
00098
00099 _GLIBCXX_BEGIN_NAMESPACE(std)
00100
00101 using ::div_t;
00102 using ::ldiv_t;
00103
00104 using ::abort;
00105 using ::abs;
00106 using ::atexit;
00107 using ::atof;
00108 using ::atoi;
00109 using ::atol;
00110 using ::bsearch;
00111 using ::calloc;
00112 using ::div;
00113 using ::exit;
00114 using ::free;
00115 using ::getenv;
00116 using ::labs;
00117 using ::ldiv;
00118 using ::malloc;
00119 #ifdef _GLIBCXX_HAVE_MBSTATE_T
00120 using ::mblen;
00121 using ::mbstowcs;
00122 using ::mbtowc;
00123 #endif // _GLIBCXX_HAVE_MBSTATE_T
00124 using ::qsort;
00125 using ::rand;
00126 using ::realloc;
00127 using ::srand;
00128 using ::strtod;
00129 using ::strtol;
00130 using ::strtoul;
00131 using ::system;
00132 #ifdef _GLIBCXX_USE_WCHAR_T
00133 using ::wcstombs;
00134 using ::wctomb;
00135 #endif // _GLIBCXX_USE_WCHAR_T
00136
00137 inline long
00138 abs(long __i) { return labs(__i); }
00139
00140 inline ldiv_t
00141 div(long __i, long __j) { return ldiv(__i, __j); }
00142
00143 _GLIBCXX_END_NAMESPACE
00144
00145 #if _GLIBCXX_USE_C99
00146
00147 #undef _Exit
00148 #undef llabs
00149 #undef lldiv
00150 #undef atoll
00151 #undef strtoll
00152 #undef strtoull
00153 #undef strtof
00154 #undef strtold
00155
00156 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
00157
00158 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00159 using ::lldiv_t;
00160 #endif
00161 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
00162 extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN;
00163 #endif
00164 #if !_GLIBCXX_USE_C99_DYNAMIC
00165 using ::_Exit;
00166 #endif
00167
00168 inline long long
00169 abs(long long __x) { return __x >= 0 ? __x : -__x; }
00170
00171 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00172 using ::llabs;
00173
00174 inline lldiv_t
00175 div(long long __n, long long __d)
00176 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
00177
00178 using ::lldiv;
00179 #endif
00180
00181 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00182 extern "C" long long int (atoll)(const char *) throw ();
00183 extern "C" long long int
00184 (strtoll)(const char * restrict, char ** restrict, int) throw ();
00185 extern "C" unsigned long long int
00186 (strtoull)(const char * restrict, char ** restrict, int) throw ();
00187 #endif
00188 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00189 using ::atoll;
00190 using ::strtoll;
00191 using ::strtoull;
00192 #endif
00193 using ::strtof;
00194 using ::strtold;
00195
00196 _GLIBCXX_END_NAMESPACE
00197
00198 _GLIBCXX_BEGIN_NAMESPACE(std)
00199
00200 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00201 using ::__gnu_cxx::lldiv_t;
00202 #endif
00203 using ::__gnu_cxx::_Exit;
00204 using ::__gnu_cxx::abs;
00205 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
00206 using ::__gnu_cxx::llabs;
00207 using ::__gnu_cxx::div;
00208 using ::__gnu_cxx::lldiv;
00209 #endif
00210 using ::__gnu_cxx::atoll;
00211 using ::__gnu_cxx::strtof;
00212 using ::__gnu_cxx::strtoll;
00213 using ::__gnu_cxx::strtoull;
00214 using ::__gnu_cxx::strtold;
00215
00216 _GLIBCXX_END_NAMESPACE
00217
00218 #endif // _GLIBCXX_USE_C99
00219
00220 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00221 # if defined(_GLIBCXX_INCLUDE_AS_TR1)
00222 # error C++0x header cannot be included from TR1 header
00223 # endif
00224 # if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
00225 # include <tr1_impl/cstdlib>
00226 # else
00227 # define _GLIBCXX_INCLUDE_AS_CXX0X
00228 # define _GLIBCXX_BEGIN_NAMESPACE_TR1
00229 # define _GLIBCXX_END_NAMESPACE_TR1
00230 # define _GLIBCXX_TR1
00231 # include <tr1_impl/cstdlib>
00232 # undef _GLIBCXX_TR1
00233 # undef _GLIBCXX_END_NAMESPACE_TR1
00234 # undef _GLIBCXX_BEGIN_NAMESPACE_TR1
00235 # undef _GLIBCXX_INCLUDE_AS_CXX0X
00236 # endif
00237 #endif
00238
00239 #endif // !_GLIBCXX_HOSTED
00240
00241 #endif