33 lines · c
1//===-- Target OS detection -------------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8#ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_OS_H9#define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_OS_H10 11#if (defined(__freebsd__) || defined(__FreeBSD__))12#define LIBC_TARGET_OS_IS_FREEBSD13#endif14 15#if defined(__ANDROID__)16#define LIBC_TARGET_OS_IS_ANDROID17#endif18 19#if defined(__linux__) && !defined(LIBC_TARGET_OS_IS_FREEBSD) && \20 !defined(LIBC_TARGET_OS_IS_ANDROID)21#define LIBC_TARGET_OS_IS_LINUX22#endif23 24#if (defined(_WIN64) || defined(_WIN32))25#define LIBC_TARGET_OS_IS_WINDOWS26#endif27 28#if defined(__Fuchsia__)29#define LIBC_TARGET_OS_IS_FUCHSIA30#endif31 32#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_OS_H33