[b83ec692] | 1 | /*
|
---|
[de53138] | 2 | * Copyright (c) 2018 Jaroslav Jindrak
|
---|
[b83ec692] | 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 |
|
---|
[a1aecb1] | 32 | #include "internal/common.hpp"
|
---|
| 33 |
|
---|
[de53138] | 34 | namespace std::hel
|
---|
| 35 | {
|
---|
| 36 | extern "C" {
|
---|
| 37 | #include <stdlib.h>
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 |
|
---|
[b83ec692] | 41 | namespace std
|
---|
| 42 | {
|
---|
[de53138] | 43 | /* using std::hel::div_t; */
|
---|
| 44 | /* using std::hel::ldiv_t; */
|
---|
| 45 | /* using std::hel::lldiv_t; */
|
---|
| 46 | using std::hel::size_t;
|
---|
[b83ec692] | 47 |
|
---|
[de53138] | 48 | using std::hel::abort;
|
---|
| 49 | using std::hel::exit;
|
---|
| 50 | /* using std::hel::quick_exit; */
|
---|
| 51 | /* using std::hel::_Exit; */
|
---|
| 52 | using std::hel::atexit;
|
---|
| 53 | /* using std::hel::at_quick_exit; */
|
---|
| 54 | /* using std::hel::system; */
|
---|
| 55 | /* using std::hel::getenv; */
|
---|
| 56 |
|
---|
| 57 | using std::hel::malloc;
|
---|
| 58 | using std::hel::calloc;
|
---|
| 59 | using std::hel::realloc;
|
---|
| 60 | using std::hel::free;
|
---|
| 61 |
|
---|
| 62 | /* using std::hel::atof; */
|
---|
| 63 | /* using std::hel::atoi; */
|
---|
| 64 | /* using std::hel::atol; */
|
---|
| 65 | /* using std::hel::atoll; */
|
---|
| 66 | /* using std::hel::strtol; */
|
---|
| 67 | /* using std::hel::strtoll; */
|
---|
| 68 | /* using std::hel::strtoul; */
|
---|
| 69 | /* using std::hel::strtoull; */
|
---|
| 70 | /* using std::hel::strtof; */
|
---|
| 71 | /* using std::hel::strtod; */
|
---|
| 72 | /* using std::hel::strtold; */
|
---|
| 73 |
|
---|
| 74 | /* using std::hel::mblen; */
|
---|
| 75 | /* using std::hel::mbtowc; */
|
---|
| 76 | /* using std::hel::wctomb; */
|
---|
| 77 | /* using std::hel::mbstowcs; */
|
---|
| 78 | /* using std::hel::wcstombs; */
|
---|
[b83ec692] | 79 |
|
---|
[de53138] | 80 | using std::hel::random; // Supposed to be rand.
|
---|
| 81 | using std::hel::srandom; // Supposed to be srand.
|
---|
| 82 | using std::hel::qsort;
|
---|
| 83 | /* using std::hel::bsearch; */
|
---|
| 84 | /* using std::hel::abs; */
|
---|
| 85 | /* using std::hel::labs; */
|
---|
| 86 | /* using std::hel::llabs; */
|
---|
| 87 | /* using std::hel::div; */
|
---|
| 88 | /* using std::hel::ldiv; */
|
---|
| 89 | /* using std::hel::lldiv; */
|
---|
[b83ec692] | 90 | }
|
---|
| 91 |
|
---|
[de53138] | 92 | /* using std::hel::div_t; */
|
---|
| 93 | /* using std::hel::ldiv_t; */
|
---|
| 94 | /* using std::hel::lldiv_t; */
|
---|
| 95 | using std::hel::size_t;
|
---|
| 96 |
|
---|
| 97 | using std::hel::abort;
|
---|
| 98 | using std::hel::exit;
|
---|
| 99 | /* using std::hel::quick_exit; */
|
---|
| 100 | /* using std::hel::_Exit; */
|
---|
| 101 | using std::hel::atexit;
|
---|
| 102 | /* using std::hel::at_quick_exit; */
|
---|
| 103 | /* using std::hel::system; */
|
---|
| 104 | /* using std::hel::getenv; */
|
---|
| 105 |
|
---|
| 106 | using std::hel::malloc;
|
---|
| 107 | using std::hel::calloc;
|
---|
| 108 | using std::hel::realloc;
|
---|
| 109 | using std::hel::free;
|
---|
| 110 |
|
---|
| 111 | /* using std::hel::atof; */
|
---|
| 112 | /* using std::hel::atoi; */
|
---|
| 113 | /* using std::hel::atol; */
|
---|
| 114 | /* using std::hel::atoll; */
|
---|
| 115 | /* using std::hel::strtol; */
|
---|
| 116 | /* using std::hel::strtoll; */
|
---|
| 117 | /* using std::hel::strtoul; */
|
---|
| 118 | /* using std::hel::strtoull; */
|
---|
| 119 | /* using std::hel::strtof; */
|
---|
| 120 | /* using std::hel::strtod; */
|
---|
| 121 | /* using std::hel::strtold; */
|
---|
| 122 |
|
---|
| 123 | /* using std::hel::mblen; */
|
---|
| 124 | /* using std::hel::mbtowc; */
|
---|
| 125 | /* using std::hel::wctomb; */
|
---|
| 126 | /* using std::hel::mbstowcs; */
|
---|
| 127 | /* using std::hel::wcstombs; */
|
---|
| 128 |
|
---|
| 129 | using std::hel::random; // Supposed to be rand.
|
---|
| 130 | using std::hel::srandom; // Supposed to be srand.
|
---|
| 131 | using std::hel::qsort;
|
---|
| 132 | /* using std::hel::bsearch; */
|
---|
| 133 | /* using std::hel::abs; */
|
---|
| 134 | /* using std::hel::labs; */
|
---|
| 135 | /* using std::hel::llabs; */
|
---|
| 136 | /* using std::hel::div; */
|
---|
| 137 | /* using std::hel::ldiv; */
|
---|
| 138 | /* using std::hel::lldiv; */
|
---|
| 139 |
|
---|
[b83ec692] | 140 | #endif
|
---|