11cb0ef41Sopenharmony_ci// Copyright 2015, Google Inc. 21cb0ef41Sopenharmony_ci// All rights reserved. 31cb0ef41Sopenharmony_ci// 41cb0ef41Sopenharmony_ci// Redistribution and use in source and binary forms, with or without 51cb0ef41Sopenharmony_ci// modification, are permitted provided that the following conditions are 61cb0ef41Sopenharmony_ci// met: 71cb0ef41Sopenharmony_ci// 81cb0ef41Sopenharmony_ci// * Redistributions of source code must retain the above copyright 91cb0ef41Sopenharmony_ci// notice, this list of conditions and the following disclaimer. 101cb0ef41Sopenharmony_ci// * Redistributions in binary form must reproduce the above 111cb0ef41Sopenharmony_ci// copyright notice, this list of conditions and the following disclaimer 121cb0ef41Sopenharmony_ci// in the documentation and/or other materials provided with the 131cb0ef41Sopenharmony_ci// distribution. 141cb0ef41Sopenharmony_ci// * Neither the name of Google Inc. nor the names of its 151cb0ef41Sopenharmony_ci// contributors may be used to endorse or promote products derived from 161cb0ef41Sopenharmony_ci// this software without specific prior written permission. 171cb0ef41Sopenharmony_ci// 181cb0ef41Sopenharmony_ci// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 191cb0ef41Sopenharmony_ci// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 201cb0ef41Sopenharmony_ci// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 211cb0ef41Sopenharmony_ci// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 221cb0ef41Sopenharmony_ci// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 231cb0ef41Sopenharmony_ci// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 241cb0ef41Sopenharmony_ci// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 251cb0ef41Sopenharmony_ci// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 261cb0ef41Sopenharmony_ci// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 271cb0ef41Sopenharmony_ci// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 281cb0ef41Sopenharmony_ci// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_ci// The Google C++ Testing and Mocking Framework (Google Test) 311cb0ef41Sopenharmony_ci// 321cb0ef41Sopenharmony_ci// This header file defines the GTEST_OS_* macro. 331cb0ef41Sopenharmony_ci// It is separate from gtest-port.h so that custom/gtest-port.h can include it. 341cb0ef41Sopenharmony_ci 351cb0ef41Sopenharmony_ci#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ 361cb0ef41Sopenharmony_ci#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ 371cb0ef41Sopenharmony_ci 381cb0ef41Sopenharmony_ci// Determines the platform on which Google Test is compiled. 391cb0ef41Sopenharmony_ci#ifdef __CYGWIN__ 401cb0ef41Sopenharmony_ci#define GTEST_OS_CYGWIN 1 411cb0ef41Sopenharmony_ci#elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__) 421cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_MINGW 1 431cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS 1 441cb0ef41Sopenharmony_ci#elif defined _WIN32 451cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS 1 461cb0ef41Sopenharmony_ci#ifdef _WIN32_WCE 471cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_MOBILE 1 481cb0ef41Sopenharmony_ci#elif defined(WINAPI_FAMILY) 491cb0ef41Sopenharmony_ci#include <winapifamily.h> 501cb0ef41Sopenharmony_ci#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 511cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_DESKTOP 1 521cb0ef41Sopenharmony_ci#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP) 531cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_PHONE 1 541cb0ef41Sopenharmony_ci#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) 551cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_RT 1 561cb0ef41Sopenharmony_ci#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE) 571cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_PHONE 1 581cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_TV_TITLE 1 591cb0ef41Sopenharmony_ci#else 601cb0ef41Sopenharmony_ci// WINAPI_FAMILY defined but no known partition matched. 611cb0ef41Sopenharmony_ci// Default to desktop. 621cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_DESKTOP 1 631cb0ef41Sopenharmony_ci#endif 641cb0ef41Sopenharmony_ci#else 651cb0ef41Sopenharmony_ci#define GTEST_OS_WINDOWS_DESKTOP 1 661cb0ef41Sopenharmony_ci#endif // _WIN32_WCE 671cb0ef41Sopenharmony_ci#elif defined __OS2__ 681cb0ef41Sopenharmony_ci#define GTEST_OS_OS2 1 691cb0ef41Sopenharmony_ci#elif defined __APPLE__ 701cb0ef41Sopenharmony_ci#define GTEST_OS_MAC 1 711cb0ef41Sopenharmony_ci#include <TargetConditionals.h> 721cb0ef41Sopenharmony_ci#if TARGET_OS_IPHONE 731cb0ef41Sopenharmony_ci#define GTEST_OS_IOS 1 741cb0ef41Sopenharmony_ci#endif 751cb0ef41Sopenharmony_ci#elif defined __DragonFly__ 761cb0ef41Sopenharmony_ci#define GTEST_OS_DRAGONFLY 1 771cb0ef41Sopenharmony_ci#elif defined __FreeBSD__ 781cb0ef41Sopenharmony_ci#define GTEST_OS_FREEBSD 1 791cb0ef41Sopenharmony_ci#elif defined __Fuchsia__ 801cb0ef41Sopenharmony_ci#define GTEST_OS_FUCHSIA 1 811cb0ef41Sopenharmony_ci#elif defined(__GNU__) 821cb0ef41Sopenharmony_ci#define GTEST_OS_GNU_HURD 1 831cb0ef41Sopenharmony_ci#elif defined(__GLIBC__) && defined(__FreeBSD_kernel__) 841cb0ef41Sopenharmony_ci#define GTEST_OS_GNU_KFREEBSD 1 851cb0ef41Sopenharmony_ci#elif defined __linux__ 861cb0ef41Sopenharmony_ci#define GTEST_OS_LINUX 1 871cb0ef41Sopenharmony_ci#if defined __ANDROID__ 881cb0ef41Sopenharmony_ci#define GTEST_OS_LINUX_ANDROID 1 891cb0ef41Sopenharmony_ci#endif 901cb0ef41Sopenharmony_ci#elif defined __MVS__ 911cb0ef41Sopenharmony_ci#define GTEST_OS_ZOS 1 921cb0ef41Sopenharmony_ci#elif defined(__sun) && defined(__SVR4) 931cb0ef41Sopenharmony_ci#define GTEST_OS_SOLARIS 1 941cb0ef41Sopenharmony_ci#elif defined(_AIX) 951cb0ef41Sopenharmony_ci#define GTEST_OS_AIX 1 961cb0ef41Sopenharmony_ci#elif defined(__hpux) 971cb0ef41Sopenharmony_ci#define GTEST_OS_HPUX 1 981cb0ef41Sopenharmony_ci#elif defined __native_client__ 991cb0ef41Sopenharmony_ci#define GTEST_OS_NACL 1 1001cb0ef41Sopenharmony_ci#elif defined __NetBSD__ 1011cb0ef41Sopenharmony_ci#define GTEST_OS_NETBSD 1 1021cb0ef41Sopenharmony_ci#elif defined __OpenBSD__ 1031cb0ef41Sopenharmony_ci#define GTEST_OS_OPENBSD 1 1041cb0ef41Sopenharmony_ci#elif defined __QNX__ 1051cb0ef41Sopenharmony_ci#define GTEST_OS_QNX 1 1061cb0ef41Sopenharmony_ci#elif defined(__HAIKU__) 1071cb0ef41Sopenharmony_ci#define GTEST_OS_HAIKU 1 1081cb0ef41Sopenharmony_ci#elif defined ESP8266 1091cb0ef41Sopenharmony_ci#define GTEST_OS_ESP8266 1 1101cb0ef41Sopenharmony_ci#elif defined ESP32 1111cb0ef41Sopenharmony_ci#define GTEST_OS_ESP32 1 1121cb0ef41Sopenharmony_ci#elif defined(__XTENSA__) 1131cb0ef41Sopenharmony_ci#define GTEST_OS_XTENSA 1 1141cb0ef41Sopenharmony_ci#elif defined(__hexagon__) 1151cb0ef41Sopenharmony_ci#define GTEST_OS_QURT 1 1161cb0ef41Sopenharmony_ci#elif defined(CPU_QN9090) || defined(CPU_QN9090HN) 1171cb0ef41Sopenharmony_ci#define GTEST_OS_NXP_QN9090 1 1181cb0ef41Sopenharmony_ci#elif defined(NRF52) 1191cb0ef41Sopenharmony_ci#define GTEST_OS_NRF52 1 1201cb0ef41Sopenharmony_ci#endif // __CYGWIN__ 1211cb0ef41Sopenharmony_ci 1221cb0ef41Sopenharmony_ci#endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ 123