diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a9c298e..72d1a82 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: [3.9.25, 3.10.19, 3.11.14, 3.12.12, 3.13.9] + python-version: [3.9.25, 3.10.19, 3.11.14, 3.12.12, 3.13.9, 3.14.0] os: [ubuntu] include: - os: ubuntu @@ -59,4 +59,4 @@ jobs: runs-on: ubuntu-latest name: All tests passed steps: - - run: echo "Success" \ No newline at end of file + - run: echo "Success" diff --git a/CMakeLists.txt b/CMakeLists.txt index ceae648..00685be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -373,6 +373,8 @@ set(_download_3.13.6_md5 "d74ea44a15333e1bd161d1844078d4c5") set(_download_3.13.7_md5 "138c2e19c835ead10499571e0d4cf189") set(_download_3.13.8_md5 "bf0c29867b0c00aa7e9ec3394c979b9a") set(_download_3.13.9_md5 "e1791b3b51d412ececd3b95c30573c46") +# 3.14.x +set(_download_3.14.0_md5 "2ba6baae1e7c56f652195327d3becd64") set(_extracted_dir "Python-${PY_VERSION}") diff --git a/cmake/CheckTypeAlignment.cmake b/cmake/CheckTypeAlignment.cmake new file mode 100644 index 0000000..635e9c4 --- /dev/null +++ b/cmake/CheckTypeAlignment.cmake @@ -0,0 +1,80 @@ +# CheckTypeAlignment.cmake +# +# Provides a function to check the alignment requirement of a type. +# +# CHECK_TYPE_ALIGNMENT(TYPE VARIABLE) +# +# TYPE - the name of the type to check (e.g., "long", "size_t", "double") +# VARIABLE - variable to store the result +# +# The VARIABLE will be set to the alignment requirement in bytes, or undefined +# if the type doesn't exist or the check fails. +# +# Example usage: +# include(CheckTypeAlignment) +# check_type_alignment(long ALIGNOF_LONG) +# check_type_alignment(size_t ALIGNOF_SIZE_T) +# check_type_alignment(max_align_t ALIGNOF_MAX_ALIGN_T) + +include(CheckCSourceCompiles) + +function(CHECK_TYPE_ALIGNMENT TYPE VARIABLE) + if(NOT DEFINED ${VARIABLE}) + message(STATUS "Check alignment of ${TYPE}") + + # Try different alignment values from 1 to 128 bytes + # Most systems will have alignments that are powers of 2 + set(_ALIGNMENT_VALUES 1 2 4 8 16 32 64 128) + set(_ALIGNMENT_FOUND FALSE) + + foreach(_ALIGN ${_ALIGNMENT_VALUES}) + set(_CHECK_SOURCE " +#include + +#ifndef _Alignof +# ifdef __cplusplus +# define _Alignof(type) alignof(type) +# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +# include +# define _Alignof(type) alignof(type) +# elif defined(__GNUC__) || defined(__clang__) +# define _Alignof(type) __alignof__(type) +# elif defined(_MSC_VER) +# define _Alignof(type) __alignof(type) +# else + /* Fallback: use offsetof trick */ +# define _Alignof(type) offsetof(struct { char c; type member; }, member) +# endif +#endif + +/* Compile-time assertion: array size must be positive */ +typedef char check_alignment[(_Alignof(${TYPE}) == ${_ALIGN}) ? 1 : -1]; + +int main(void) { + return 0; +} +") + set(_CHECK_FILE + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_type_alignment_${VARIABLE}_${_ALIGN}.c") + file(WRITE "${_CHECK_FILE}" "${_CHECK_SOURCE}") + + try_compile(_COMPILE_RESULT + ${CMAKE_BINARY_DIR} + ${_CHECK_FILE} + OUTPUT_VARIABLE _COMPILE_OUTPUT + ) + + if(_COMPILE_RESULT) + set(${VARIABLE} ${_ALIGN} CACHE INTERNAL "Alignment of ${TYPE}") + set(_ALIGNMENT_FOUND TRUE) + message(STATUS "Check alignment of ${TYPE} - ${_ALIGN}") + break() + endif() + endforeach() + + if(NOT _ALIGNMENT_FOUND) + message(STATUS "Check alignment of ${TYPE} - failed") + set(${VARIABLE} "" CACHE INTERNAL "Alignment of ${TYPE}") + endif() + endif() +endfunction() diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 1f3eb80..e0feac9 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -10,6 +10,7 @@ include(CheckSymbolExists) include(CheckVariableExists) include(cmake/PlatformTest.cmake) include(cmake/CheckEndianness.cmake) +include(cmake/CheckTypeAlignment.cmake) message(STATUS "The system name is ${CMAKE_SYSTEM_NAME}") message(STATUS "The system processor is ${CMAKE_SYSTEM_PROCESSOR}") @@ -97,18 +98,25 @@ if(USE_SYSTEM_GDBM) if(NDBM_INCLUDE_PATH) set(NDBM_TAG NDBM) set(NDBM_USE NDBM) + set(HAVE_NDBM_H 1) else() set(NDBM_USE GDBM_COMPAT) find_path(GDBM_NDBM_INCLUDE_PATH gdbm/ndbm.h) if(GDBM_NDBM_INCLUDE_PATH) set(NDBM_TAG GDBM_NDBM) + set(HAVE_GDBM_NDBM_H 1) else() find_path(GDBM_DASH_NDBM_INCLUDE_PATH gdbm-ndbm.h) if(GDBM_DASH_NDBM_INCLUDE_PATH) set(NDBM_TAG GDBM_DASH_NDBM) + set(HAVE_GDBM_DASH_NDBM_H 1) endif() endif() endif() + + if(GDBM_INCLUDE_PATH) + set(HAVE_GDBM_H 1) + endif() endif() message(STATUS "GDBM_INCLUDE_PATH=${GDBM_INCLUDE_PATH}") message(STATUS "GDBM_LIBRARY=${GDBM_LIBRARY}") @@ -279,9 +287,11 @@ check_include_files(asm/types.h HAVE_ASM_TYPES_H) check_include_files(arpa/inet.h HAVE_ARPA_INET_H) check_include_files(bluetooth/bluetooth.h HAVE_BLUETOOTH_BLUETOOTH_H) check_include_files(bluetooth.h HAVE_BLUETOOTH_H) +check_include_files(bzlib.h HAVE_BZLIB_H) check_include_files(conio.h HAVE_CONIO_H) check_include_files(crypt.h HAVE_CRYPT_H) check_include_files(curses.h HAVE_CURSES_H) +check_include_files(db.h HAVE_DB_H) check_include_files(direct.h HAVE_DIRECT_H) check_include_files(dlfcn.h HAVE_DLFCN_H) # libffi and cpython check_include_files(errno.h HAVE_ERRNO_H) @@ -296,9 +306,17 @@ check_include_files(libintl.h HAVE_LIBINTL_H) check_include_files(libutil.h HAVE_LIBUTIL_H) check_include_files(linux/tipc.h HAVE_LINUX_TIPC_H) check_include_files(linux/auxvec.h HAVE_LINUX_AUXVEC_H) +check_include_files(linux/fs.h HAVE_LINUX_FS_H) +check_include_files(linux/limits.h HAVE_LINUX_LIMITS_H) check_include_files(locale.h HAVE_LOCALE_H) +check_include_files(lzma.h HAVE_LZMA_H) +check_include_files(minix/config.h HAVE_MINIX_CONFIG_H) +check_include_files(rpc/rpc.h HAVE_RPC_RPC_H) +check_include_files(setjmp.h HAVE_SETJMP_H) +check_include_files(zlib.h HAVE_ZLIB_H) check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) +check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H) set(LINUX_NETLINK_HEADERS) add_cond(LINUX_NETLINK_HEADERS HAVE_ASM_TYPES_H asm/types.h) @@ -320,6 +338,7 @@ check_include_files("${LINUX_CAN_HEADERS};linux/can.h" HAVE_LINUX_CAN_H) check_include_files("${LINUX_CAN_HEADERS};linux/can/bcm.h" HAVE_LINUX_CAN_BCM_H) check_include_files("${LINUX_CAN_HEADERS};linux/can/j1939.h" HAVE_LINUX_CAN_J1939_H) check_include_files("${LINUX_CAN_HEADERS};linux/can/raw.h" HAVE_LINUX_CAN_RAW_H) +check_include_files("${LINUX_CAN_HEADERS};netcan/can.h" HAVE_NETCAN_CAN_H) set(LINUX_VM_SOCKETS_HEADERS) add_cond(LINUX_VM_SOCKETS_HEADERS HAVE_SYS_SOCKET_H sys/socket.h) @@ -330,10 +349,15 @@ check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H) check_include_files(memory.h HAVE_MEMORY_H) # libffi and cpython check_include_files(minix/config.h HAVE_MINIX_CONFIG_H) check_include_files(ncurses.h HAVE_NCURSES_H) +check_include_files(ncurses/curses.h HAVE_NCURSES_CURSES_H) +check_include_files(ncurses/ncurses.h HAVE_NCURSES_NCURSES_H) check_include_files(ncurses/panel.h HAVE_NCURSES_PANEL_H) +check_include_files(ncursesw/curses.h HAVE_NCURSESW_CURSES_H) +check_include_files(ncursesw/ncurses.h HAVE_NCURSESW_NCURSES_H) check_include_files(ncursesw/panel.h HAVE_NCURSESW_PANEL_H) check_include_files(netdb.h HAVE_NETDB_H) check_include_files(netinet/in.h HAVE_NETINET_IN_H) +check_include_files(netlink/netlink.h HAVE_NETLINK_NETLINK_H) check_include_files(netpacket/packet.h HAVE_NETPACKET_PACKET_H) check_include_files(panel.h HAVE_PANEL_H) check_include_files(poll.h HAVE_POLL_H) @@ -346,20 +370,24 @@ if(USE_LIBEDIT) else() check_include_files("stdio.h;readline/readline.h" HAVE_READLINE_READLINE_H) endif() +check_include_files("stdio.h;editline/readline.h" HAVE_EDITLINE_READLINE_H) check_include_files(semaphore.h HAVE_SEMAPHORE_H) check_include_files(shadow.h HAVE_SHADOW_H) check_include_files(signal.h HAVE_SIGNAL_H) check_include_files(spawn.h HAVE_SPAWN_H) check_include_files(stdint.h HAVE_STDINT_H) # libffi and cpython +check_include_files(stdint.h HAVE_STDIO_H) # libffi and cpython check_include_files(stdlib.h HAVE_STDLIB_H) # libffi and cpython check_include_files(strings.h HAVE_STRINGS_H) # libffi and cpython check_include_files(string.h HAVE_STRING_H) # libffi and cpython check_include_files(stropts.h HAVE_STROPTS_H) check_include_files(sysexits.h HAVE_SYSEXITS_H) +check_include_files(syslog.h HAVE_SYSLOG_H) check_include_files(sys/audioio.h HAVE_SYS_AUDIOIO_H) check_include_files(sys/auxv.h HAVE_SYS_AUXV_H) check_include_files(sys/bsdtty.h HAVE_SYS_BSDTTY_H) check_include_files(sys/epoll.h HAVE_SYS_EPOLL_H) +check_include_files(sys/eventfd.h HAVE_SYS_EVENTFD_H) check_include_files(sys/event.h HAVE_SYS_EVENT_H) check_include_files(sys/file.h HAVE_SYS_FILE_H) check_include_files(sys/loadavg.h HAVE_SYS_LOADAVG_H) @@ -377,6 +405,7 @@ check_include_files(sys/statvfs.h HAVE_SYS_STATVFS_H) check_include_files(sys/stat.h HAVE_SYS_STAT_H) # libffi and cpython check_include_files(sys/timeb.h HAVE_SYS_TIMEB_H) check_include_files(sys/termio.h HAVE_SYS_TERMIO_H) +check_include_files(sys/timerfd.h HAVE_SYS_TIMERFD_H) check_include_files(sys/times.h HAVE_SYS_TIMES_H) check_include_files(sys/time.h HAVE_SYS_TIME_H) check_include_files(sys/types.h HAVE_SYS_TYPES_H) # libffi and cpython @@ -391,6 +420,7 @@ endif() check_include_files(unistd.h HAVE_UNISTD_H) # libffi and cpython check_include_files(util.h HAVE_UTIL_H) check_include_files(utime.h HAVE_UTIME_H) +check_include_files(utmp.h HAVE_UTMP_H) check_include_files(wchar.h HAVE_WCHAR_H) check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) # libffi and cpython @@ -448,7 +478,10 @@ else() set(M_LIBRARIES ${HAVE_LIBM}) endif() -find_library(HAVE_LIBNCURSES ncurses) +find_library(HAVE_NCURSES ncurses) +find_library(HAVE_NCURSESW ncursesw) +find_library(HAVE_PANEL panel) +find_library(HAVE_PANELW panelw) find_library(HAVE_LIBNSL nsl) find_library(HAVE_LIBREADLINE readline) if(USE_LIBEDIT) @@ -728,8 +761,9 @@ check_type_size(float SIZEOF_FLOAT) check_type_size(fpos_t SIZEOF_FPOS_T) check_type_size(int SIZEOF_INT) check_type_size(long SIZEOF_LONG) -check_type_size(long ALIGNOF_LONG) +check_type_alignment(long ALIGNOF_LONG) check_type_size("long double" SIZEOF_LONG_DOUBLE) +check_type_alignment(max_align_t ALIGNOF_MAX_ALIGN_T) set(HAVE_LONG_DOUBLE ${SIZEOF_LONG_DOUBLE}) # libffi and cpython check_type_size("long long" SIZEOF_LONG_LONG) set(HAVE_LONG_LONG ${SIZEOF_LONG_LONG}) @@ -738,7 +772,7 @@ check_type_size(pid_t SIZEOF_PID_T) check_type_size(pthread_t SIZEOF_PTHREAD_T) check_type_size(short SIZEOF_SHORT) check_type_size(size_t SIZEOF_SIZE_T) -check_type_size(size_t ALIGNOF_SIZE_T) +check_type_alignment(size_t ALIGNOF_SIZE_T) check_type_size(ssize_t HAVE_SSIZE_T) check_type_size(time_t SIZEOF_TIME_T) check_type_size(uintptr_t SIZEOF_UINTPTR_T) @@ -822,6 +856,7 @@ add_cond(CFG_HEADERS HAVE_LINUX_MEMFD_H linux/memfd.h) add_cond(CFG_HEADERS HAVE_LINUX_WAIT_H linux/wait.h) add_cond(CFG_HEADERS HAVE_MACH_O_DYLD_H mach-o/dyld.h) add_cond(CFG_HEADERS HAVE_NET_IF_H net/if.h) +add_cond(CFG_HEADERS HAVE_NET_ETHERNET_H net/ethernet.h) add_cond(CFG_HEADERS HAVE_SCHED_H sched.h) add_cond(CFG_HEADERS HAVE_SYS_ENDIAN_H sys/endian.h) add_cond(CFG_HEADERS HAVE_SYS_MEMFD_H sys/memfd.h) @@ -846,15 +881,19 @@ check_symbol_exists(chmod "${CFG_HEADERS}" HAVE_CHMOD) check_symbol_exists(chown "${CFG_HEADERS}" HAVE_CHOWN) check_symbol_exists(chroot "${CFG_HEADERS}" HAVE_CHROOT) check_symbol_exists(clock "${CFG_HEADERS}" HAVE_CLOCK) +check_symbol_exists(closefrom "${CFG_HEADERS}" HAVE_CLOSEFROM) +check_symbol_exists(close_range "${CFG_HEADERS}" HAVE_CLOSE_RANGE) check_symbol_exists(confstr "${CFG_HEADERS}" HAVE_CONFSTR) check_symbol_exists(connect "${CFG_HEADERS}" HAVE_CONNECT) check_symbol_exists(ctermid "${CFG_HEADERS}" HAVE_CTERMID) check_symbol_exists(ctermid_r "${CFG_HEADERS}" HAVE_CTERMID_R) +check_symbol_exists(dup "${CFG_HEADERS}" HAVE_DUP) check_symbol_exists(dup2 "${CFG_HEADERS}" HAVE_DUP2) check_symbol_exists(epoll_create "${CFG_HEADERS}" HAVE_EPOLL) if(IS_PY3) check_symbol_exists(epoll_create1 "${CFG_HEADERS}" HAVE_EPOLL_CREATE1) endif() +check_symbol_exists(eventfd "${CFG_HEADERS}" HAVE_EVENTFD) check_symbol_exists(execv "${CFG_HEADERS}" HAVE_EXECV) check_symbol_exists(fchdir "${CFG_HEADERS}" HAVE_FCHDIR) check_symbol_exists(fchmod "${CFG_HEADERS}" HAVE_FCHMOD) @@ -865,6 +904,7 @@ if(NOT HAVE_FLOCK) check_library_exists(bsd flock "" FLOCK_NEEDS_LIBBSD) endif() check_symbol_exists(fork "${CFG_HEADERS}" HAVE_FORK) +check_symbol_exists(fork1 "${CFG_HEADERS}" HAVE_FORK1) check_symbol_exists(forkpty "${CFG_HEADERS}" HAVE_FORKPTY) check_symbol_exists(fpathconf "${CFG_HEADERS}" HAVE_FPATHCONF) cmake_push_check_state() @@ -891,6 +931,8 @@ check_symbol_exists(getc_unlocked "${CFG_HEADERS}" HAVE_GETC_UNLOCKED) check_symbol_exists(getegid "${CFG_HEADERS}" HAVE_GETEGID) check_symbol_exists(geteuid "${CFG_HEADERS}" HAVE_GETEUID) check_symbol_exists(getgid "${CFG_HEADERS}" HAVE_GETGID) +check_symbol_exists(getgrent "${CFG_HEADERS}" HAVE_GETGRENT) +check_symbol_exists(getgrgid "${CFG_HEADERS}" HAVE_GETGRGID) check_symbol_exists(getgroups "${CFG_HEADERS}" HAVE_GETGROUPS) check_symbol_exists(getitimer "${CFG_HEADERS}" HAVE_GETITIMER) check_symbol_exists(getloadavg "${CFG_HEADERS}" HAVE_GETLOADAVG) @@ -901,6 +943,7 @@ check_symbol_exists(getpgrp "${CFG_HEADERS}" HAVE_GETPGRP) check_symbol_exists(getpid "${CFG_HEADERS}" HAVE_GETPID) check_symbol_exists(getppid "${CFG_HEADERS}" HAVE_GETPPID) python_check_function(getpriority HAVE_GETPRIORITY) +check_symbol_exists(getprotobyname "${CFG_HEADERS}" HAVE_GETPROTOBYNAME) check_symbol_exists(getpwent "${CFG_HEADERS}" HAVE_GETPWENT) check_symbol_exists(getresgid "${CFG_HEADERS}" HAVE_GETRESGID) check_symbol_exists(getresuid "${CFG_HEADERS}" HAVE_GETRESUID) @@ -912,6 +955,7 @@ check_symbol_exists(getspnam "${CFG_HEADERS}" HAVE_GETSPNAM) check_symbol_exists(gettimeofday "${CFG_HEADERS}" HAVE_GETTIMEOFDAY) check_symbol_exists(getuid "${CFG_HEADERS}" HAVE_GETUID) check_symbol_exists(getwd "${CFG_HEADERS}" HAVE_GETWD) +check_symbol_exists(grantpt "${CFG_HEADERS}" HAVE_GRANTPT) check_symbol_exists(hypot "${CFG_HEADERS}" HAVE_HYPOT) check_symbol_exists(initgroups "${CFG_HEADERS}" HAVE_INITGROUPS) check_symbol_exists(kill "${CFG_HEADERS}" HAVE_KILL) @@ -922,6 +966,7 @@ python_check_function(lchmod HAVE_LCHMOD) check_symbol_exists(lchown "${CFG_HEADERS}" HAVE_LCHOWN) check_symbol_exists(link "${CFG_HEADERS}" HAVE_LINK) check_symbol_exists(listen "${CFG_HEADERS}" HAVE_LISTEN) +check_symbol_exists(login_tty "${CFG_HEADERS}" HAVE_LOGIN_TTY) check_symbol_exists(lstat "${CFG_HEADERS}" HAVE_LSTAT) check_symbol_exists(makedev "${CFG_HEADERS}" HAVE_MAKEDEV) check_symbol_exists(memcpy "${CFG_HEADERS}" HAVE_MEMCPY) # libffi and cpython @@ -938,6 +983,8 @@ check_symbol_exists(pathconf "${CFG_HEADERS}" HAVE_PATHCONF) check_symbol_exists(pause "${CFG_HEADERS}" HAVE_PAUSE) check_symbol_exists(plock "${CFG_HEADERS}" HAVE_PLOCK) check_symbol_exists(poll "${CFG_HEADERS}" HAVE_POLL) +check_symbol_exists(ptsname "${CFG_HEADERS}" HAVE_PTSNAME) +check_symbol_exists(ptsname_r "${CFG_HEADERS}" HAVE_PTSNAME_R) check_symbol_exists(putenv "${CFG_HEADERS}" HAVE_PUTENV) check_symbol_exists(readlink "${CFG_HEADERS}" HAVE_READLINK) check_symbol_exists(realpath "${CFG_HEADERS}" HAVE_REALPATH) @@ -950,6 +997,7 @@ check_symbol_exists(setgid "${CFG_HEADERS}" HAVE_SETGID) check_symbol_exists(setgroups "${CFG_HEADERS}" HAVE_SETGROUPS) check_symbol_exists(setitimer "${CFG_HEADERS}" HAVE_SETITIMER) check_symbol_exists(setlocale "${CFG_HEADERS}" HAVE_SETLOCALE) +check_symbol_exists(setns "${CFG_HEADERS}" HAVE_SETNS) check_symbol_exists(setpgid "${CFG_HEADERS}" HAVE_SETPGID) check_symbol_exists(setpgrp "${CFG_HEADERS}" HAVE_SETPGRP) check_symbol_exists(setregid "${CFG_HEADERS}" HAVE_SETREGID) @@ -986,6 +1034,7 @@ check_symbol_exists(ttyname "${CFG_HEADERS}" HAVE_TTYNAME) check_symbol_exists(umask "${CFG_HEADERS}" HAVE_UMASK) check_symbol_exists(uname "${CFG_HEADERS}" HAVE_UNAME) check_symbol_exists(unsetenv "${CFG_HEADERS}" HAVE_UNSETENV) +check_symbol_exists(unshare "${CFG_HEADERS}" HAVE_UNSHARE) check_symbol_exists(utimes "${CFG_HEADERS}" HAVE_UTIMES) check_symbol_exists(wait "${CFG_HEADERS}" HAVE_WAIT) check_symbol_exists(wait3 "${CFG_HEADERS}" HAVE_WAIT3) @@ -1019,6 +1068,7 @@ check_symbol_exists(getgrnam_r "${CFG_HEADERS}" HAVE_GETGRNAM_R) check_symbol_exists(getgrouplist "${CFG_HEADERS}" HAVE_GETGROUPLIST) check_symbol_exists(getpwnam_r "${CFG_HEADERS}" HAVE_GETPWNAM_R) check_symbol_exists(getpwuid_r "${CFG_HEADERS}" HAVE_GETPWUID_R) +check_symbol_exists(getpwuid "${CFG_HEADERS}" HAVE_GETPWUID) check_symbol_exists(htole64 "${CFG_HEADERS}" HAVE_HTOLE64) check_symbol_exists(if_nameindex "${CFG_HEADERS}" HAVE_IF_NAMEINDEX) check_symbol_exists(linkat "${CFG_HEADERS}" HAVE_LINKAT) @@ -1036,12 +1086,15 @@ check_symbol_exists(pipe "${CFG_HEADERS}" HAVE_PIPE) check_symbol_exists(pipe2 "${CFG_HEADERS}" HAVE_PIPE2) check_symbol_exists(posix_fadvise "${CFG_HEADERS}" HAVE_POSIX_FADVISE) check_symbol_exists(posix_fallocate "${CFG_HEADERS}" HAVE_POSIX_FALLOCATE) +check_symbol_exists(posix_openpt "${CFG_HEADERS}" HAVE_POSIX_OPENPT) check_symbol_exists(posix_spawn "${CFG_HEADERS}" HAVE_POSIX_SPAWN) check_symbol_exists(posix_spawnp "${CFG_HEADERS}" HAVE_POSIX_SPAWNP) +check_symbol_exists(posix_spawn_file_actions_addclosefrom_np "${CFG_HEADERS}" HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP) check_symbol_exists(pread "${CFG_HEADERS}" HAVE_PREAD) check_symbol_exists(preadv "${CFG_HEADERS}" HAVE_PREADV) check_symbol_exists(preadv2 "${CFG_HEADERS}" HAVE_PREADV2) check_symbol_exists(prlimit "${CFG_HEADERS}" HAVE_PRLIMIT) +check_symbol_exists(process_vm_readv "${CFG_HEADERS}" HAVE_PROCESS_VM_READV) cmake_push_check_state() list(APPEND CMAKE_REQUIRED_LIBRARIES pthread) @@ -1070,11 +1123,15 @@ check_symbol_exists(strsignal "${CFG_HEADERS}" HAVE_STRSIGNAL) check_symbol_exists(sigtimedwait "${CFG_HEADERS}" HAVE_SIGTIMEDWAIT) check_symbol_exists(sigwait "${CFG_HEADERS}" HAVE_SIGWAIT) check_symbol_exists(sigwaitinfo "${CFG_HEADERS}" HAVE_SIGWAITINFO) +check_symbol_exists(splice "${CFG_HEADERS}" HAVE_SPLICE) check_symbol_exists(strlcpy "${CFG_HEADERS}" HAVE_STRLCPY) check_symbol_exists(symlinkat "${CFG_HEADERS}" HAVE_SYMLINKAT) check_symbol_exists(sync "${CFG_HEADERS}" HAVE_SYNC) +check_symbol_exists(timerfd_create "${CFG_HEADERS}" HAVE_TIMERFD_CREATE) check_symbol_exists(unlinkat "${CFG_HEADERS}" HAVE_UNLINKAT) +check_symbol_exists(unlockpt "${CFG_HEADERS}" HAVE_UNLOCKPT) check_symbol_exists(utimensat "${CFG_HEADERS}" HAVE_UTIMENSAT) +check_symbol_exists(vfork "${CFG_HEADERS}" HAVE_VFORK) check_symbol_exists(waitid "${CFG_HEADERS}" HAVE_WAITID) check_symbol_exists(wcsftime "${CFG_HEADERS}" HAVE_WCSFTIME) check_symbol_exists(wcsxfrm "${CFG_HEADERS}" HAVE_WCSXFRM) @@ -1676,6 +1733,24 @@ if(NOT HAVE_CLOCK_GETTIME) endif() endif() +cmake_push_check_state() +set(check_src ${PROJECT_BINARY_DIR}/CMakeFiles/clock_nanosleep.c) +file(WRITE ${check_src} " +#include +#include +int main() { return clock_nanosleep(0, 0, NULL, NULL); } +") +if(SUPPORT_NO_WEAK_IMPORT_FLAG) + set(CMAKE_REQUIRED_FLAGS "-Wl,-no_weak_imports") +endif() +python_platform_test( + HAVE_CLOCK_NANOSLEEP + "Checking for clock_nanosleep" + ${check_src} + DIRECT + ) +cmake_pop_check_state() + cmake_push_check_state() set(check_src ${PROJECT_BINARY_DIR}/CMakeFiles/clock_settime.c) file(WRITE ${check_src} " @@ -1718,6 +1793,24 @@ if(NOT HAVE_CLOCK_SETTIME) endif() endif() +cmake_push_check_state() +set(check_src ${PROJECT_BINARY_DIR}/CMakeFiles/nanosleep.c) +file(WRITE ${check_src} " +#include +#include +int main() { return nanosleep(NULL, NULL); } +") +if(SUPPORT_NO_WEAK_IMPORT_FLAG) + set(CMAKE_REQUIRED_FLAGS "-Wl,-no_weak_imports") +endif() +python_platform_test( + HAVE_NANOSLEEP + "Checking for nanosleep" + ${check_src} + DIRECT + ) +cmake_pop_check_state() + endif() ####################################################################### @@ -1939,6 +2032,7 @@ check_symbol_exists(getservbyname "${CFG_HEADERS}" HAVE_GETSERVBYNAME) check_symbol_exists(getservbyport "${CFG_HEADERS}" HAVE_GETSERVBYPORT) check_symbol_exists(hstrerror "${CFG_HEADERS}" HAVE_HSTRERROR) check_symbol_exists(inet_aton "${CFG_HEADERS}" HAVE_INET_ATON) +check_symbol_exists(inet_ntoa "${CFG_HEADERS}" HAVE_INET_NTOA) if(NOT HAVE_INET_ATON) check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV) endif() @@ -1986,6 +2080,7 @@ endif() check_symbol_exists(pthread_sigmask "${CFG_HEADERS}" HAVE_PTHREAD_SIGMASK) check_symbol_exists(pthread_atfork "${CFG_HEADERS}" HAVE_PTHREAD_ATFORK) check_symbol_exists(pthread_condattr_setclock "${CFG_HEADERS}" HAVE_PTHREAD_CONDATTR_SETCLOCK) +check_symbol_exists(pthread_cond_timedwait_relative_np "${CFG_HEADERS}" HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP) check_symbol_exists(pthread_getcpuclockid "${CFG_HEADERS}" HAVE_PTHREAD_GETCPUCLOCKID) add_cond(CFG_HEADERS HAVE_SEMAPHORE_H semaphore.h) @@ -2120,6 +2215,7 @@ if(HAVE_READLINE_READLINE_H) check_symbol_exists(rl_completion_matches "${CFG_HEADERS}" HAVE_RL_COMPLETION_MATCHES) check_symbol_exists(rl_pre_input_hook "${CFG_HEADERS}" HAVE_RL_PRE_INPUT_HOOK) check_symbol_exists(rl_resize_terminal "${CFG_HEADERS}" HAVE_RL_RESIZE_TERMINAL) + check_symbol_exists(rl_compdisp_func_t "${CFG_HEADERS}" HAVE_RL_COMPDISP_FUNC_T) set(CFG_HEADERS ${CFG_HEADERS_SAVE}) cmake_pop_check_state() @@ -2157,6 +2253,24 @@ if(HAVE_CURSES_H) cmake_pop_check_state() endif() +####################################################################### +# +# libffi tests +# +####################################################################### + +if(LibFFI_INCLUDE_DIR) + cmake_push_check_state() + set(CFG_HEADERS_SAVE ${CFG_HEADERS}) + + set(CFG_HEADERS ${CFG_HEADERS} ffi.h) + check_symbol_exists(ffi_closure_alloc "${CFG_HEADERS}" HAVE_FFI_CLOSURE_ALLOC) + check_symbol_exists(ffi_prep_cif_var "${CFG_HEADERS}" HAVE_FFI_PREP_CIF_VAR) + check_symbol_exists(ffi_prep_closure_loc "${CFG_HEADERS}" HAVE_FFI_PREP_CLOSURE_LOC) + + set(CFG_HEADERS ${CFG_HEADERS_SAVE}) + cmake_pop_check_state() +endif() ####################################################################### # @@ -2239,6 +2353,7 @@ check_type_size("uint32_t" HAVE_UINT32_T) check_type_size("int32_t" HAVE_INT32_T) if(IS_PY3) check_type_size("__uint128_t" HAVE_GCC_UINT128_T) +check_type_size("__uint128_t" HAVE___UINT128_T) endif() unset(CMAKE_EXTRA_INCLUDE_FILES) diff --git a/cmake/config-unix/pyconfig.h.in b/cmake/config-unix/pyconfig.h.in index 86037bb..4b16e66 100644 --- a/cmake/config-unix/pyconfig.h.in +++ b/cmake/config-unix/pyconfig.h.in @@ -138,6 +138,9 @@ /* Has builtin atomics [Python 3] */ #cmakedefine HAVE_BUILTIN_ATOMIC 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_BZLIB_H 1 + /* Define this if you have the type _Bool. */ #cmakedefine HAVE_C99_BOOL 1 @@ -162,9 +165,21 @@ /* Define to 1 if you have the `clock_gettime' function. [Python 3] */ #cmakedefine HAVE_CLOCK_GETTIME 1 +/* Define to 1 if you have the `clock_nanosleep' function. [Python 3.11] */ +#cmakedefine HAVE_CLOCK_NANOSLEEP 1 + /* Define to 1 if you have the `clock_settime' function. [Python 3.6] */ #cmakedefine HAVE_CLOCK_SETTIME 1 +/* Define to 1 if the system has the type `clock_t'. [Python 3.13] */ +#cmakedefine HAVE_CLOCK_T 1 + +/* Define to 1 if you have the `closefrom' function. [Python 3.13] */ +#cmakedefine HAVE_CLOSEFROM 1 + +/* Define to 1 if you have the `close_range' function. [Python 3.10] */ +#cmakedefine HAVE_CLOSE_RANGE 1 + /* Define if the C compiler supports computed gotos. */ #cmakedefine HAVE_COMPUTED_GOTOS 1 @@ -231,6 +246,9 @@ /* Define if you have the 'wchgat' function. [Python 3.6] */ #cmakedefine HAVE_CURSES_WCHGAT 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_DB_H 1 + /* Define to 1 if you have the declaration of `isfinite', and to 0 if you don't. */ #cmakedefine HAVE_DECL_ISFINITE 1 @@ -307,6 +325,9 @@ /* Define to 1 if you have the `dlopen' function. */ #cmakedefine HAVE_DLOPEN 1 +/* Define to 1 if you have the `dup' function. [Python 3.11] */ +#cmakedefine HAVE_DUP 1 + /* Define to 1 if you have the `dup2' function. */ #cmakedefine HAVE_DUP2 1 @@ -319,6 +340,9 @@ /* Defined when any dynamic module loading is enabled. */ #cmakedefine HAVE_DYNAMIC_LOADING 1 +/* Define to 1 if you have the header file. [Python 3.12] */ +#cmakedefine HAVE_EDITLINE_READLINE_H 1 + /* Define to 1 if you have the header file. [Python 3] */ #cmakedefine HAVE_ENDIAN_H 1 @@ -337,6 +361,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ERRNO_H 1 +/* Define if you have the 'eventfd' function. [Python 3.10] */ +#cmakedefine HAVE_EVENTFD 1 + /* Define to 1 if you have the `execv' function. */ #cmakedefine HAVE_EXECV 1 @@ -382,6 +409,15 @@ /* Define to 1 if you have the `fexecve' function. [Python 3] */ #cmakedefine HAVE_FEXECVE 1 +/* Define if you have the 'ffi_closure_alloc' function. [Python 3.12] */ +#cmakedefine HAVE_FFI_CLOSURE_ALLOC 1 + +/* Define if you have the 'ffi_prep_cif_var' function. [Python 3.12] */ +#cmakedefine HAVE_FFI_PREP_CIF_VAR 1 + +/* Define if you have the 'ffi_prep_closure_loc' function. [Python 3.12] */ +#cmakedefine HAVE_FFI_PREP_CLOSURE_LOC 1 + /* Define to 1 if you have the `finite' function. */ #cmakedefine HAVE_FINITE 1 @@ -391,6 +427,9 @@ /* Define to 1 if you have the `fork' function. */ #cmakedefine HAVE_FORK 1 +/* Define to 1 if you have the `fork1' function. [Python 3.11] */ +#cmakedefine HAVE_FORK1 1 + /* Define to 1 if you have the `forkpty' function. */ #cmakedefine HAVE_FORKPTY 1 @@ -452,6 +491,15 @@ /* Define if your compiler provides __uint128_t [Python 3] */ #cmakedefine HAVE_GCC_UINT128_T 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_GDBM_DASH_NDBM_H 1 + +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_GDBM_H 1 + +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_GDBM_NDBM_H 1 + /* Define if you have the getaddrinfo function. */ #cmakedefine HAVE_GETADDRINFO 1 @@ -464,15 +512,21 @@ /* Define to 1 if you have the `getegid' function. [Python 3.11] */ #cmakedefine HAVE_GETEGID 1 -/* Define to 1 if you have the `geteuid' function. [Python 3.11] */ -#cmakedefine HAVE_GETEUID 1 - /* Define to 1 if you have the `getentropy' function. [Python 3] */ #cmakedefine HAVE_GETENTROPY 1 +/* Define to 1 if you have the `geteuid' function. [Python 3.11] */ +#cmakedefine HAVE_GETEUID 1 + /* Define to 1 if you have the `getgid' function. [Python 3.1] */ #cmakedefine HAVE_GETGID 1 +/* Define to 1 if you have the `getgrent' function. [Python 3.13] */ +#cmakedefine HAVE_GETGRENT 1 + +/* Define to 1 if you have the `getgrgid' function. [Python 3.11] */ +#cmakedefine HAVE_GETGRGID 1 + /* Define to 1 if you have the `getgrgid_r' function. [Python 3.8] */ #cmakedefine HAVE_GETGRGID_R 1 @@ -539,12 +593,18 @@ /* Define to 1 if you have the `getpriority' function. */ #cmakedefine HAVE_GETPRIORITY 1 +/* Define if you have the 'getprotobyname' function. [Python 3.11] */ +#cmakedefine HAVE_GETPROTOBYNAME 1 + /* Define to 1 if you have the `getpwent' function. */ #cmakedefine HAVE_GETPWENT 1 /* Define to 1 if you have the `getpwnam_r' function. [Python 3.8] */ #cmakedefine HAVE_GETPWNAM_R 1 +/* Define to 1 if you have the `getpwuid' function. [Python 3.11] */ +#cmakedefine HAVE_GETPWUID 1 + /* Define to 1 if you have the `getpwuid_r' function. [Python 3.8] */ #cmakedefine HAVE_GETPWUID_R 1 @@ -594,6 +654,9 @@ bcopy. [Python 3] */ #cmakedefine HAVE_GLIBC_MEMMOVE_BUG 1 +/* Define to 1 if you have the `grantpt' function. [Python 3.13] */ +#cmakedefine HAVE_GRANTPT 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_GRP_H 1 @@ -615,6 +678,9 @@ /* Define if you have the 'inet_aton' function. */ #cmakedefine HAVE_INET_ATON 1 +/* Define if you have the 'inet_ntoa' function. [Python 3.11] */ +#cmakedefine HAVE_INET_NTOA 1 + /* Define if you have the 'inet_pton' function. */ #cmakedefine HAVE_INET_PTON 1 @@ -666,18 +732,30 @@ /* Define to 1 if you have the `lgamma' function. */ #cmakedefine HAVE_LGAMMA 1 +/* Define to 1 if you want to build _blake2 module with libb2 [Python 3.11] */ +#cmakedefine HAVE_LIBB2 1 + +/* Define to 1 if you have the `db' library (-ldb). [Python 3.11] */ +#cmakedefine HAVE_LIBDB 1 + /* Define to 1 if you have the `dl' library (-ldl). */ #cmakedefine HAVE_LIBDL 1 /* Define to 1 if you have the `dld' library (-ldld). */ #cmakedefine HAVE_LIBDLD 1 +/* Define to 1 if you have the `gdbm_compat' library (-lgdbm_compat). [Python 3.11] */ +#cmakedefine HAVE_LIBGDBM_COMPAT 1 + /* Define to 1 if you have the `ieee' library (-lieee). */ #cmakedefine HAVE_LIBIEEE 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_LIBINTL_H 1 +/* Define to 1 if you have the `ndbm' library (-lndbm). [Python 3.11] */ +#cmakedefine HAVE_LIBNDBM 1 + /* Define if you have the readline library (-lreadline). */ #cmakedefine HAVE_LIBREADLINE 1 @@ -687,6 +765,9 @@ /* Define to 1 if you have the `sendfile' library (-lsendfile). [Python 3] */ #cmakedefine HAVE_LIBSENDFILE 1 +/* Define to 1 if you have the `sqlite3' library (-lsqlite3). [Python 3.11] */ +#cmakedefine HAVE_LIBSQLITE3 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_LIBUTIL_H 1 @@ -720,6 +801,12 @@ /* Define if compiling using Linux 4.1 or later. [Python 3.9] */ #cmakedefine HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1 +/* Define to 1 if you have the header file. [Python 3.12] */ +#cmakedefine HAVE_LINUX_FS_H 1 + +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_LINUX_LIMITS_H 1 + /* Define to 1 if you have the header file. [Python 3.8] */ #cmakedefine HAVE_LINUX_MEMFD_H 1 @@ -732,6 +819,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_LINUX_RANDOM_H 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_LINUX_SOUNDCARD_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_LINUX_TIPC_H 1 @@ -753,6 +843,9 @@ /* Define to 1 if you have the `log2' function. [Python 3] */ #cmakedefine HAVE_LOG2 1 +/* Define to 1 if you have the `login_tty' function. [Python 3.11] */ +#cmakedefine HAVE_LOGIN_TTY 1 + /* Define this if you have the type long double. */ #cmakedefine HAVE_LONG_DOUBLE 1 @@ -765,6 +858,9 @@ /* Define to 1 if you have the `lutimes' function. [Python 3] */ #cmakedefine HAVE_LUTIMES 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_LZMA_H 1 + /* Define to 1 if you have the `madvise' function. [Python 3.8] */ #cmakedefine HAVE_MADVISE 1 @@ -786,6 +882,9 @@ /* Define to 1 if you have the `memrchr' function. [Python 3] */ #cmakedefine HAVE_MEMRCHR 1 +/* Define to 1 if you have the header file. [Python 3.12] */ +#cmakedefine HAVE_MINIX_CONFIG_H 1 + /* Define to 1 if you have the `mkdirat' function. [Python 3] */ #cmakedefine HAVE_MKDIRAT 1 @@ -810,27 +909,60 @@ /* Define to 1 if you have the `mremap' function. */ #cmakedefine HAVE_MREMAP 1 +/* Define to 1 if you have the `nanosleep' function. [Python 3.11] */ +#cmakedefine HAVE_NANOSLEEP 1 + +/* Define if you have the 'ncurses' library [Python 3.13] */ +#cmakedefine HAVE_NCURSES 1 + +/* Define to 1 if you have the `ncursesw' library. [Python 3.12] */ +#cmakedefine HAVE_NCURSESW 1 + +/* Define to 1 if you have the header file. [Python 3.13] */ +#cmakedefine HAVE_NCURSESW_CURSES_H 1 + +/* Define to 1 if you have the header file. [Python 3.13] */ +#cmakedefine HAVE_NCURSESW_NCURSES_H 1 + +/* Define to 1 if you have the header file. [Python 3.13] */ +#cmakedefine HAVE_NCURSESW_PANEL_H 1 + +/* Define to 1 if you have the header file. [Python 3.13] */ +#cmakedefine HAVE_NCURSES_CURSES_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NCURSES_H 1 -/* Define to 1 if you have the header file. */ +/* Define to 1 if you have the header file. [Python 3.13] */ +#cmakedefine HAVE_NCURSES_NCURSES_H 1 + +/* Define to 1 if you have the header file. [Python 3.13] */ #cmakedefine HAVE_NCURSES_PANEL_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NCURSESW_PANEL_H 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_NDBM_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_PANEL_H 1 +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#cmakedefine HAVE_NDIR_H 1 + +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_NETCAN_CAN_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETDB_H 1 -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#cmakedefine HAVE_NDIR_H 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. [Python 3.13] */ +#cmakedefine HAVE_NETLINK_NETLINK_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETPACKET_PACKET_H 1 +/* Define to 1 if you have the header file. [Python 3.12] */ +#cmakedefine HAVE_NET_ETHERNET_H 1 + /* Define to 1 if you have the header file. [Python 3] */ #cmakedefine HAVE_NET_IF_H 1 @@ -853,6 +985,15 @@ /* Define if compiling using MacOS X 10.5 SDK or later. */ #cmakedefine HAVE_OSX105_SDK 1 +/* Define if you have the 'panel' library [Python 3.13] */ +#cmakedefine HAVE_PANEL 1 + +/* Define if you have the 'panelw' library [Python 3.13] */ +#cmakedefine HAVE_PANELW 1 + +/* Define to 1 if you have the header file. [Python 3.12] */ +#cmakedefine HAVE_PANEL_H 1 + /* Define to 1 if you have the `pathconf' function. */ #cmakedefine HAVE_PATHCONF 1 @@ -880,12 +1021,19 @@ /* Define to 1 if you have the `posix_fallocate' function. [Python 3] */ #cmakedefine HAVE_POSIX_FALLOCATE 1 +/* Define to 1 if you have the `posix_openpt' function. [Python 3.13] */ +#cmakedefine HAVE_POSIX_OPENPT 1 + /* Define to 1 if you have the `posix_spawn' function. [Python 3.7] */ #cmakedefine HAVE_POSIX_SPAWN 1 /* Define to 1 if you have the `posix_spawnp' function. [Python 3.8] */ #cmakedefine HAVE_POSIX_SPAWNP 1 +/* Define to 1 if you have the `posix_spawn_file_actions_addclosefrom_np' + function. [Python 3.13] */ +#cmakedefine HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP 1 + /* Define to 1 if you have the `pread' function. [Python 3] */ #cmakedefine HAVE_PREAD 1 @@ -904,6 +1052,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_PROCESS_H 1 +/* Define to 1 if you have the `process_vm_readv' function. [Python 3.13] */ +#cmakedefine HAVE_PROCESS_VM_READV 1 + /* Define if your compiler supports function prototype */ #cmakedefine HAVE_PROTOTYPES 1 @@ -916,6 +1067,9 @@ /* Define to 1 if you have the `pthread_condattr_setclock' function. [Python 3.8] */ #cmakedefine HAVE_PTHREAD_CONDATTR_SETCLOCK 1 +/* Define to 1 if you have the `pthread_cond_timedwait_relative_np' function. [Python 3.13] */ +#cmakedefine HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 1 + /* Defined for Solaris 2.6 bug in pthread header. */ #cmakedefine HAVE_PTHREAD_DESTRUCTOR 1 @@ -934,6 +1088,15 @@ /* Define to 1 if you have the `pthread_sigmask' function. */ #cmakedefine HAVE_PTHREAD_SIGMASK 1 +/* Define if platform requires stubbed pthreads support [Python 3.11] */ +#cmakedefine HAVE_PTHREAD_STUBS 1 + +/* Define to 1 if you have the `ptsname' function. [Python 3.13] */ +#cmakedefine HAVE_PTSNAME 1 + +/* Define to 1 if you have the `ptsname_r' function. [Python 3.13] */ +#cmakedefine HAVE_PTSNAME_R 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_PTY_H 1 @@ -949,6 +1112,9 @@ /* Define to 1 if you have the `pwritev2' function. [Python 3.7] */ #cmakedefine HAVE_PWRITEV2 1 +/* Define to 1 if you have the header file. [Python 3.12] */ +#cmakedefine HAVE_READLINE_READLINE_H 1 + /* Define if the libcrypto has RAND_egd [Python 3] */ #cmakedefine HAVE_RAND_EGD 1 @@ -979,6 +1145,9 @@ /* Define if you can turn off readline's signal handling. */ #cmakedefine HAVE_RL_CATCH_SIGNAL 1 +/* Define if readline supports rl_compdisp_func_t [Python 3.11] */ +#cmakedefine HAVE_RL_COMPDISP_FUNC_T 1 + /* Define if you have readline 2.2 */ #cmakedefine HAVE_RL_COMPLETION_APPEND_CHARACTER 1 @@ -1000,6 +1169,9 @@ /* Define to 1 if you have the `round' function. */ #cmakedefine HAVE_ROUND 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_RPC_RPC_H 1 + /* Define to 1 if you have the `rtpSpawn' function. [Python 3.8] */ #cmakedefine HAVE_RTPSPAWN 1 @@ -1063,9 +1235,15 @@ /* Define to 1 if you have the `setitimer' function. */ #cmakedefine HAVE_SETITIMER 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_SETJMP_H 1 + /* Define to 1 if you have the `setlocale' function. */ #cmakedefine HAVE_SETLOCALE 1 +/* Define to 1 if you have the `setns' function. [Python 3.12] */ +#cmakedefine HAVE_SETNS 1 + /* Define to 1 if you have the `setpgid' function. */ #cmakedefine HAVE_SETPGID 1 @@ -1165,9 +1343,15 @@ /* Define if you have the 'socketpair' function. */ #cmakedefine HAVE_SOCKETPAIR 1 +/* Define to 1 if the system has the type `socklen_t'. [Python 3.13] */ +#cmakedefine HAVE_SOCKLEN_T 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SPAWN_H 1 +/* Define to 1 if you have the `splice' function. [Python 3.10] */ +#cmakedefine HAVE_SPLICE 1 + /* Define if your compiler provides ssize_t */ #cmakedefine HAVE_SSIZE_T 1 @@ -1187,6 +1371,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. [Python 3.12] */ +#cmakedefine HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDLIB_H 1 @@ -1263,6 +1450,12 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYSEXITS_H 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_SYSLOG_H 1 + +/* Define to 1 if you have the `system' function. [Python 3.11] */ +#cmakedefine HAVE_SYSTEM 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_AUDIOIO_H 1 @@ -1285,6 +1478,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_EPOLL_H 1 +/* Define to 1 if you have the header file. [Python 3.10] */ +#cmakedefine HAVE_SYS_EVENTFD_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_EVENT_H 1 @@ -1340,6 +1536,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_SOCKET_H 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_SYS_SOUNDCARD_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_STATVFS_H 1 @@ -1358,6 +1557,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_TERMIO_H 1 +/* Define to 1 if you have the header file. [Python 3.13] */ +#cmakedefine HAVE_SYS_TIMERFD_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_TIMES_H 1 @@ -1406,6 +1608,9 @@ /* Define to 1 if you have the `timegm' function. */ #cmakedefine HAVE_TIMEGM 1 +/* Define if you have the 'timerfd_create' function. [Python 3.13] */ +#cmakedefine HAVE_TIMERFD_CREATE 1 + /* Define to 1 if you have the `times' function. */ #cmakedefine HAVE_TIMES 1 @@ -1456,6 +1661,12 @@ /* Define to 1 if you have the `unlinkat' function. [Python 3] */ #cmakedefine HAVE_UNLINKAT 1 +/* Define to 1 if you have the `unlockpt' function. [Python 3.13] */ +#cmakedefine HAVE_UNLOCKPT 1 + +/* Define to 1 if you have the `unshare' function. [Python 3.12] */ +#cmakedefine HAVE_UNSHARE 1 + /* Define to 1 if you have the `unsetenv' function. */ #cmakedefine HAVE_UNSETENV 1 @@ -1476,6 +1687,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UTIME_H 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_UTMP_H 1 + /* Define if uuid_create() exists. [Python 3.7] */ #cmakedefine HAVE_UUID_CREATE 1 @@ -1491,6 +1705,9 @@ /* Define to 1 if you have the header file. [Python 3.7] */ #cmakedefine HAVE_UUID_UUID_H 1 +/* Define to 1 if you have the `vfork' function. [Python 3.10] */ +#cmakedefine HAVE_VFORK 1 + /* Define to 1 if you have the `wait' function. [Python 3.11] */ #cmakedefine HAVE_WAIT 1 @@ -1534,9 +1751,15 @@ /* Define if the zlib library has inflateCopy */ #cmakedefine HAVE_ZLIB_COPY 1 +/* Define to 1 if you have the header file. [Python 3.11] */ +#cmakedefine HAVE_ZLIB_H 1 + /* Define to 1 if you have the `_getpty' function. */ #cmakedefine HAVE__GETPTY 1 +/* Define to 1 if the system has the type `__uint128_t'. [Python 3.13] */ +#cmakedefine HAVE___UINT128_T 1 + /* Define if you are using Mach cthreads directly under /include [Python 2.7] */ #cmakedefine HURD_C_THREADS 1 @@ -1596,6 +1819,15 @@ /* Define to printf format modifier for Py_ssize_t */ #cmakedefine PY_FORMAT_SIZE_T "@PY_FORMAT_SIZE_T@" +/* Define to 1 if you have the perf trampoline. */ +#cmakedefine PY_HAVE_PERF_TRAMPOLINE 1 + +/* Define to 1 to build the sqlite module with loadable extensions support. [Python 3.11] */ +#cmakedefine PY_SQLITE_ENABLE_LOAD_EXTENSION 1 + +/* Define if SQLite was compiled with the serialize API [Python 3.11] */ +#cmakedefine PY_SQLITE_HAVE_SERIALIZE 1 + /* Default cipher suites list for ssl module. 1: Python's preferred selection, 2: leave OpenSSL defaults untouched, 0: custom string [Python 3.7] */ #cmakedefine PY_SSL_DEFAULT_CIPHERS @PY_SSL_DEFAULT_CIPHERS@ @@ -1603,6 +1835,9 @@ /* Cipher suite string for PY_SSL_DEFAULT_CIPHERS=0 [Python 3.7] */ #cmakedefine PY_SSL_DEFAULT_CIPHER_STRING "@PY_SSL_DEFAULT_CIPHER_STRING@" +/* PEP 11 Support tier (1, 2, 3 or 0 for unsupported) [Python 3.11] */ +#cmakedefine PY_SUPPORT_TIER @PY_SUPPORT_TIER@ + /* Define as the integral type used for Unicode representation. [Python 2.7] */ #cmakedefine PY_UNICODE_TYPE @PY_UNICODE_TYPE@ @@ -1612,7 +1847,7 @@ /* Defined if Python is built as a shared library. */ #cmakedefine Py_ENABLE_SHARED -/* Define if you want to disable the GIL */ +/* Define if you want to disable the GIL [Python 3.13] */ #cmakedefine Py_GIL_DISABLED 1 /* Define as the size of the unicode type. [Python 2.7] */ @@ -1628,6 +1863,15 @@ externally defined: 0 [Python 3] */ #cmakedefine Py_HASH_ALGORITHM 1 +/* Define if rl_startup_hook takes arguments [Python 3.13] */ +#cmakedefine Py_RL_STARTUP_HOOK_TAKES_ARGS 1 + +/* Define if you want to enable internal statistics gathering. [Python 3.11] */ +#cmakedefine Py_STATS 1 + +/* The version of SunOS/Solaris as reported by `uname -r' without the dot. [Python 3.11] */ +#cmakedefine Py_SUNOS_VERSION @Py_SUNOS_VERSION@ + /* Define if you want to enable tracing references for debugging purpose [Python 3.8] */ #cmakedefine Py_TRACE_REFS 1 @@ -1657,10 +1901,9 @@ /* The size of `long', as computed by sizeof. */ #cmakedefine SIZEOF_LONG @SIZEOF_LONG@ -#cmakedefine ALIGNOF_LONG @SIZEOF_LONG@ /* The size of `long', as computed by alignof. */ -#cmakedefine ALIGNOF_LONG @SIZEOF_LONG@ +#cmakedefine ALIGNOF_LONG @ALIGNOF_LONG@ /* The size of `long double', as computed by sizeof. */ #cmakedefine SIZEOF_LONG_DOUBLE @SIZEOF_LONG_DOUBLE@ @@ -1668,6 +1911,9 @@ /* The size of `long long', as computed by sizeof. */ #cmakedefine SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@ +/* The size of `max_align_t`, as computed by sizeof. [Python 3.12] */ +#cmakedefine ALIGNOF_MAX_ALIGN_T @ALIGNOF_MAX_ALIGN_T@ + /* The size of `off_t', as computed by sizeof. */ #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@ @@ -1685,10 +1931,9 @@ /* The size of `size_t', as computed by sizeof. */ #cmakedefine SIZEOF_SIZE_T @SIZEOF_SIZE_T@ -#cmakedefine ALIGNOF_SIZE_T @SIZEOF_SIZE_T@ /* The size of `size_t', as computed by alignof. */ -#cmakedefine ALIGNOF_SIZE_T @SIZEOF_SIZE_T@ +#cmakedefine ALIGNOF_SIZE_T @ALIGNOF_SIZE_T@ /* The size of `time_t', as computed by sizeof. */ #cmakedefine SIZEOF_TIME_T @SIZEOF_TIME_T@ @@ -1715,6 +1960,9 @@ /* Define if tanh(-0.) is -0., or if platform doesn't have signed zeros */ #cmakedefine TANH_PRESERVES_ZERO_SIGN 1 +/* Custom thread stack size depending on chosen sanitizer runtimes. [Python 3.10] */ +#cmakedefine THREAD_STACK_SIZE @THREAD_STACK_SIZE@ + /* Library needed by timemodule.c: librt may be needed for clock_gettime() */ #cmakedefine TIMEMODULE_LIB 1 @@ -1783,12 +2031,18 @@ Dyld is necessary to support frameworks. */ #cmakedefine WITH_DYLD 1 +/* Define to build the readline module against Editline. [Python 3.10] */ +#cmakedefine WITH_EDITLINE 1 + /* Define if you want to compile in object freelists optimization */ #cmakedefine WITH_FREELISTS 1 /* Define to 1 if libintl is needed for locale functions. */ #cmakedefine WITH_LIBINTL 1 +/* Define if you want to compile in mimalloc memory allocator. [Python 3.13] */ +#cmakedefine WITH_MIMALLOC 1 + /* Define if you want to produce an OpenStep/Rhapsody framework (shared library plus accessory files). */ #cmakedefine WITH_NEXT_FRAMEWORK 1 @@ -1887,6 +2141,15 @@ #define below would cause a syntax error. */ /* #undef _UINT64_T */ +/* Define to 1 if you want to emulate getpid() on WASI [Python 3.11] */ +#cmakedefine _WASI_EMULATED_GETPID 1 + +/* Define to 1 if you want to emulate process clocks on WASI [Python 3.11] */ +#cmakedefine _WASI_EMULATED_PROCESS_CLOCKS 1 + +/* Define to 1 if you want to emulate signals on WASI [Python 3.11] */ +#cmakedefine _WASI_EMULATED_SIGNAL 1 + /* Define to the level of X/Open that your system supports */ #cmakedefine _XOPEN_SOURCE @_XOPEN_SOURCE@ diff --git a/cmake/extensions/CMakeLists.txt b/cmake/extensions/CMakeLists.txt index a1da61a..696a363 100644 --- a/cmake/extensions/CMakeLists.txt +++ b/cmake/extensions/CMakeLists.txt @@ -205,12 +205,22 @@ if(PY_VERSION VERSION_GREATER_EQUAL "3.6") # asyncio speedups add_python_extension(_asyncio SOURCES _asynciomodule.c) # blake module - set(_blake2_SOURCES - _blake2/blake2module.c - _blake2/blake2b_impl.c - _blake2/blake2s_impl.c - ) - add_python_extension(_blake2 ${WIN32_BUILTIN} SOURCES ${_blake2_SOURCES}) + if(PY_VERSION VERSION_GREATER_EQUAL "3.14") + # Python 3.14+ uses HACL* implementation + # TODO: add Hacl_Hash_Blake2b_Simd256 and Hacl_Hash_Blake2s_Simd128 + add_python_extension(_blake2 ${WIN32_BUILTIN} + SOURCES blake2module.c + _hacl/Hacl_Hash_Blake2b.c + _hacl/Hacl_Hash_Blake2s.c + INCLUDEDIRS ${SRC_DIR}/Modules/_hacl ${SRC_DIR}/Modules/_hacl/include) + else() + set(_blake2_SOURCES + _blake2/blake2module.c + _blake2/blake2b_impl.c + _blake2/blake2s_impl.c + ) + add_python_extension(_blake2 ${WIN32_BUILTIN} SOURCES ${_blake2_SOURCES}) + endif() if(PY_VERSION VERSION_LESS "3.12") add_python_extension(_sha3 ${WIN32_BUILTIN} SOURCES _sha3/sha3module.c) endif() @@ -220,7 +230,11 @@ endif() # Python 3.7 if(PY_VERSION VERSION_GREATER_EQUAL "3.7") add_python_extension(_abc BUILTIN SOURCES _abc.c) - add_python_extension(_contextvars ${WIN32_BUILTIN} SOURCES _contextvarsmodule.c) + if(PY_VERSION VERSION_GREATER_EQUAL "3.14") + add_python_extension(_contextvars ${WIN32_BUILTIN} SOURCES ${SRC_DIR}/Python/_contextvars.c) + else() + add_python_extension(_contextvars ${WIN32_BUILTIN} SOURCES _contextvarsmodule.c) + endif() add_python_extension(_queue SOURCES _queuemodule.c) add_python_extension(_uuid REQUIRES UUID_LIBRARY "HAVE_UUID_H OR HAVE_UUID_UUID_H" SOURCES _uuidmodule.c LIBRARIES ${UUID_LIBRARY}) add_python_extension(_xxtestfuzz SOURCES _xxtestfuzz/_xxtestfuzz.c diff --git a/cmake/libpython/CMakeLists.txt b/cmake/libpython/CMakeLists.txt index 36b97b9..16228a5 100644 --- a/cmake/libpython/CMakeLists.txt +++ b/cmake/libpython/CMakeLists.txt @@ -369,13 +369,21 @@ if(PY_VERSION VERSION_LESS "3.10") endif() if(PY_VERSION VERSION_GREATER_EQUAL "3.7") list(APPEND PYTHON_COMMON_SOURCES - ${SRC_DIR}/Python/ast_opt.c ${SRC_DIR}/Python/ast_unparse.c ${SRC_DIR}/Python/bootstrap_hash.c ${SRC_DIR}/Python/context.c ${SRC_DIR}/Python/hamt.c ${SRC_DIR}/Python/pathconfig.c ) + if(PY_VERSION VERSION_GREATER_EQUAL "3.14") + list(APPEND PYTHON_COMMON_SOURCES + ${SRC_DIR}/Python/ast_preprocess.c + ) + else() + list(APPEND PYTHON_COMMON_SOURCES + ${SRC_DIR}/Python/ast_opt.c + ) + endif() else() list(APPEND PYTHON_COMMON_SOURCES ${SRC_DIR}/Python/random.c