@@ -254,9 +254,9 @@ include(PHP/CheckAVX512)
254254# Check functions.
255255################################################################################
256256
257- check_symbol_exists(alphasort " dirent.h" HAVE_ALPHASORT)
258- check_symbol_exists(explicit_memset " string.h" HAVE_EXPLICIT_MEMSET)
259- check_symbol_exists(fdatasync " unistd.h" HAVE_FDATASYNC)
257+ check_symbol_exists(alphasort dirent.h HAVE_ALPHASORT)
258+ check_symbol_exists(explicit_memset string .h HAVE_EXPLICIT_MEMSET)
259+ check_symbol_exists(fdatasync unistd.h HAVE_FDATASYNC)
260260# The fdatasync declaration on macOS is missing in headers, yet is in C library.
261261if (NOT HAVE_FDATASYNC)
262262 unset (HAVE_FDATASYNC CACHE )
@@ -275,9 +275,9 @@ block()
275275 check_symbol_exists(flock "${headers} " HAVE_FLOCK)
276276endblock()
277277
278- check_symbol_exists(ftok " sys/ipc.h" HAVE_FTOK)
279- check_symbol_exists(funopen " stdio.h" HAVE_FUNOPEN)
280- check_symbol_exists(getcwd " unistd.h" HAVE_GETCWD)
278+ check_symbol_exists(ftok sys/ipc.h HAVE_FTOK)
279+ check_symbol_exists(funopen stdio.h HAVE_FUNOPEN)
280+ check_symbol_exists(getcwd unistd.h HAVE_GETCWD)
281281
282282block()
283283 set (headers stdlib.h)
@@ -295,39 +295,39 @@ block()
295295 check_symbol_exists(getloadavg "${headers} " HAVE_GETLOADAVG)
296296endblock()
297297
298- check_symbol_exists(getlogin " unistd.h" HAVE_GETLOGIN)
299- check_symbol_exists(getrusage " sys/resource.h" HAVE_GETRUSAGE)
300- check_symbol_exists(gettimeofday " sys/time.h" HAVE_GETTIMEOFDAY)
301- check_symbol_exists(getpwnam_r " pwd.h" HAVE_GETPWNAM_R)
302- check_symbol_exists(getgrnam_r " grp.h" HAVE_GETGRNAM_R)
303- check_symbol_exists(getpwuid_r " pwd.h" HAVE_GETPWUID_R)
304- check_symbol_exists(getwd " unistd.h" HAVE_GETWD)
305- check_symbol_exists(glob " glob.h" HAVE_GLOB)
306- check_symbol_exists(lchown " unistd.h" HAVE_LCHOWN)
307- check_symbol_exists(memcntl " sys/mman.h" HAVE_MEMCNTL)
298+ check_symbol_exists(getlogin unistd.h HAVE_GETLOGIN)
299+ check_symbol_exists(getrusage sys/resource .h HAVE_GETRUSAGE)
300+ check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
301+ check_symbol_exists(getpwnam_r pwd.h HAVE_GETPWNAM_R)
302+ check_symbol_exists(getgrnam_r grp.h HAVE_GETGRNAM_R)
303+ check_symbol_exists(getpwuid_r pwd.h HAVE_GETPWUID_R)
304+ check_symbol_exists(getwd unistd.h HAVE_GETWD)
305+ check_symbol_exists(glob glob.h HAVE_GLOB)
306+ check_symbol_exists(lchown unistd.h HAVE_LCHOWN)
307+ check_symbol_exists(memcntl sys/mman.h HAVE_MEMCNTL)
308308
309309cmake_push_check_state(RESET)
310310 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
311- check_symbol_exists(memfd_create " sys/mman.h" HAVE_MEMFD_CREATE)
311+ check_symbol_exists(memfd_create sys/mman.h HAVE_MEMFD_CREATE)
312312cmake_pop_check_state()
313313
314- check_symbol_exists(mkstemp " stdlib.h" HAVE_MKSTEMP)
315- check_symbol_exists(mmap " sys/mman.h" HAVE_MMAP)
316- check_symbol_exists(nice " unistd.h" HAVE_NICE)
317- check_symbol_exists(nl_langinfo " langinfo.h" HAVE_NL_LANGINFO)
318- check_symbol_exists(prctl " sys/prctl.h" HAVE_PRCTL)
319- check_symbol_exists(procctl " sys/procctl.h" HAVE_PROCCTL)
320- check_symbol_exists(poll " poll.h" HAVE_POLL)
314+ check_symbol_exists(mkstemp stdlib.h HAVE_MKSTEMP)
315+ check_symbol_exists(mmap sys/mman.h HAVE_MMAP)
316+ check_symbol_exists(nice unistd.h HAVE_NICE)
317+ check_symbol_exists(nl_langinfo langinfo.h HAVE_NL_LANGINFO)
318+ check_symbol_exists(prctl sys/prctl.h HAVE_PRCTL)
319+ check_symbol_exists(procctl sys/procctl.h HAVE_PROCCTL)
320+ check_symbol_exists(poll poll.h HAVE_POLL)
321321check_symbol_exists(
322322 pthread_jit_write_protect_np
323- " pthread.h"
323+ pthread.h
324324 HAVE_PTHREAD_JIT_WRITE_PROTECT_NP
325325)
326- check_symbol_exists(putenv " stdlib.h" HAVE_PUTENV)
327- check_symbol_exists(scandir " dirent.h" HAVE_SCANDIR)
328- check_symbol_exists(setitimer " sys/time.h" HAVE_SETITIMER)
329- check_symbol_exists(setenv " stdlib.h" HAVE_SETENV)
330- check_symbol_exists(sigprocmask " signal.h" HAVE_SIGPROCMASK)
326+ check_symbol_exists(putenv stdlib.h HAVE_PUTENV)
327+ check_symbol_exists(scandir dirent.h HAVE_SCANDIR)
328+ check_symbol_exists(setitimer sys/time.h HAVE_SETITIMER)
329+ check_symbol_exists(setenv stdlib.h HAVE_SETENV)
330+ check_symbol_exists(sigprocmask signal.h HAVE_SIGPROCMASK)
331331
332332# Check for statfs().
333333block()
@@ -345,39 +345,39 @@ block()
345345 check_symbol_exists(statfs "${headers} " HAVE_STATFS)
346346endblock()
347347
348- check_symbol_exists(statvfs " sys/statvfs.h" HAVE_STATVFS)
349- check_symbol_exists(std_syslog " sys/syslog.h" HAVE_STD_SYSLOG)
350- check_symbol_exists(strcasecmp " strings.h" HAVE_STRCASECMP)
351- check_symbol_exists(strnlen " string.h" HAVE_STRNLEN)
352- check_symbol_exists(symlink " unistd.h" HAVE_SYMLINK)
353- check_symbol_exists(tzset " time.h" HAVE_TZSET)
354- check_symbol_exists(unsetenv " stdlib.h" HAVE_UNSETENV)
355- check_symbol_exists(usleep " unistd.h" HAVE_USLEEP)
356- check_symbol_exists(utime " utime.h" HAVE_UTIME)
348+ check_symbol_exists(statvfs sys/statvfs.h HAVE_STATVFS)
349+ check_symbol_exists(std_syslog sys/syslog.h HAVE_STD_SYSLOG)
350+ check_symbol_exists(strcasecmp strings .h HAVE_STRCASECMP)
351+ check_symbol_exists(strnlen string .h HAVE_STRNLEN)
352+ check_symbol_exists(symlink unistd.h HAVE_SYMLINK)
353+ check_symbol_exists(tzset time.h HAVE_TZSET)
354+ check_symbol_exists(unsetenv stdlib.h HAVE_UNSETENV)
355+ check_symbol_exists(usleep unistd.h HAVE_USLEEP)
356+ check_symbol_exists(utime utime.h HAVE_UTIME)
357357
358358cmake_push_check_state(RESET)
359359 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
360- check_symbol_exists(vasprintf " stdio.h" HAVE_VASPRINTF)
360+ check_symbol_exists(vasprintf stdio.h HAVE_VASPRINTF)
361361cmake_pop_check_state()
362362
363363cmake_push_check_state(RESET)
364364 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
365- check_symbol_exists(asprintf " stdio.h" HAVE_ASPRINTF)
365+ check_symbol_exists(asprintf stdio.h HAVE_ASPRINTF)
366366cmake_pop_check_state()
367367
368368cmake_push_check_state(RESET)
369369 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
370- check_symbol_exists(memmem " string.h" HAVE_MEMMEM)
370+ check_symbol_exists(memmem string .h HAVE_MEMMEM)
371371cmake_pop_check_state()
372372
373373cmake_push_check_state(RESET)
374374 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
375- check_symbol_exists(memrchr " string.h" HAVE_MEMRCHR)
375+ check_symbol_exists(memrchr string .h HAVE_MEMRCHR)
376376cmake_pop_check_state()
377377
378- check_symbol_exists(strlcat " string.h" HAVE_STRLCAT)
379- check_symbol_exists(strlcpy " string.h" HAVE_STRLCPY)
380- check_symbol_exists(explicit_bzero " string.h" HAVE_EXPLICIT_BZERO)
378+ check_symbol_exists(strlcat string .h HAVE_STRLCAT)
379+ check_symbol_exists(strlcpy string .h HAVE_STRLCPY)
380+ check_symbol_exists(explicit_bzero string .h HAVE_EXPLICIT_BZERO)
381381
382382# Check reentrant functions.
383383include (PHP/CheckReentrantFunctions)
@@ -444,12 +444,12 @@ include(PHP/CheckFlushIo)
444444
445445if (HAVE_ALLOCA_H)
446446 # Most *.nix systems.
447- check_symbol_exists(alloca " alloca.h" HAVE_ALLOCA)
447+ check_symbol_exists(alloca alloca.h HAVE_ALLOCA)
448448elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
449- check_symbol_exists(alloca " malloc.h" HAVE_ALLOCA)
449+ check_symbol_exists(alloca malloc.h HAVE_ALLOCA)
450450else ()
451451 # BSD-based systems.
452- check_symbol_exists(alloca " stdlib.h" HAVE_ALLOCA)
452+ check_symbol_exists(alloca stdlib.h HAVE_ALLOCA)
453453endif ()
454454
455455message (CHECK_START "Checking whether the compiler supports __alignof__" )
0 commit comments