Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers...
[reactos.git] / sdk / include / c++ / cstdlib
diff --git a/sdk/include/c++/cstdlib b/sdk/include/c++/cstdlib
new file mode 100644 (file)
index 0000000..4e88576
--- /dev/null
@@ -0,0 +1,77 @@
+// Standard C library declarations\r
+\r
+#pragma once\r
+\r
+#include <cstddef>\r
+#include <stdlib.h>\r
+\r
+// Get rid of those macros defined in <stdlib.h> in lieu of real functions.\r
+#undef abort\r
+#undef abs\r
+#undef atexit\r
+#undef atof\r
+#undef atoi\r
+#undef atol\r
+#undef bsearch\r
+#undef calloc\r
+#undef div\r
+#undef exit\r
+#undef free\r
+#undef getenv\r
+#undef labs\r
+#undef ldiv\r
+#undef malloc\r
+#undef mblen\r
+#undef mbstowcs\r
+#undef mbtowc\r
+#undef qsort\r
+#undef rand\r
+#undef realloc\r
+#undef srand\r
+#undef strtod\r
+#undef strtol\r
+#undef strtoul\r
+#undef system\r
+#undef wcstombs\r
+#undef wctomb\r
+\r
+namespace std\r
+{\r
+  using ::div_t;\r
+  using ::ldiv_t;\r
+\r
+  using ::abort;\r
+  using ::abs;\r
+  using ::atexit;\r
+  using ::atof;\r
+  using ::atoi;\r
+  using ::atol;\r
+  using ::bsearch;\r
+  using ::calloc;\r
+  using ::div;\r
+  using ::exit;\r
+  using ::free;\r
+  using ::getenv;\r
+  using ::labs;\r
+  using ::ldiv;\r
+  using ::malloc;\r
+  using ::mblen;\r
+  using ::mbstowcs;\r
+  using ::mbtowc;\r
+  using ::qsort;\r
+  using ::rand;\r
+  using ::realloc;\r
+  using ::srand;\r
+  using ::strtod;\r
+  using ::strtol;\r
+  using ::strtoul;\r
+  using ::system;\r
+  using ::wcstombs;\r
+  using ::wctomb;\r
+\r
+  inline long\r
+  abs(long __i) { return labs(__i); }\r
+\r
+  inline ldiv_t\r
+  div(long __i, long __j) { return ldiv(__i, __j); }\r
+}\r