зеркало из https://github.com/microsoft/STL.git
93 строки
2.0 KiB
C++
93 строки
2.0 KiB
C++
// cstdlib standard header (core)
|
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#pragma once
|
|
#ifndef _CSTDLIB_
|
|
#define _CSTDLIB_
|
|
#include <yvals_core.h>
|
|
#if _STL_COMPILER_PREPROCESSOR
|
|
|
|
#include <math.h>
|
|
#include <stdlib.h>
|
|
|
|
#pragma pack(push, _CRT_PACKING)
|
|
#pragma warning(push, _STL_WARNING_LEVEL)
|
|
#pragma warning(disable : _STL_DISABLED_WARNINGS)
|
|
_STL_DISABLE_CLANG_WARNINGS
|
|
#pragma push_macro("new")
|
|
#undef new
|
|
|
|
// <stdlib.h> has abs(long) and abs(long long)
|
|
_NODISCARD _Check_return_ inline double abs(_In_ double _Xx) noexcept /* strengthened */ {
|
|
return _CSTD fabs(_Xx);
|
|
}
|
|
|
|
_NODISCARD _Check_return_ inline float abs(_In_ float _Xx) noexcept /* strengthened */ {
|
|
return _CSTD fabsf(_Xx);
|
|
}
|
|
|
|
_NODISCARD _Check_return_ inline long double abs(_In_ long double _Xx) noexcept /* strengthened */ {
|
|
return _CSTD fabsl(_Xx);
|
|
}
|
|
|
|
_STD_BEGIN
|
|
using _CSTD size_t;
|
|
using _CSTD div_t;
|
|
using _CSTD ldiv_t;
|
|
using _CSTD abort;
|
|
using _CSTD abs;
|
|
using _CSTD atexit;
|
|
using _CSTD atof;
|
|
using _CSTD atoi;
|
|
using _CSTD atol;
|
|
using _CSTD bsearch;
|
|
using _CSTD calloc;
|
|
using _CSTD div;
|
|
using _CSTD exit;
|
|
using _CSTD free;
|
|
using _CSTD labs;
|
|
using _CSTD ldiv;
|
|
using _CSTD malloc;
|
|
using _CSTD mblen;
|
|
using _CSTD mbstowcs;
|
|
using _CSTD mbtowc;
|
|
using _CSTD qsort;
|
|
using _CSTD rand;
|
|
using _CSTD realloc;
|
|
using _CSTD srand;
|
|
using _CSTD strtod;
|
|
using _CSTD strtol;
|
|
using _CSTD strtoul;
|
|
using _CSTD wcstombs;
|
|
using _CSTD wctomb;
|
|
|
|
using _CSTD lldiv_t;
|
|
|
|
#ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
|
|
using _CSTD getenv;
|
|
using _CSTD system;
|
|
#endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
|
|
|
|
using _CSTD atoll;
|
|
using _CSTD llabs;
|
|
using _CSTD lldiv;
|
|
using _CSTD strtof;
|
|
using _CSTD strtold;
|
|
using _CSTD strtoll;
|
|
using _CSTD strtoull;
|
|
|
|
using _CSTD _Exit;
|
|
using _CSTD at_quick_exit;
|
|
using _CSTD quick_exit;
|
|
_STD_END
|
|
|
|
#pragma pop_macro("new")
|
|
_STL_RESTORE_CLANG_WARNINGS
|
|
#pragma warning(pop)
|
|
#pragma pack(pop)
|
|
|
|
#endif // _STL_COMPILER_PREPROCESSOR
|
|
#endif // _CSTDLIB_
|