1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10module; 11#include <cstdlib> 12 13export module std:cstdlib; 14export namespace std { 15 using std::div_t; 16 using std::ldiv_t; 17 using std::lldiv_t; 18 using std::size_t; 19 20 // [support.start.term], start and termination 21 using std::_Exit; 22 using std::abort; 23 using std::at_quick_exit; 24 using std::atexit; 25 using std::exit; 26 using std::quick_exit; 27 28 using std::getenv; 29 using std::system; 30 31 // [c.malloc], C library memory allocation 32 using std::aligned_alloc; 33 using std::calloc; 34 using std::free; 35 using std::malloc; 36 using std::realloc; 37 38 using std::atof; 39 using std::atoi; 40 using std::atol; 41 using std::atoll; 42 using std::strtod; 43 using std::strtof; 44 using std::strtol; 45 using std::strtold; 46 using std::strtoll; 47 using std::strtoul; 48 using std::strtoull; 49 50 // [c.mb.wcs], multibyte / wide string and character conversion functions 51#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS 52 using std::mblen; 53 using std::mbstowcs; 54 using std::mbtowc; 55 using std::wcstombs; 56 using std::wctomb; 57#endif 58 // [alg.c.library], C standard library algorithms 59 using std::bsearch; 60 using std::qsort; 61 62 // [c.math.rand], low-quality random number generation 63 using std::rand; 64 using std::srand; 65 66 // [c.math.abs], absolute values 67 using std::abs; 68 69 using std::labs; 70 using std::llabs; 71 72 using std::div; 73 using std::ldiv; 74 using std::lldiv; 75} // namespace std 76