зеркало из https://github.com/microsoft/STL.git
92 строки
2.5 KiB
C++
92 строки
2.5 KiB
C++
// cstdlib standard header (core)
|
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#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
|
|
|
|
_EXTERN_CXX_WORKAROUND
|
|
// <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);
|
|
}
|
|
_END_EXTERN_CXX_WORKAROUND
|
|
|
|
_STD_BEGIN
|
|
_EXPORT_STD using _CSTD size_t;
|
|
_EXPORT_STD using _CSTD div_t;
|
|
_EXPORT_STD using _CSTD ldiv_t;
|
|
_EXPORT_STD using _CSTD abort;
|
|
_EXPORT_STD using _CSTD abs;
|
|
_EXPORT_STD using _CSTD atexit;
|
|
_EXPORT_STD using _CSTD atof;
|
|
_EXPORT_STD using _CSTD atoi;
|
|
_EXPORT_STD using _CSTD atol;
|
|
_EXPORT_STD using _CSTD bsearch;
|
|
_EXPORT_STD using _CSTD calloc;
|
|
_EXPORT_STD using _CSTD div;
|
|
_EXPORT_STD using _CSTD exit;
|
|
_EXPORT_STD using _CSTD free;
|
|
_EXPORT_STD using _CSTD labs;
|
|
_EXPORT_STD using _CSTD ldiv;
|
|
_EXPORT_STD using _CSTD malloc;
|
|
_EXPORT_STD using _CSTD mblen;
|
|
_EXPORT_STD using _CSTD mbstowcs;
|
|
_EXPORT_STD using _CSTD mbtowc;
|
|
_EXPORT_STD using _CSTD qsort;
|
|
_EXPORT_STD using _CSTD rand;
|
|
_EXPORT_STD using _CSTD realloc;
|
|
_EXPORT_STD using _CSTD srand;
|
|
_EXPORT_STD using _CSTD strtod;
|
|
_EXPORT_STD using _CSTD strtol;
|
|
_EXPORT_STD using _CSTD strtoul;
|
|
_EXPORT_STD using _CSTD wcstombs;
|
|
_EXPORT_STD using _CSTD wctomb;
|
|
|
|
_EXPORT_STD using _CSTD lldiv_t;
|
|
|
|
_EXPORT_STD using _CSTD getenv;
|
|
_EXPORT_STD using _CSTD system;
|
|
|
|
_EXPORT_STD using _CSTD atoll;
|
|
_EXPORT_STD using _CSTD llabs;
|
|
_EXPORT_STD using _CSTD lldiv;
|
|
_EXPORT_STD using _CSTD strtof;
|
|
_EXPORT_STD using _CSTD strtold;
|
|
_EXPORT_STD using _CSTD strtoll;
|
|
_EXPORT_STD using _CSTD strtoull;
|
|
|
|
_EXPORT_STD using _CSTD _Exit;
|
|
_EXPORT_STD using _CSTD at_quick_exit;
|
|
_EXPORT_STD 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_
|