Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
stdlib.h
Go to the documentation of this file.
1
29#include <rw/_defs.h>
30
31#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
32
33# ifndef _RWSTD_STDLIB_H_INCLUDED
34# define _RWSTD_STDLIB_H_INCLUDED
35
36# include <cstdlib>
37
38# ifndef _RWSTD_NO_NAMESPACE
39
40using std::div_t;
41using std::ldiv_t;
42using std::size_t;
43
44#if !defined (__GNUG__) || __GNUG__ > 2
45
46// prevent collisions with gcc's intrinsic functions
47using std::abort;
48using std::abs;
49using std::exit;
50using std::labs;
51
52#endif // gcc > 2
53
54using std::atexit;
55using std::atof;
56using std::atoi;
57using std::atol;
58using std::bsearch;
59using std::calloc;
60using std::div;
61using std::free;
62using std::getenv;
63using std::ldiv;
64using std::malloc;
65using std::mblen;
66using std::mbstowcs;
67
68
69#ifndef _RWSTD_NO_MBTOWC
70using std::mbtowc;
71#elif !defined (_RWSTD_NO_MBTOWC_IN_LIBC)
72
73# ifndef _RWSTD_NO_WCHAR_T
74
75extern "C" int mbtowc (wchar_t*, const char*, size_t);
76
77# undef _RWSTD_NO_MBTOWC
78
79# endif // _RWSTD_NO_WCHAR_T
80#endif // _RWSTD_NO_MBTOWC
81
82
83using std::qsort;
84using std::rand;
85using std::realloc;
86using std::srand;
87using std::strtod;
88using std::strtol;
89using std::strtoul;
90using std::system;
91using std::wcstombs;
92using std::wctomb;
93
94# endif // _RWSTD_NO_NAMESPACE
95
96# endif // _RWSTD_STDLIB_H_INCLUDED
97
98#else
99# include _RWSTD_ANSI_C_STDLIB_H
100
101# if defined (__HP_aCC) \
102 && defined (_MATH_INCLUDED) && !defined (__MATH_INCLUDED)
103
104// hacking around an HP aCC quirk when using system headers
105// in /usr/include without the compiler's wrappers (i.e.,
106// when -I/usr/include is on the command line)
107
108extern "C" {
109
110inline int abs (int __x)
111{
112 return __x < 0 ? -__x : __x;
113}
114
115} // extern "C"
116
117# endif // HP aCC && /usr/include/math.h included
118
119# undef ldiv
120
121#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
T abs(T t)