File indexing completed on 2026-05-03 08:13:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___CONFIGURATION_PLATFORM_H
0011 #define _LIBCPP___CONFIGURATION_PLATFORM_H
0012
0013 #include <__config_site>
0014
0015 #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
0016 # pragma GCC system_header
0017 #endif
0018
0019 #if defined(__ELF__)
0020 # define _LIBCPP_OBJECT_FORMAT_ELF 1
0021 #elif defined(__MACH__)
0022 # define _LIBCPP_OBJECT_FORMAT_MACHO 1
0023 #elif defined(_WIN32)
0024 # define _LIBCPP_OBJECT_FORMAT_COFF 1
0025 #elif defined(__wasm__)
0026 # define _LIBCPP_OBJECT_FORMAT_WASM 1
0027 #elif defined(_AIX)
0028 # define _LIBCPP_OBJECT_FORMAT_XCOFF 1
0029 #else
0030
0031 #endif
0032
0033
0034 #if defined(__linux__) || defined(__AMDGPU__) || defined(__NVPTX__)
0035 # if __has_include(<features.h>)
0036 # include <features.h>
0037 # if defined(__GLIBC_PREREQ)
0038 # define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
0039 # else
0040 # define _LIBCPP_GLIBC_PREREQ(a, b) 0
0041 # endif
0042 # endif
0043 #endif
0044
0045
0046
0047
0048 #if __has_include(<picolibc.h>)
0049 # include <picolibc.h>
0050 #endif
0051
0052 #ifndef __BYTE_ORDER__
0053 # error \
0054 "Your compiler doesn't seem to define __BYTE_ORDER__, which is required by libc++ to know the endianness of your target platform"
0055 #endif
0056
0057 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
0058 # define _LIBCPP_LITTLE_ENDIAN
0059 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
0060 # define _LIBCPP_BIG_ENDIAN
0061 #endif
0062
0063 #endif