@@ -5,49 +5,99 @@ 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 glob() implemented on Windows.
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+ # PHP has glob() emulation implemented on Windows.
3542 set (HAVE_GLOB TRUE )
3643
37- # PHP has custom nanosleep for Windows platform.
44+ # Whether system has <grp.h> header.
45+ set (HAVE_GRP_H FALSE )
46+
47+ # Whether system has kill().
48+ set (HAVE_KILL FALSE )
49+
50+ # Windows has LoadLibrary().
51+ set (HAVE_LIBDL TRUE )
52+
53+ # PHP has nanosleep() emulation implemented on Windows.
3854 set (HAVE_NANOSLEEP TRUE )
3955
56+ # PHP has nice() emulation implemented on Windows.
4057 set (HAVE_NICE TRUE )
4158
42- # PHP supports socketpair by the emulation in win32/sockets.c.
59+ # Whether system has <pwd.h> header.
60+ set (HAVE_PWD_H FALSE )
61+
62+ # Whether systems has setitimer().
63+ set (HAVE_SETITIMER FALSE )
64+
65+ # Windows has setjmp() in <setjmp.h> instead.
66+ set (HAVE_SIGSETJMP FALSE )
67+
68+ # PHP has socketpair() emulation implemented on Windows.
4369 set (HAVE_SOCKETPAIR TRUE )
4470
45- # PHP defines strcasecmp in zend_config.w32.h.
71+ # PHP defines strcasecmp in Zend/ zend_config.w32.h.
4672 set (HAVE_STRCASECMP TRUE )
4773
48- # PHP has custom syslog.h for Windows platform.
74+ # Whether system has symlink().
75+ set (HAVE_SYMLINK FALSE )
76+
77+ # Whether system has <sys/file.h> header.
78+ set (HAVE_SYS_FILE_H FALSE )
79+
80+ # Whether system has <sys/socket.h> header.
81+ set (HAVE_SYS_SOCKET_H FALSE )
82+
83+ # Whether system has <sys/time.h> header.
84+ set (HAVE_SYS_TIME_H FALSE )
85+
86+ # Whether system has <sys/wait.h> header.
87+ set (HAVE_SYS_WAIT_H FALSE )
88+
89+ # PHP has syslog.h emulation implemented on Windows.
4990 set (HAVE_SYSLOG_H TRUE )
5091
51- # PHP has custom usleep for Windows platform.
92+ # Whether 'st_blksize' is a member of 'struct stat'.
93+ set (HAVE_STRUCT_STAT_ST_BLKSIZE FALSE )
94+
95+ # Whether 'st_blocks' is a member of 'struct stat'.
96+ set (HAVE_STRUCT_STAT_ST_BLOCKS FALSE )
97+
98+ # Whether system has <unistd.h>.
99+ set (HAVE_UNISTD_H FALSE )
100+
101+ # PHP has usleep() emulation implemented on Windows.
52102 set (HAVE_USLEEP TRUE )
53103endif ()
0 commit comments