From b6307a48739dd68baadd51bb82c21ad4cef26aca Mon Sep 17 00:00:00 2001 From: Steena Monteiro Date: Fri, 23 Jun 2023 16:15:20 -0700 Subject: [PATCH] Fixed ptrdiff_t type support for MacOSX Signed-off-by: Steena Monteiro --- src/include/OSL/encodedtypes.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/include/OSL/encodedtypes.h b/src/include/OSL/encodedtypes.h index 93fd1e6736..eac1342db4 100644 --- a/src/include/OSL/encodedtypes.h +++ b/src/include/OSL/encodedtypes.h @@ -117,7 +117,7 @@ template<> struct TypeEncoder { // On macOS 10.+ ptrdiff_t is a long, but on linux this // specialization would conflict with int64_t -#if OSL_APPLE_CLANG_VERSION +#if defined(__APPLE__) && defined(__MACH__) template<> struct TypeEncoder { using DataType = int64_t; static constexpr EncodedType value = EncodedType::kInt64; @@ -127,14 +127,6 @@ template<> struct TypeEncoder { }; #endif -// template<> struct TypeEncoder { -// using DataType = int64_t; -// static constexpr EncodedType value = EncodedType::kInt64; -// static_assert(size_of_encoded_type(value) == sizeof(DataType), -// "unexpected"); -// static DataType Encode(const std::ptrdiff_t val) { return val; } -// }; - template<> struct TypeEncoder { using DataType = double; static constexpr EncodedType value = EncodedType::kDouble;