@@ -5,46 +5,96 @@ Specific configuration for Windows platform.
55include_guard (GLOBAL )
66
77if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
8- # Common compilation definitions.
9- target_compile_definitions (
10- php_config
11- INTERFACE
12- PHP_WIN32 # For PHP code
13- _WIN32 # Defined by all compilers when targeting Windows. Left here
14- # to match the native PHP Windows build system.
15- WIN32 # Defined by Windows SDK and some compilers (GCC and Clang)
16- # when targeting Windows. Left here for BC for possible PECL
17- # extensions not being updated yet. In new code it is being
18- # replaced with _WIN32.
19- ZEND_WIN32 # For Zend Engine
20- )
21-
228 # To speed up the Windows build experience with Visual Studio generators,
239 # these are always known on Windows systems.
24- # TODO: Update and fix this better.
2510
11+ # Whether system has <alloca.h> header.
12+ set (HAVE_ALLOCA_H FALSE )
13+
14+ # Whether system has <dirent.h> header.
15+ set (HAVE_DIRENT_H FALSE )
16+
17+ # PHP has fnmatch() emulation implemented on Windows.
2618 set (HAVE_FNMATCH TRUE )
2719
28- # PHP has unconditional getaddrinfo() support on Windows for now.
20+ # Whether system has flock().
21+ set (HAVE_FLOCK FALSE )
22+
23+ # PHP has ftok() emulation implemented on Windows.
24+ set (HAVE_FTOK TRUE )
25+
26+ # PHP has unconditional getaddrinfo() support on Windows.
2927 set (HAVE_GETADDRINFO TRUE )
3028
29+ # PHP has unconditional support for getcwd() on Windows.
30+ set (HAVE_GETCWD TRUE )
31+
3132 # PHP defines getpid as _getpid on Windows.
3233 set (HAVE_GETPID TRUE )
3334
34- # PHP has custom nanosleep for Windows platform.
35+ # PHP has getrusage() emulation implemented on Windows.
36+ set (HAVE_GETRUSAGE TRUE )
37+
38+ # PHP has gettimeofday() emulation implemented on Windows.
39+ set (HAVE_GETTIMEOFDAY TRUE )
40+
41+ # Whether system has <grp.h> header.
42+ set (HAVE_GRP_H FALSE )
43+
44+ # Whether system has kill().
45+ set (HAVE_KILL FALSE )
46+
47+ # Windows has LoadLibrary().
48+ set (HAVE_LIBDL TRUE )
49+
50+ # PHP has nanosleep() emulation implemented on Windows.
3551 set (HAVE_NANOSLEEP TRUE )
3652
53+ # PHP has nice() emulation implemented on Windows.
3754 set (HAVE_NICE TRUE )
3855
39- # PHP supports socketpair by the emulation in win32/sockets.c.
56+ # Whether system has <pwd.h> header.
57+ set (HAVE_PWD_H FALSE )
58+
59+ # Whether systems has setitimer().
60+ set (HAVE_SETITIMER FALSE )
61+
62+ # Windows has setjmp() in <setjmp.h> instead.
63+ set (HAVE_SIGSETJMP FALSE )
64+
65+ # PHP has socketpair() emulation implemented on Windows.
4066 set (HAVE_SOCKETPAIR TRUE )
4167
42- # PHP defines strcasecmp in zend_config.w32.h.
68+ # PHP defines strcasecmp in Zend/ zend_config.w32.h.
4369 set (HAVE_STRCASECMP TRUE )
4470
45- # PHP has custom syslog.h for Windows platform.
71+ # Whether system has symlink().
72+ set (HAVE_SYMLINK FALSE )
73+
74+ # Whether system has <sys/file.h> header.
75+ set (HAVE_SYS_FILE_H FALSE )
76+
77+ # Whether system has <sys/socket.h> header.
78+ set (HAVE_SYS_SOCKET_H FALSE )
79+
80+ # Whether system has <sys/time.h> header.
81+ set (HAVE_SYS_TIME_H FALSE )
82+
83+ # Whether system has <sys/wait.h> header.
84+ set (HAVE_SYS_WAIT_H FALSE )
85+
86+ # PHP has syslog.h emulation implemented on Windows.
4687 set (HAVE_SYSLOG_H TRUE )
4788
48- # PHP has custom usleep for Windows platform.
89+ # Whether 'st_blksize' is a member of 'struct stat'.
90+ set (HAVE_STRUCT_STAT_ST_BLKSIZE FALSE )
91+
92+ # Whether 'st_blocks' is a member of 'struct stat'.
93+ set (HAVE_STRUCT_STAT_ST_BLOCKS FALSE )
94+
95+ # Whether system has <unistd.h>.
96+ set (HAVE_UNISTD_H FALSE )
97+
98+ # PHP has usleep() emulation implemented on Windows.
4999 set (HAVE_USLEEP TRUE )
50100endif ()
0 commit comments