xref: /reactos/sdk/include/c++/cstdlib (revision 8a978a17)
1// Standard C library declarations
2
3#pragma once
4
5#include <cstddef>
6#include <stdlib.h>
7
8// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
9#undef abort
10#undef abs
11#undef atexit
12#undef atof
13#undef atoi
14#undef atol
15#undef bsearch
16#undef calloc
17#undef div
18#undef exit
19#undef free
20#undef getenv
21#undef labs
22#undef ldiv
23#undef malloc
24#undef mblen
25#undef mbstowcs
26#undef mbtowc
27#undef qsort
28#undef rand
29#undef realloc
30#undef srand
31#undef strtod
32#undef strtol
33#undef strtoul
34#undef system
35#undef wcstombs
36#undef wctomb
37
38namespace std
39{
40  using ::div_t;
41  using ::ldiv_t;
42
43  using ::abort;
44  using ::abs;
45  using ::atexit;
46  using ::atof;
47  using ::atoi;
48  using ::atol;
49  using ::bsearch;
50  using ::calloc;
51  using ::div;
52  using ::exit;
53  using ::free;
54  using ::getenv;
55  using ::labs;
56  using ::ldiv;
57  using ::malloc;
58  using ::mblen;
59  using ::mbstowcs;
60  using ::mbtowc;
61  using ::qsort;
62  using ::rand;
63  using ::realloc;
64  using ::srand;
65  using ::strtod;
66  using ::strtol;
67  using ::strtoul;
68  using ::system;
69  using ::wcstombs;
70  using ::wctomb;
71
72  inline long
73  abs(long __i) { return labs(__i); }
74
75  inline ldiv_t
76  div(long __i, long __j) { return ldiv(__i, __j); }
77}
78