Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:26

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___CONFIGURATION_PLATFORM_H
0011 #define _LIBCPP___CXX03___CONFIGURATION_PLATFORM_H
0012 
0013 #include <__cxx03/__configuration/config_site_shim.h>
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 // ... add new file formats here ...
0031 #endif
0032 
0033 // Need to detect which libc we're using if we're on Linux.
0034 #if defined(__linux__)
0035 #  include <features.h>
0036 #  if defined(__GLIBC_PREREQ)
0037 #    define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
0038 #  else
0039 #    define _LIBCPP_GLIBC_PREREQ(a, b) 0
0040 #  endif // defined(__GLIBC_PREREQ)
0041 #endif   // defined(__linux__)
0042 
0043 #ifndef __BYTE_ORDER__
0044 #  error                                                                                                               \
0045       "Your compiler doesn't seem to define __BYTE_ORDER__, which is required by libc++ to know the endianness of your target platform"
0046 #endif
0047 
0048 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
0049 #  define _LIBCPP_LITTLE_ENDIAN
0050 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
0051 #  define _LIBCPP_BIG_ENDIAN
0052 #endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
0053 
0054 #endif // _LIBCPP___CXX03___CONFIGURATION_PLATFORM_H