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 #ifndef _CPP_CSTDLIB
00045 #define _CPP_CSTDLIB 1
00046
00047 #pragma GCC system_header
00048
00049 #include <bits/c++config.h>
00050 #include <cstddef>
00051
00052 #include <stdlib.h>
00053
00054
00055 #undef abort
00056 #undef abs
00057 #undef atexit
00058 #undef atof
00059 #undef atoi
00060 #undef atol
00061 #undef bsearch
00062 #undef calloc
00063 #undef div
00064 #undef exit
00065 #undef free
00066 #undef getenv
00067 #undef labs
00068 #undef ldiv
00069 #undef malloc
00070 #undef mblen
00071 #undef mbstowcs
00072 #undef mbtowc
00073 #undef qsort
00074 #undef rand
00075 #undef realloc
00076 #undef srand
00077 #undef strtod
00078 #undef strtol
00079 #undef strtoul
00080 #undef system
00081 #undef wcstombs
00082 #undef wctomb
00083
00084 namespace std
00085 {
00086 using ::div_t;
00087 using ::ldiv_t;
00088
00089 using ::abort;
00090 using ::abs;
00091 using ::atexit;
00092 using ::atof;
00093 using ::atoi;
00094 using ::atol;
00095 using ::bsearch;
00096 using ::calloc;
00097 using ::div;
00098 using ::exit;
00099 using ::free;
00100 using ::getenv;
00101 using ::labs;
00102 using ::ldiv;
00103 using ::malloc;
00104 using ::mblen;
00105 using ::mbstowcs;
00106 using ::mbtowc;
00107 using ::qsort;
00108 using ::rand;
00109 using ::realloc;
00110 using ::srand;
00111 using ::strtod;
00112 using ::strtol;
00113 using ::strtoul;
00114 using ::system;
00115 using ::wcstombs;
00116 using ::wctomb;
00117
00118 inline long
00119 abs(long __i) { return labs(__i); }
00120
00121 inline ldiv_t
00122 div(long __i, long __j) { return ldiv(__i, __j); }
00123 }
00124
00125 #if _GLIBCPP_USE_C99
00126
00127 #undef _Exit
00128 #undef llabs
00129 #undef lldiv
00130 #undef atoll
00131 #undef strtoll
00132 #undef strtoull
00133 #undef strtof
00134 #undef strtold
00135
00136 namespace __gnu_cxx
00137 {
00138 #if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
00139 using ::lldiv_t;
00140 #endif
00141 #if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC
00142 extern "C" void (_Exit)(int);
00143 #endif
00144 #if !_GLIBCPP_USE_C99_DYNAMIC
00145 using ::_Exit;
00146 #endif
00147
00148 inline long long
00149 abs(long long __x) { return __x >= 0 ? __x : -__x; }
00150
00151 inline long long
00152 llabs(long long __x) { return __x >= 0 ? __x : -__x; }
00153
00154 #if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
00155 inline lldiv_t
00156 div(long long __n, long long __d)
00157 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
00158
00159 inline lldiv_t
00160 lldiv(long long __n, long long __d)
00161 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
00162 #endif
00163
00164 #if _GLIBCPP_USE_C99_LONG_LONG_CHECK || _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
00165 extern "C" long long int (atoll)(const char *);
00166 extern "C" long long int
00167 (strtoll)(const char * restrict, char ** restrict, int);
00168 extern "C" unsigned long long int
00169 (strtoull)(const char * restrict, char ** restrict, int);
00170 #endif
00171 #if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
00172 using ::atoll;
00173 using ::strtoll;
00174 using ::strtoull;
00175 #endif
00176 using ::strtof;
00177 using ::strtold;
00178 }
00179
00180 namespace std
00181 {
00182 #if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
00183 using __gnu_cxx::lldiv_t;
00184 #endif
00185 using __gnu_cxx::_Exit;
00186 using __gnu_cxx::abs;
00187 using __gnu_cxx::llabs;
00188 #if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
00189 using __gnu_cxx::div;
00190 using __gnu_cxx::lldiv;
00191 #endif
00192 using __gnu_cxx::atoll;
00193 using __gnu_cxx::strtof;
00194 using __gnu_cxx::strtoll;
00195 using __gnu_cxx::strtoull;
00196 using __gnu_cxx::strtold;
00197 }
00198 #endif
00199
00200 #endif