1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Fix a few cmake configure-time checks.

A couple of actual checks were missing (elf_aux_info, sysctlbyname).
Several more were accidentally left out of cmake.h.in, meaning they
wouldn't be propagated from cmake's variable space into the actual
compilation. And a handful of checks in the C source were still using
the autotools-style 'if defined' in place of the cmake-style "it's
always 0 or 1" plain #if.
This commit is contained in:
Simon Tatham
2021-04-17 19:17:28 +01:00
parent 6c783f9ad0
commit 3996919f5e
4 changed files with 12 additions and 3 deletions

View File

@ -16,6 +16,11 @@
#cmakedefine NOT_X_WINDOWS
#cmakedefine01 HAVE_ASM_HWCAP_H
#cmakedefine01 HAVE_SYS_AUXV_H
#cmakedefine01 HAVE_SYS_SYSCTL_H
#cmakedefine01 HAVE_SYS_TYPES_H
#cmakedefine01 HAVE_GLOB_H
#cmakedefine01 HAVE_FUTIMES
#cmakedefine01 HAVE_GETADDRINFO
#cmakedefine01 HAVE_POSIX_OPENPT
@ -28,6 +33,8 @@
#cmakedefine01 HAVE_SETPWENT
#cmakedefine01 HAVE_ENDPWENT
#cmakedefine01 HAVE_GETAUXVAL
#cmakedefine01 HAVE_ELF_AUX_INFO
#cmakedefine01 HAVE_SYSCTLBYNAME
#cmakedefine01 HAVE_CLOCK_MONOTONIC
#cmakedefine01 HAVE_CLOCK_GETTIME
#cmakedefine01 HAVE_SO_PEERCRED

View File

@ -34,6 +34,8 @@ check_symbol_exists(dirfd "sys/types.h;dirent.h" HAVE_DIRFD)
check_symbol_exists(setpwent "sys/types.h;pwd.h" HAVE_SETPWENT)
check_symbol_exists(endpwent "sys/types.h;pwd.h" HAVE_ENDPWENT)
check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL)
check_symbol_exists(elf_aux_info "sys/auxv.h" HAVE_ELF_AUX_INFO)
check_symbol_exists(sysctlbyname "sys/types.h;sys/sysctl.h" HAVE_SYSCTLBYNAME)
check_symbol_exists(CLOCK_MONOTONIC "time.h" HAVE_CLOCK_MONOTONIC)
check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME)