From 06ca2376a58aeadd0cfe9764370db12fe53848f7 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 21 Aug 2024 09:12:04 -0700 Subject: [PATCH] refactor config --- aws-common-runtime/config/aws/common/config.h | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/aws-common-runtime/config/aws/common/config.h b/aws-common-runtime/config/aws/common/config.h index cc464d8e..8c325dcb 100644 --- a/aws-common-runtime/config/aws/common/config.h +++ b/aws-common-runtime/config/aws/common/config.h @@ -1,25 +1,27 @@ -#ifdef __APPLE__ -# include -#endif - -#ifndef AWS_COMMON_CONFIG_H -# define AWS_COMMON_CONFIG_H /** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ + +#ifndef AWS_COMMON_CONFIG_H +#define AWS_COMMON_CONFIG_H /* * This header exposes compiler feature test results determined during cmake * configure time to inline function implementations. The macros defined here * should be considered to be an implementation detail, and can change at any * time. */ +#ifdef __APPLE__ +/* This is a trick to skip OpenSSL header on Apple platforms since Swift Package Manager is not smart enough to exclude + * some headers. + */ +# define AWS_C_CAL_OPENSSLCRYPTO_COMMON_H +#endif #define AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS #define AWS_HAVE_GCC_INLINE_ASM -#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR || TARGET_OS_MAC -# define AWS_C_CAL_OPENSSLCRYPTO_COMMON_H -#endif + #define AWS_UNSTABLE_TESTING_API 1 #define AWS_AFFINITY_METHOD 0 #define AWS_HAVE_EXECINFO 1 + #endif