source: mainline/uspace/lib/cpp/include/cstdlib@ eec201d

Last change on this file since eec201d was 10d65d70, checked in by Jiří Zárevúcky <jiri.zarevucky@…>, 7 years ago

Use compiler-provided freestanding headers

Standard-compliant C compiler must provide these, so there is no point
in us trying to guess or repeat the correct contents.
This includes <float.h>, <iso646.h>, <limits.h>, <stdalign.h>, <stdarg.h>,
<stdbool.h>, <stddef.h>, <stdint.h>, and <stdnoreturn.h>.

<stdint.h> and <limits.h> need more work.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1/*
2 * Copyright (c) 2018 Jaroslav Jindrak
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef LIBCPP_CSTDLIB
30#define LIBCPP_CSTDLIB
31
32#include <__bits/common.hpp>
33
34namespace std::hel
35{
36 extern "C" {
37 #include <stdlib.h>
38 #include <_bits/ssize_t.h>
39 }
40}
41
42namespace std
43{
44 /* using std::hel::div_t; */
45 /* using std::hel::ldiv_t; */
46 /* using std::hel::lldiv_t; */
47 using std::hel::size_t;
48
49 using std::hel::abort;
50 using std::hel::exit;
51 /* using std::hel::quick_exit; */
52 /* using std::hel::_Exit; */
53 using std::hel::atexit;
54 /* using std::hel::at_quick_exit; */
55 /* using std::hel::system; */
56 /* using std::hel::getenv; */
57
58 using std::hel::malloc;
59 using std::hel::calloc;
60 using std::hel::realloc;
61 using std::hel::free;
62
63 /* using std::hel::atof; */
64 /* using std::hel::atoi; */
65 /* using std::hel::atol; */
66 /* using std::hel::atoll; */
67 /* using std::hel::strtol; */
68 /* using std::hel::strtoll; */
69 /* using std::hel::strtoul; */
70 /* using std::hel::strtoull; */
71 /* using std::hel::strtof; */
72 /* using std::hel::strtod; */
73 /* using std::hel::strtold; */
74
75 /* using std::hel::mblen; */
76 /* using std::hel::mbtowc; */
77 /* using std::hel::wctomb; */
78 /* using std::hel::mbstowcs; */
79 /* using std::hel::wcstombs; */
80
81 using std::hel::rand;
82 using std::hel::srand;
83 using std::hel::qsort;
84 /* using std::hel::bsearch; */
85 /* using std::hel::abs; */
86 /* using std::hel::labs; */
87 /* using std::hel::llabs; */
88 /* using std::hel::div; */
89 /* using std::hel::ldiv; */
90 /* using std::hel::lldiv; */
91}
92
93/* using std::hel::div_t; */
94/* using std::hel::ldiv_t; */
95/* using std::hel::lldiv_t; */
96using std::hel::size_t;
97
98using std::hel::abort;
99using std::hel::exit;
100/* using std::hel::quick_exit; */
101/* using std::hel::_Exit; */
102using std::hel::atexit;
103/* using std::hel::at_quick_exit; */
104/* using std::hel::system; */
105/* using std::hel::getenv; */
106
107using std::hel::malloc;
108using std::hel::calloc;
109using std::hel::realloc;
110using std::hel::free;
111
112/* using std::hel::atof; */
113/* using std::hel::atoi; */
114/* using std::hel::atol; */
115/* using std::hel::atoll; */
116/* using std::hel::strtol; */
117/* using std::hel::strtoll; */
118/* using std::hel::strtoul; */
119/* using std::hel::strtoull; */
120/* using std::hel::strtof; */
121/* using std::hel::strtod; */
122/* using std::hel::strtold; */
123
124/* using std::hel::mblen; */
125/* using std::hel::mbtowc; */
126/* using std::hel::wctomb; */
127/* using std::hel::mbstowcs; */
128/* using std::hel::wcstombs; */
129
130using std::hel::rand;
131using std::hel::srand;
132using std::hel::qsort;
133/* using std::hel::bsearch; */
134/* using std::hel::abs; */
135/* using std::hel::labs; */
136/* using std::hel::llabs; */
137/* using std::hel::div; */
138/* using std::hel::ldiv; */
139/* using std::hel::lldiv; */
140
141#endif
Note: See TracBrowser for help on using the repository browser.