File tree Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -356,10 +356,6 @@ function(_php_main_create_files)
356356 message (STATUS "Creating main/php_version.h" )
357357 configure_file (main/php_version.h.in main/php_version.h @ONLY)
358358
359- # Add Zend Engine configuration.
360- file (READ ${CMAKE_CURRENT_BINARY_DIR} /Zend/CMakeFiles/zend_config.h config)
361- string (STRIP "${config} " ZEND_CONFIGURATION)
362-
363359 # Add sapis configuration.
364360 set (config "" )
365361 get_cmake_property (sapis PHP_SAPIS)
@@ -388,6 +384,10 @@ function(_php_main_create_files)
388384 endforeach ()
389385 string (STRIP "${config} " PHP_EXTENSIONS_CONFIGURATION)
390386
387+ # Add Zend Engine configuration.
388+ file (READ ${CMAKE_CURRENT_BINARY_DIR} /Zend/CMakeFiles/zend_config.h config)
389+ string (STRIP "${config} " ZEND_CONFIGURATION)
390+
391391 if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
392392 set (PHP_CONFIG_H_WINDOWS 1)
393393 set (file config.w32.h)
Original file line number Diff line number Diff line change 701701/* Define to 1 when using musl libc. */
702702#cmakedefine __MUSL__ 1
703703
704- /*****************************************************************************
705- Zend Engine configuration
706- ****************************************************************************/
707-
708- @ZEND_CONFIGURATION @
709-
710704/*****************************************************************************
711705 PHP SAPIs configuration
712706 ****************************************************************************/
719713
720714@PHP_EXTENSIONS_CONFIGURATION @
721715
716+ /*****************************************************************************
717+ Zend Engine configuration
718+ ****************************************************************************/
719+
720+ @ZEND_CONFIGURATION @
721+
722722#if @PHP_CONFIG_H_WINDOWS @
723723/* The following build system related configuration values are on *nix
724724 systems defined in the main/build-defs.h and JScript Windows build system
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ target_compile_definitions(
6969 _MBCS
7070 _USE_MATH_DEFINES
7171 PHP_EXPORTS
72+ # The time_t defaults to 64-bit. Force 32-bit time_t on 32-bit architecture.
73+ # This was historically added to PHP as Visual Studio 2005 set 64-bit time_t
74+ # by default and it would break 3rdParty libs that were built with older
75+ # compilers. This and duplicate definition in the configuration header
76+ # should be removed at some point.
77+ $<$<EQUAL :${CMAKE_SIZEOF_VOID_P} ,4>:_USE_32BIT_TIME_T=1>
7278)
7379
7480# MS deprecated ANSI stdio and similar functions. Disable warnings.
@@ -79,11 +85,6 @@ target_compile_options(
7985 $<$<COMPILE_LANG_AND_ID:CXX,MSVC >:/wd4996>
8086)
8187
82- # The time_t defaults to 64-bit. Force 32-bit time_t on 32-bit architecture.
83- if (CMAKE_SIZEOF_VOID_P EQUAL 4)
84- target_compile_definitions (php_configuration INTERFACE _USE_32BIT_TIME_T=1)
85- endif ()
86-
8788target_link_libraries (php_win32 PRIVATE PHP::configuration )
8889
8990target_link_libraries (
You can’t perform that action at this time.
0 commit comments