Skip to content

Commit 807a696

Browse files
committed
Enable signed functions in <intsafe.h>
1 parent 579b798 commit 807a696

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cmake/win32/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ target_compile_definitions(
102102
$<$<EQUAL:${CMAKE_SIZEOF_VOID_P},4>:_USE_32BIT_TIME_T=1>
103103
)
104104

105+
# Enable signed functions in <intsafe.h>, while Clang uses __builtin_*().
106+
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
107+
target_compile_definitions(
108+
php_config
109+
INTERFACE $<$<COMPILE_LANGUAGE:C>:ENABLE_INTSAFE_SIGNED_FUNCTIONS>
110+
)
111+
endif()
112+
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
113+
target_compile_definitions(
114+
php_config
115+
INTERFACE $<$<COMPILE_LANGUAGE:CXX>:ENABLE_INTSAFE_SIGNED_FUNCTIONS>
116+
)
117+
endif()
118+
105119
# MS deprecated ANSI stdio and similar functions. Disable warnings.
106120
target_compile_options(
107121
php_config

0 commit comments

Comments
 (0)