Warning, /include/c++/v1/__cxx03/cstdlib is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009
0010 #ifndef _LIBCPP___CXX03_CSTDLIB
0011 #define _LIBCPP___CXX03_CSTDLIB
0012
0013 /*
0014 cstdlib synopsis
0015
0016 Macros:
0017
0018 EXIT_FAILURE
0019 EXIT_SUCCESS
0020 MB_CUR_MAX
0021 NULL
0022 RAND_MAX
0023
0024 namespace std
0025 {
0026
0027 Types:
0028
0029 size_t
0030 div_t
0031 ldiv_t
0032 lldiv_t // C99
0033
0034 double atof (const char* nptr);
0035 int atoi (const char* nptr);
0036 long atol (const char* nptr);
0037 long long atoll(const char* nptr); // C99
0038 double strtod (const char* restrict nptr, char** restrict endptr);
0039 float strtof (const char* restrict nptr, char** restrict endptr); // C99
0040 long double strtold (const char* restrict nptr, char** restrict endptr); // C99
0041 long strtol (const char* restrict nptr, char** restrict endptr, int base);
0042 long long strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
0043 unsigned long strtoul (const char* restrict nptr, char** restrict endptr, int base);
0044 unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
0045 int rand(void);
0046 void srand(unsigned int seed);
0047 void* calloc(size_t nmemb, size_t size);
0048 void free(void* ptr);
0049 void* malloc(size_t size);
0050 void* realloc(void* ptr, size_t size);
0051 void abort(void);
0052 int atexit(void (*func)(void));
0053 void exit(int status);
0054 void _Exit(int status);
0055 char* getenv(const char* name);
0056 int system(const char* string);
0057 void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
0058 int (*compar)(const void *, const void *));
0059 void qsort(void* base, size_t nmemb, size_t size,
0060 int (*compar)(const void *, const void *));
0061 int abs( int j);
0062 long abs( long j);
0063 long long abs(long long j); // C++0X
0064 long labs( long j);
0065 long long llabs(long long j); // C99
0066 div_t div( int numer, int denom);
0067 ldiv_t div( long numer, long denom);
0068 lldiv_t div(long long numer, long long denom); // C++0X
0069 ldiv_t ldiv( long numer, long denom);
0070 lldiv_t lldiv(long long numer, long long denom); // C99
0071 int mblen(const char* s, size_t n);
0072 int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
0073 int wctomb(char* s, wchar_t wchar);
0074 size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
0075 size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
0076 int at_quick_exit(void (*func)(void)) // C++11
0077 void quick_exit(int status); // C++11
0078 void *aligned_alloc(size_t alignment, size_t size); // C11
0079
0080 } // std
0081
0082 */
0083
0084 #include <__cxx03/__config>
0085
0086 #include <__cxx03/stdlib.h>
0087
0088 #ifndef _LIBCPP___CXX03_STDLIB_H
0089 # error <cstdlib> tried including <stdlib.h> but didn't find libc++'s <stdlib.h> header. \
0090 This usually means that your header search paths are not configured properly. \
0091 The header search paths should contain the C++ Standard Library headers before \
0092 any C Standard Library, and you are probably using compiler flags that make that \
0093 not be the case.
0094 #endif
0095
0096 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0097 # pragma GCC system_header
0098 #endif
0099
0100 _LIBCPP_BEGIN_NAMESPACE_STD
0101
0102 using ::size_t _LIBCPP_USING_IF_EXISTS;
0103 using ::div_t _LIBCPP_USING_IF_EXISTS;
0104 using ::ldiv_t _LIBCPP_USING_IF_EXISTS;
0105 using ::lldiv_t _LIBCPP_USING_IF_EXISTS;
0106 using ::atof _LIBCPP_USING_IF_EXISTS;
0107 using ::atoi _LIBCPP_USING_IF_EXISTS;
0108 using ::atol _LIBCPP_USING_IF_EXISTS;
0109 using ::atoll _LIBCPP_USING_IF_EXISTS;
0110 using ::strtod _LIBCPP_USING_IF_EXISTS;
0111 using ::strtof _LIBCPP_USING_IF_EXISTS;
0112 using ::strtold _LIBCPP_USING_IF_EXISTS;
0113 using ::strtol _LIBCPP_USING_IF_EXISTS;
0114 using ::strtoll _LIBCPP_USING_IF_EXISTS;
0115 using ::strtoul _LIBCPP_USING_IF_EXISTS;
0116 using ::strtoull _LIBCPP_USING_IF_EXISTS;
0117 using ::rand _LIBCPP_USING_IF_EXISTS;
0118 using ::srand _LIBCPP_USING_IF_EXISTS;
0119 using ::calloc _LIBCPP_USING_IF_EXISTS;
0120 using ::free _LIBCPP_USING_IF_EXISTS;
0121 using ::malloc _LIBCPP_USING_IF_EXISTS;
0122 using ::realloc _LIBCPP_USING_IF_EXISTS;
0123 using ::abort _LIBCPP_USING_IF_EXISTS;
0124 using ::atexit _LIBCPP_USING_IF_EXISTS;
0125 using ::exit _LIBCPP_USING_IF_EXISTS;
0126 using ::_Exit _LIBCPP_USING_IF_EXISTS;
0127 using ::getenv _LIBCPP_USING_IF_EXISTS;
0128 using ::system _LIBCPP_USING_IF_EXISTS;
0129 using ::bsearch _LIBCPP_USING_IF_EXISTS;
0130 using ::qsort _LIBCPP_USING_IF_EXISTS;
0131 using ::abs _LIBCPP_USING_IF_EXISTS;
0132 using ::labs _LIBCPP_USING_IF_EXISTS;
0133 using ::llabs _LIBCPP_USING_IF_EXISTS;
0134 using ::div _LIBCPP_USING_IF_EXISTS;
0135 using ::ldiv _LIBCPP_USING_IF_EXISTS;
0136 using ::lldiv _LIBCPP_USING_IF_EXISTS;
0137 using ::mblen _LIBCPP_USING_IF_EXISTS;
0138 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
0139 using ::mbtowc _LIBCPP_USING_IF_EXISTS;
0140 using ::wctomb _LIBCPP_USING_IF_EXISTS;
0141 using ::mbstowcs _LIBCPP_USING_IF_EXISTS;
0142 using ::wcstombs _LIBCPP_USING_IF_EXISTS;
0143 #endif
0144 #if !defined(_LIBCPP_CXX03_LANG)
0145 using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
0146 using ::quick_exit _LIBCPP_USING_IF_EXISTS;
0147 #endif
0148 #if _LIBCPP_STD_VER >= 17
0149 using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
0150 #endif
0151
0152 _LIBCPP_END_NAMESPACE_STD
0153
0154 #endif // _LIBCPP___CXX03_CSTDLIB