From b738d5cc1315fd0ade01aa24cd578330c894c181 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 11 Oct 2025 21:01:16 -0700 Subject: [PATCH 1/2] Fix compiler warning from misusing DECLARE_TARGET in typedef --- Tools/jit/trampoline.c | 2 +- confdefs.h | 240 ++++++++++++++++++++++++++++++++++++ conftest.c | 272 +++++++++++++++++++++++++++++++++++++++++ conftest.err | 0 4 files changed, 513 insertions(+), 1 deletion(-) create mode 100644 confdefs.h create mode 100644 conftest.c create mode 100644 conftest.err diff --git a/Tools/jit/trampoline.c b/Tools/jit/trampoline.c index 79d6af97961..a3bce4c5e34 100644 --- a/Tools/jit/trampoline.c +++ b/Tools/jit/trampoline.c @@ -10,7 +10,7 @@ _Py_CODEUNIT * _JIT_ENTRY( _PyExecutorObject *exec, _PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState *tstate ) { - typedef DECLARE_TARGET((*jit_func)); + typedef _Py_CODEUNIT *__attribute__((preserve_none)) (*jit_func)(_PyInterpreterFrame *, _PyStackRef *, PyThreadState *); jit_func jitted = (jit_func)exec->jit_code; return jitted(frame, stack_pointer, tstate); } diff --git a/confdefs.h b/confdefs.h new file mode 100644 index 00000000000..5e4de8a96c4 --- /dev/null +++ b/confdefs.h @@ -0,0 +1,240 @@ +/* confdefs.h */ +#define _NETBSD_SOURCE 1 +#define __BSD_VISIBLE 1 +#define _DARWIN_C_SOURCE 1 +#define _PYTHONFRAMEWORK "" +#define HAVE_STDIO_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_WCHAR_H 1 +#define STDC_HEADERS 1 +#define _ALL_SOURCE 1 +#define _DARWIN_C_SOURCE 1 +#define _GNU_SOURCE 1 +#define _HPUX_ALT_XOPEN_SOCKET_API 1 +#define _NETBSD_SOURCE 1 +#define _OPENBSD_SOURCE 1 +#define _POSIX_PTHREAD_SEMANTICS 1 +#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#define __STDC_WANT_IEC_60559_EXT__ 1 +#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#define __STDC_WANT_LIB_EXT2__ 1 +#define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#define _TANDEM_SOURCE 1 +#define __EXTENSIONS__ 1 +#define PY_SUPPORT_TIER 1 +#define Py_DEBUG 1 +#define STDC_HEADERS 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_GRP_H 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_NET_ETHERNET_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_POLL_H 1 +#define HAVE_PTHREAD_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_SETJMP_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SPAWN_H 1 +#define HAVE_SYS_EVENT_H 1 +#define HAVE_SYS_FILE_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_KERN_CONTROL_H 1 +#define HAVE_SYS_LOCK_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_POLL_H 1 +#define HAVE_SYS_RANDOM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_STATVFS_H 1 +#define HAVE_SYS_SYS_DOMAIN_H 1 +#define HAVE_SYS_SYSCALL_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_SYS_WAIT_H 1 +#define HAVE_SYS_XATTR_H 1 +#define HAVE_SYSEXITS_H 1 +#define HAVE_SYSLOG_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_UTIL_H 1 +#define HAVE_UTIME_H 1 +#define HAVE_UTMP_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_CLOCK_T 1 +#define HAVE_MAKEDEV 1 +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#if defined(SCO_DS) +#undef _OFF_T +#endif +#define RETSIGTYPE void +#define HAVE_SSIZE_T 1 +#define HAVE___UINT128_T 1 +#define HAVE_GCC_UINT128_T 1 +#define SIZEOF_INT 4 +#define SIZEOF_LONG 8 +#define ALIGNOF_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_VOID_P 8 +#define SIZEOF_SHORT 2 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_FPOS_T 8 +#define SIZEOF_SIZE_T 8 +#define ALIGNOF_SIZE_T 8 +#define SIZEOF_PID_T 4 +#define SIZEOF_UINTPTR_T 8 +#define ALIGNOF_MAX_ALIGN_T 8 +#define HAVE_LONG_DOUBLE 1 +#define SIZEOF_LONG_DOUBLE 8 +#define SIZEOF__BOOL 1 +#define SIZEOF_OFF_T 8 +#define SIZEOF_TIME_T 8 +#define SIZEOF_PTHREAD_T 8 +#define SIZEOF_PTHREAD_KEY_T 8 +#define WITH_DYLD 1 +#define THREAD_STACK_SIZE 0x1000000 +#define PY_HAVE_PERF_TRAMPOLINE 1 +#define HAVE_LIBDL 1 +#define HAVE_EXECINFO_H 1 +#define HAVE_BACKTRACE 1 +#define HAVE_DLFCN_H 1 +#define HAVE_BACKTRACE 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_FFI_PREP_CIF_VAR 1 +#define HAVE_FFI_PREP_CLOSURE_LOC 1 +#define HAVE_FFI_CLOSURE_ALLOC 1 +#define _Py_FFI_SUPPORT_C_COMPLEX 1 +#define WITH_DECIMAL_CONTEXTVAR 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define PY_SQLITE_HAVE_SERIALIZE 1 +#define HAVE_NDBM_H 1 +#define HAVE_DB_H 1 +#define _REENTRANT 1 +#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 +#define HAVE_PTHREAD_SIGMASK 1 +#define ENABLE_IPV6 1 +#define WITH_DOC_STRINGS 1 +#define HAVE_STD_ATOMIC 1 +#define HAVE_BUILTIN_ATOMIC 1 +#define WITH_MIMALLOC 1 +#define WITH_PYMALLOC 1 +#define PY_COERCE_C_LOCALE 1 +#define HAVE_DLOPEN 1 +#define HAVE_DYNAMIC_LOADING 1 +#define HAVE_ALARM 1 +#define HAVE_CHMOD 1 +#define HAVE_CHOWN 1 +#define HAVE_CLOCK 1 +#define HAVE_CONFSTR 1 +#define HAVE_CTERMID 1 +#define HAVE_DLADDR 1 +#define HAVE_DUP 1 +#define HAVE_EXECV 1 +#define HAVE_FACCESSAT 1 +#define HAVE_FCHMOD 1 +#define HAVE_FCHMODAT 1 +#define HAVE_FCHOWN 1 +#define HAVE_FCHOWNAT 1 +#define HAVE_FDOPENDIR 1 +#define HAVE_FORK 1 +#define HAVE_FPATHCONF 1 +#define HAVE_FSTATAT 1 +#define HAVE_FTIME 1 +#define HAVE_FTRUNCATE 1 +#define HAVE_FUTIMENS 1 +#define HAVE_FUTIMES 1 +#define HAVE_GAI_STRERROR 1 +#define HAVE_GETEGID 1 +#define HAVE_GETEUID 1 +#define HAVE_GETGID 1 +#define HAVE_GETGRENT 1 +#define HAVE_GETGRGID 1 +#define HAVE_GETGRGID_R 1 +#define HAVE_GETGRNAM_R 1 +#define HAVE_GETGROUPLIST 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_GETITIMER 1 +#define HAVE_GETLOADAVG 1 +#define HAVE_GETLOGIN 1 +#define HAVE_GETLOGIN_R 1 +#define HAVE_GETPEERNAME 1 +#define HAVE_GETPGID 1 +#define HAVE_GETPID 1 +#define HAVE_GETPPID 1 +#define HAVE_GETPRIORITY 1 +#define HAVE_GETPWENT 1 +#define HAVE_GETPWNAM_R 1 +#define HAVE_GETPWUID 1 +#define HAVE_GETPWUID_R 1 +#define HAVE_GETRUSAGE 1 +#define HAVE_GETSID 1 +#define HAVE_GETUID 1 +#define HAVE_GETWD 1 +#define HAVE_GRANTPT 1 +#define HAVE_IF_NAMEINDEX 1 +#define HAVE_INITGROUPS 1 +#define HAVE_KILL 1 +#define HAVE_KILLPG 1 +#define HAVE_LCHOWN 1 +#define HAVE_LINKAT 1 +#define HAVE_LOCKF 1 +#define HAVE_LSTAT 1 +#define HAVE_LUTIMES 1 +#define HAVE_MADVISE 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MKDIRAT 1 +#define HAVE_MKFIFO 1 +#define HAVE_MKFIFOAT 1 +#define HAVE_MKNOD 1 +#define HAVE_MKNODAT 1 +#define HAVE_MKTIME 1 +#define HAVE_MMAP 1 +#define HAVE_NICE 1 +#define HAVE_OPENAT 1 +#define HAVE_OPENDIR 1 +#define HAVE_PATHCONF 1 +#define HAVE_PAUSE 1 +#define HAVE_PIPE 1 +#define HAVE_POLL 1 +#define HAVE_POSIX_OPENPT 1 +#define HAVE_POSIX_SPAWN 1 +#define HAVE_POSIX_SPAWNP 1 +#define HAVE_PREAD 1 +#define HAVE_PREADV 1 +#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 1 +#define HAVE_PTHREAD_KILL 1 +#define HAVE_PTHREAD_GETNAME_NP 1 +#define HAVE_PTHREAD_SETNAME_NP 1 +#define HAVE_PTSNAME 1 diff --git a/conftest.c b/conftest.c new file mode 100644 index 00000000000..c0b3b829fc0 --- /dev/null +++ b/conftest.c @@ -0,0 +1,272 @@ +/* confdefs.h */ +#define _NETBSD_SOURCE 1 +#define __BSD_VISIBLE 1 +#define _DARWIN_C_SOURCE 1 +#define _PYTHONFRAMEWORK "" +#define HAVE_STDIO_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_WCHAR_H 1 +#define STDC_HEADERS 1 +#define _ALL_SOURCE 1 +#define _DARWIN_C_SOURCE 1 +#define _GNU_SOURCE 1 +#define _HPUX_ALT_XOPEN_SOCKET_API 1 +#define _NETBSD_SOURCE 1 +#define _OPENBSD_SOURCE 1 +#define _POSIX_PTHREAD_SEMANTICS 1 +#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#define __STDC_WANT_IEC_60559_EXT__ 1 +#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#define __STDC_WANT_LIB_EXT2__ 1 +#define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#define _TANDEM_SOURCE 1 +#define __EXTENSIONS__ 1 +#define PY_SUPPORT_TIER 1 +#define Py_DEBUG 1 +#define STDC_HEADERS 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_GRP_H 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_NET_ETHERNET_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_POLL_H 1 +#define HAVE_PTHREAD_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_SETJMP_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SPAWN_H 1 +#define HAVE_SYS_EVENT_H 1 +#define HAVE_SYS_FILE_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_KERN_CONTROL_H 1 +#define HAVE_SYS_LOCK_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_POLL_H 1 +#define HAVE_SYS_RANDOM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_STATVFS_H 1 +#define HAVE_SYS_SYS_DOMAIN_H 1 +#define HAVE_SYS_SYSCALL_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_SYS_WAIT_H 1 +#define HAVE_SYS_XATTR_H 1 +#define HAVE_SYSEXITS_H 1 +#define HAVE_SYSLOG_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_UTIL_H 1 +#define HAVE_UTIME_H 1 +#define HAVE_UTMP_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_CLOCK_T 1 +#define HAVE_MAKEDEV 1 +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#if defined(SCO_DS) +#undef _OFF_T +#endif +#define RETSIGTYPE void +#define HAVE_SSIZE_T 1 +#define HAVE___UINT128_T 1 +#define HAVE_GCC_UINT128_T 1 +#define SIZEOF_INT 4 +#define SIZEOF_LONG 8 +#define ALIGNOF_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_VOID_P 8 +#define SIZEOF_SHORT 2 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_FPOS_T 8 +#define SIZEOF_SIZE_T 8 +#define ALIGNOF_SIZE_T 8 +#define SIZEOF_PID_T 4 +#define SIZEOF_UINTPTR_T 8 +#define ALIGNOF_MAX_ALIGN_T 8 +#define HAVE_LONG_DOUBLE 1 +#define SIZEOF_LONG_DOUBLE 8 +#define SIZEOF__BOOL 1 +#define SIZEOF_OFF_T 8 +#define SIZEOF_TIME_T 8 +#define SIZEOF_PTHREAD_T 8 +#define SIZEOF_PTHREAD_KEY_T 8 +#define WITH_DYLD 1 +#define THREAD_STACK_SIZE 0x1000000 +#define PY_HAVE_PERF_TRAMPOLINE 1 +#define HAVE_LIBDL 1 +#define HAVE_EXECINFO_H 1 +#define HAVE_BACKTRACE 1 +#define HAVE_DLFCN_H 1 +#define HAVE_BACKTRACE 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_FFI_PREP_CIF_VAR 1 +#define HAVE_FFI_PREP_CLOSURE_LOC 1 +#define HAVE_FFI_CLOSURE_ALLOC 1 +#define _Py_FFI_SUPPORT_C_COMPLEX 1 +#define WITH_DECIMAL_CONTEXTVAR 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define HAVE_LIBSQLITE3 1 +#define PY_SQLITE_HAVE_SERIALIZE 1 +#define HAVE_NDBM_H 1 +#define HAVE_DB_H 1 +#define _REENTRANT 1 +#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 +#define HAVE_PTHREAD_SIGMASK 1 +#define ENABLE_IPV6 1 +#define WITH_DOC_STRINGS 1 +#define HAVE_STD_ATOMIC 1 +#define HAVE_BUILTIN_ATOMIC 1 +#define WITH_MIMALLOC 1 +#define WITH_PYMALLOC 1 +#define PY_COERCE_C_LOCALE 1 +#define HAVE_DLOPEN 1 +#define HAVE_DYNAMIC_LOADING 1 +#define HAVE_ALARM 1 +#define HAVE_CHMOD 1 +#define HAVE_CHOWN 1 +#define HAVE_CLOCK 1 +#define HAVE_CONFSTR 1 +#define HAVE_CTERMID 1 +#define HAVE_DLADDR 1 +#define HAVE_DUP 1 +#define HAVE_EXECV 1 +#define HAVE_FACCESSAT 1 +#define HAVE_FCHMOD 1 +#define HAVE_FCHMODAT 1 +#define HAVE_FCHOWN 1 +#define HAVE_FCHOWNAT 1 +#define HAVE_FDOPENDIR 1 +#define HAVE_FORK 1 +#define HAVE_FPATHCONF 1 +#define HAVE_FSTATAT 1 +#define HAVE_FTIME 1 +#define HAVE_FTRUNCATE 1 +#define HAVE_FUTIMENS 1 +#define HAVE_FUTIMES 1 +#define HAVE_GAI_STRERROR 1 +#define HAVE_GETEGID 1 +#define HAVE_GETEUID 1 +#define HAVE_GETGID 1 +#define HAVE_GETGRENT 1 +#define HAVE_GETGRGID 1 +#define HAVE_GETGRGID_R 1 +#define HAVE_GETGRNAM_R 1 +#define HAVE_GETGROUPLIST 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_GETITIMER 1 +#define HAVE_GETLOADAVG 1 +#define HAVE_GETLOGIN 1 +#define HAVE_GETLOGIN_R 1 +#define HAVE_GETPEERNAME 1 +#define HAVE_GETPGID 1 +#define HAVE_GETPID 1 +#define HAVE_GETPPID 1 +#define HAVE_GETPRIORITY 1 +#define HAVE_GETPWENT 1 +#define HAVE_GETPWNAM_R 1 +#define HAVE_GETPWUID 1 +#define HAVE_GETPWUID_R 1 +#define HAVE_GETRUSAGE 1 +#define HAVE_GETSID 1 +#define HAVE_GETUID 1 +#define HAVE_GETWD 1 +#define HAVE_GRANTPT 1 +#define HAVE_IF_NAMEINDEX 1 +#define HAVE_INITGROUPS 1 +#define HAVE_KILL 1 +#define HAVE_KILLPG 1 +#define HAVE_LCHOWN 1 +#define HAVE_LINKAT 1 +#define HAVE_LOCKF 1 +#define HAVE_LSTAT 1 +#define HAVE_LUTIMES 1 +#define HAVE_MADVISE 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MKDIRAT 1 +#define HAVE_MKFIFO 1 +#define HAVE_MKFIFOAT 1 +#define HAVE_MKNOD 1 +#define HAVE_MKNODAT 1 +#define HAVE_MKTIME 1 +#define HAVE_MMAP 1 +#define HAVE_NICE 1 +#define HAVE_OPENAT 1 +#define HAVE_OPENDIR 1 +#define HAVE_PATHCONF 1 +#define HAVE_PAUSE 1 +#define HAVE_PIPE 1 +#define HAVE_POLL 1 +#define HAVE_POSIX_OPENPT 1 +#define HAVE_POSIX_SPAWN 1 +#define HAVE_POSIX_SPAWNP 1 +#define HAVE_PREAD 1 +#define HAVE_PREADV 1 +#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 1 +#define HAVE_PTHREAD_KILL 1 +#define HAVE_PTHREAD_GETNAME_NP 1 +#define HAVE_PTHREAD_SETNAME_NP 1 +#define HAVE_PTSNAME 1 +/* end confdefs.h. */ +/* Define ptsname_r to an innocuous variant, in case declares ptsname_r. + For example, HP-UX 11i declares gettimeofday. */ +#define ptsname_r innocuous_ptsname_r + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char ptsname_r (void); below. */ + +#include +#undef ptsname_r + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ptsname_r (void); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_ptsname_r || defined __stub___ptsname_r +choke me +#endif + +int +main (void) +{ +return ptsname_r (); + ; + return 0; +} diff --git a/conftest.err b/conftest.err new file mode 100644 index 00000000000..e69de29bb2d From 2aeaaf3e0d384211aa40dc16d4cb2bd1e54ef0b0 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 11 Oct 2025 21:05:04 -0700 Subject: [PATCH 2/2] Remove extraneous files --- confdefs.h | 240 --------------------------------------------- conftest.c | 272 --------------------------------------------------- conftest.err | 0 3 files changed, 512 deletions(-) delete mode 100644 confdefs.h delete mode 100644 conftest.c delete mode 100644 conftest.err diff --git a/confdefs.h b/confdefs.h deleted file mode 100644 index 5e4de8a96c4..00000000000 --- a/confdefs.h +++ /dev/null @@ -1,240 +0,0 @@ -/* confdefs.h */ -#define _NETBSD_SOURCE 1 -#define __BSD_VISIBLE 1 -#define _DARWIN_C_SOURCE 1 -#define _PYTHONFRAMEWORK "" -#define HAVE_STDIO_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_WCHAR_H 1 -#define STDC_HEADERS 1 -#define _ALL_SOURCE 1 -#define _DARWIN_C_SOURCE 1 -#define _GNU_SOURCE 1 -#define _HPUX_ALT_XOPEN_SOCKET_API 1 -#define _NETBSD_SOURCE 1 -#define _OPENBSD_SOURCE 1 -#define _POSIX_PTHREAD_SEMANTICS 1 -#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#define __STDC_WANT_IEC_60559_EXT__ 1 -#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#define __STDC_WANT_LIB_EXT2__ 1 -#define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#define _TANDEM_SOURCE 1 -#define __EXTENSIONS__ 1 -#define PY_SUPPORT_TIER 1 -#define Py_DEBUG 1 -#define STDC_HEADERS 1 -#define HAVE_ALLOCA_H 1 -#define HAVE_DLFCN_H 1 -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_GRP_H 1 -#define HAVE_LANGINFO_H 1 -#define HAVE_NETDB_H 1 -#define HAVE_NET_ETHERNET_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_POLL_H 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_SCHED_H 1 -#define HAVE_SETJMP_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_SPAWN_H 1 -#define HAVE_SYS_EVENT_H 1 -#define HAVE_SYS_FILE_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_KERN_CONTROL_H 1 -#define HAVE_SYS_LOCK_H 1 -#define HAVE_SYS_MMAN_H 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_RANDOM_H 1 -#define HAVE_SYS_RESOURCE_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_STATVFS_H 1 -#define HAVE_SYS_SYS_DOMAIN_H 1 -#define HAVE_SYS_SYSCALL_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TIMES_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_UIO_H 1 -#define HAVE_SYS_UN_H 1 -#define HAVE_SYS_UTSNAME_H 1 -#define HAVE_SYS_WAIT_H 1 -#define HAVE_SYS_XATTR_H 1 -#define HAVE_SYSEXITS_H 1 -#define HAVE_SYSLOG_H 1 -#define HAVE_TERMIOS_H 1 -#define HAVE_UTIL_H 1 -#define HAVE_UTIME_H 1 -#define HAVE_UTMP_H 1 -#define HAVE_DIRENT_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_CLOCK_T 1 -#define HAVE_MAKEDEV 1 -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 -#if defined(SCO_DS) -#undef _OFF_T -#endif -#define RETSIGTYPE void -#define HAVE_SSIZE_T 1 -#define HAVE___UINT128_T 1 -#define HAVE_GCC_UINT128_T 1 -#define SIZEOF_INT 4 -#define SIZEOF_LONG 8 -#define ALIGNOF_LONG 8 -#define SIZEOF_LONG_LONG 8 -#define SIZEOF_VOID_P 8 -#define SIZEOF_SHORT 2 -#define SIZEOF_FLOAT 4 -#define SIZEOF_DOUBLE 8 -#define SIZEOF_FPOS_T 8 -#define SIZEOF_SIZE_T 8 -#define ALIGNOF_SIZE_T 8 -#define SIZEOF_PID_T 4 -#define SIZEOF_UINTPTR_T 8 -#define ALIGNOF_MAX_ALIGN_T 8 -#define HAVE_LONG_DOUBLE 1 -#define SIZEOF_LONG_DOUBLE 8 -#define SIZEOF__BOOL 1 -#define SIZEOF_OFF_T 8 -#define SIZEOF_TIME_T 8 -#define SIZEOF_PTHREAD_T 8 -#define SIZEOF_PTHREAD_KEY_T 8 -#define WITH_DYLD 1 -#define THREAD_STACK_SIZE 0x1000000 -#define PY_HAVE_PERF_TRAMPOLINE 1 -#define HAVE_LIBDL 1 -#define HAVE_EXECINFO_H 1 -#define HAVE_BACKTRACE 1 -#define HAVE_DLFCN_H 1 -#define HAVE_BACKTRACE 1 -#define HAVE_UUID_UUID_H 1 -#define HAVE_UUID_UUID_H 1 -#define HAVE_UUID_UUID_H 1 -#define HAVE_FFI_PREP_CIF_VAR 1 -#define HAVE_FFI_PREP_CLOSURE_LOC 1 -#define HAVE_FFI_CLOSURE_ALLOC 1 -#define _Py_FFI_SUPPORT_C_COMPLEX 1 -#define WITH_DECIMAL_CONTEXTVAR 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define PY_SQLITE_HAVE_SERIALIZE 1 -#define HAVE_NDBM_H 1 -#define HAVE_DB_H 1 -#define _REENTRANT 1 -#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 -#define HAVE_PTHREAD_SIGMASK 1 -#define ENABLE_IPV6 1 -#define WITH_DOC_STRINGS 1 -#define HAVE_STD_ATOMIC 1 -#define HAVE_BUILTIN_ATOMIC 1 -#define WITH_MIMALLOC 1 -#define WITH_PYMALLOC 1 -#define PY_COERCE_C_LOCALE 1 -#define HAVE_DLOPEN 1 -#define HAVE_DYNAMIC_LOADING 1 -#define HAVE_ALARM 1 -#define HAVE_CHMOD 1 -#define HAVE_CHOWN 1 -#define HAVE_CLOCK 1 -#define HAVE_CONFSTR 1 -#define HAVE_CTERMID 1 -#define HAVE_DLADDR 1 -#define HAVE_DUP 1 -#define HAVE_EXECV 1 -#define HAVE_FACCESSAT 1 -#define HAVE_FCHMOD 1 -#define HAVE_FCHMODAT 1 -#define HAVE_FCHOWN 1 -#define HAVE_FCHOWNAT 1 -#define HAVE_FDOPENDIR 1 -#define HAVE_FORK 1 -#define HAVE_FPATHCONF 1 -#define HAVE_FSTATAT 1 -#define HAVE_FTIME 1 -#define HAVE_FTRUNCATE 1 -#define HAVE_FUTIMENS 1 -#define HAVE_FUTIMES 1 -#define HAVE_GAI_STRERROR 1 -#define HAVE_GETEGID 1 -#define HAVE_GETEUID 1 -#define HAVE_GETGID 1 -#define HAVE_GETGRENT 1 -#define HAVE_GETGRGID 1 -#define HAVE_GETGRGID_R 1 -#define HAVE_GETGRNAM_R 1 -#define HAVE_GETGROUPLIST 1 -#define HAVE_GETHOSTNAME 1 -#define HAVE_GETITIMER 1 -#define HAVE_GETLOADAVG 1 -#define HAVE_GETLOGIN 1 -#define HAVE_GETLOGIN_R 1 -#define HAVE_GETPEERNAME 1 -#define HAVE_GETPGID 1 -#define HAVE_GETPID 1 -#define HAVE_GETPPID 1 -#define HAVE_GETPRIORITY 1 -#define HAVE_GETPWENT 1 -#define HAVE_GETPWNAM_R 1 -#define HAVE_GETPWUID 1 -#define HAVE_GETPWUID_R 1 -#define HAVE_GETRUSAGE 1 -#define HAVE_GETSID 1 -#define HAVE_GETUID 1 -#define HAVE_GETWD 1 -#define HAVE_GRANTPT 1 -#define HAVE_IF_NAMEINDEX 1 -#define HAVE_INITGROUPS 1 -#define HAVE_KILL 1 -#define HAVE_KILLPG 1 -#define HAVE_LCHOWN 1 -#define HAVE_LINKAT 1 -#define HAVE_LOCKF 1 -#define HAVE_LSTAT 1 -#define HAVE_LUTIMES 1 -#define HAVE_MADVISE 1 -#define HAVE_MBRTOWC 1 -#define HAVE_MKDIRAT 1 -#define HAVE_MKFIFO 1 -#define HAVE_MKFIFOAT 1 -#define HAVE_MKNOD 1 -#define HAVE_MKNODAT 1 -#define HAVE_MKTIME 1 -#define HAVE_MMAP 1 -#define HAVE_NICE 1 -#define HAVE_OPENAT 1 -#define HAVE_OPENDIR 1 -#define HAVE_PATHCONF 1 -#define HAVE_PAUSE 1 -#define HAVE_PIPE 1 -#define HAVE_POLL 1 -#define HAVE_POSIX_OPENPT 1 -#define HAVE_POSIX_SPAWN 1 -#define HAVE_POSIX_SPAWNP 1 -#define HAVE_PREAD 1 -#define HAVE_PREADV 1 -#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 1 -#define HAVE_PTHREAD_KILL 1 -#define HAVE_PTHREAD_GETNAME_NP 1 -#define HAVE_PTHREAD_SETNAME_NP 1 -#define HAVE_PTSNAME 1 diff --git a/conftest.c b/conftest.c deleted file mode 100644 index c0b3b829fc0..00000000000 --- a/conftest.c +++ /dev/null @@ -1,272 +0,0 @@ -/* confdefs.h */ -#define _NETBSD_SOURCE 1 -#define __BSD_VISIBLE 1 -#define _DARWIN_C_SOURCE 1 -#define _PYTHONFRAMEWORK "" -#define HAVE_STDIO_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_WCHAR_H 1 -#define STDC_HEADERS 1 -#define _ALL_SOURCE 1 -#define _DARWIN_C_SOURCE 1 -#define _GNU_SOURCE 1 -#define _HPUX_ALT_XOPEN_SOCKET_API 1 -#define _NETBSD_SOURCE 1 -#define _OPENBSD_SOURCE 1 -#define _POSIX_PTHREAD_SEMANTICS 1 -#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#define __STDC_WANT_IEC_60559_EXT__ 1 -#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#define __STDC_WANT_LIB_EXT2__ 1 -#define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#define _TANDEM_SOURCE 1 -#define __EXTENSIONS__ 1 -#define PY_SUPPORT_TIER 1 -#define Py_DEBUG 1 -#define STDC_HEADERS 1 -#define HAVE_ALLOCA_H 1 -#define HAVE_DLFCN_H 1 -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_GRP_H 1 -#define HAVE_LANGINFO_H 1 -#define HAVE_NETDB_H 1 -#define HAVE_NET_ETHERNET_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_POLL_H 1 -#define HAVE_PTHREAD_H 1 -#define HAVE_SCHED_H 1 -#define HAVE_SETJMP_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_SPAWN_H 1 -#define HAVE_SYS_EVENT_H 1 -#define HAVE_SYS_FILE_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_KERN_CONTROL_H 1 -#define HAVE_SYS_LOCK_H 1 -#define HAVE_SYS_MMAN_H 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_RANDOM_H 1 -#define HAVE_SYS_RESOURCE_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_STATVFS_H 1 -#define HAVE_SYS_SYS_DOMAIN_H 1 -#define HAVE_SYS_SYSCALL_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TIMES_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_UIO_H 1 -#define HAVE_SYS_UN_H 1 -#define HAVE_SYS_UTSNAME_H 1 -#define HAVE_SYS_WAIT_H 1 -#define HAVE_SYS_XATTR_H 1 -#define HAVE_SYSEXITS_H 1 -#define HAVE_SYSLOG_H 1 -#define HAVE_TERMIOS_H 1 -#define HAVE_UTIL_H 1 -#define HAVE_UTIME_H 1 -#define HAVE_UTMP_H 1 -#define HAVE_DIRENT_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_CLOCK_T 1 -#define HAVE_MAKEDEV 1 -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 -#if defined(SCO_DS) -#undef _OFF_T -#endif -#define RETSIGTYPE void -#define HAVE_SSIZE_T 1 -#define HAVE___UINT128_T 1 -#define HAVE_GCC_UINT128_T 1 -#define SIZEOF_INT 4 -#define SIZEOF_LONG 8 -#define ALIGNOF_LONG 8 -#define SIZEOF_LONG_LONG 8 -#define SIZEOF_VOID_P 8 -#define SIZEOF_SHORT 2 -#define SIZEOF_FLOAT 4 -#define SIZEOF_DOUBLE 8 -#define SIZEOF_FPOS_T 8 -#define SIZEOF_SIZE_T 8 -#define ALIGNOF_SIZE_T 8 -#define SIZEOF_PID_T 4 -#define SIZEOF_UINTPTR_T 8 -#define ALIGNOF_MAX_ALIGN_T 8 -#define HAVE_LONG_DOUBLE 1 -#define SIZEOF_LONG_DOUBLE 8 -#define SIZEOF__BOOL 1 -#define SIZEOF_OFF_T 8 -#define SIZEOF_TIME_T 8 -#define SIZEOF_PTHREAD_T 8 -#define SIZEOF_PTHREAD_KEY_T 8 -#define WITH_DYLD 1 -#define THREAD_STACK_SIZE 0x1000000 -#define PY_HAVE_PERF_TRAMPOLINE 1 -#define HAVE_LIBDL 1 -#define HAVE_EXECINFO_H 1 -#define HAVE_BACKTRACE 1 -#define HAVE_DLFCN_H 1 -#define HAVE_BACKTRACE 1 -#define HAVE_UUID_UUID_H 1 -#define HAVE_UUID_UUID_H 1 -#define HAVE_UUID_UUID_H 1 -#define HAVE_FFI_PREP_CIF_VAR 1 -#define HAVE_FFI_PREP_CLOSURE_LOC 1 -#define HAVE_FFI_CLOSURE_ALLOC 1 -#define _Py_FFI_SUPPORT_C_COMPLEX 1 -#define WITH_DECIMAL_CONTEXTVAR 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define HAVE_LIBSQLITE3 1 -#define PY_SQLITE_HAVE_SERIALIZE 1 -#define HAVE_NDBM_H 1 -#define HAVE_DB_H 1 -#define _REENTRANT 1 -#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 -#define HAVE_PTHREAD_SIGMASK 1 -#define ENABLE_IPV6 1 -#define WITH_DOC_STRINGS 1 -#define HAVE_STD_ATOMIC 1 -#define HAVE_BUILTIN_ATOMIC 1 -#define WITH_MIMALLOC 1 -#define WITH_PYMALLOC 1 -#define PY_COERCE_C_LOCALE 1 -#define HAVE_DLOPEN 1 -#define HAVE_DYNAMIC_LOADING 1 -#define HAVE_ALARM 1 -#define HAVE_CHMOD 1 -#define HAVE_CHOWN 1 -#define HAVE_CLOCK 1 -#define HAVE_CONFSTR 1 -#define HAVE_CTERMID 1 -#define HAVE_DLADDR 1 -#define HAVE_DUP 1 -#define HAVE_EXECV 1 -#define HAVE_FACCESSAT 1 -#define HAVE_FCHMOD 1 -#define HAVE_FCHMODAT 1 -#define HAVE_FCHOWN 1 -#define HAVE_FCHOWNAT 1 -#define HAVE_FDOPENDIR 1 -#define HAVE_FORK 1 -#define HAVE_FPATHCONF 1 -#define HAVE_FSTATAT 1 -#define HAVE_FTIME 1 -#define HAVE_FTRUNCATE 1 -#define HAVE_FUTIMENS 1 -#define HAVE_FUTIMES 1 -#define HAVE_GAI_STRERROR 1 -#define HAVE_GETEGID 1 -#define HAVE_GETEUID 1 -#define HAVE_GETGID 1 -#define HAVE_GETGRENT 1 -#define HAVE_GETGRGID 1 -#define HAVE_GETGRGID_R 1 -#define HAVE_GETGRNAM_R 1 -#define HAVE_GETGROUPLIST 1 -#define HAVE_GETHOSTNAME 1 -#define HAVE_GETITIMER 1 -#define HAVE_GETLOADAVG 1 -#define HAVE_GETLOGIN 1 -#define HAVE_GETLOGIN_R 1 -#define HAVE_GETPEERNAME 1 -#define HAVE_GETPGID 1 -#define HAVE_GETPID 1 -#define HAVE_GETPPID 1 -#define HAVE_GETPRIORITY 1 -#define HAVE_GETPWENT 1 -#define HAVE_GETPWNAM_R 1 -#define HAVE_GETPWUID 1 -#define HAVE_GETPWUID_R 1 -#define HAVE_GETRUSAGE 1 -#define HAVE_GETSID 1 -#define HAVE_GETUID 1 -#define HAVE_GETWD 1 -#define HAVE_GRANTPT 1 -#define HAVE_IF_NAMEINDEX 1 -#define HAVE_INITGROUPS 1 -#define HAVE_KILL 1 -#define HAVE_KILLPG 1 -#define HAVE_LCHOWN 1 -#define HAVE_LINKAT 1 -#define HAVE_LOCKF 1 -#define HAVE_LSTAT 1 -#define HAVE_LUTIMES 1 -#define HAVE_MADVISE 1 -#define HAVE_MBRTOWC 1 -#define HAVE_MKDIRAT 1 -#define HAVE_MKFIFO 1 -#define HAVE_MKFIFOAT 1 -#define HAVE_MKNOD 1 -#define HAVE_MKNODAT 1 -#define HAVE_MKTIME 1 -#define HAVE_MMAP 1 -#define HAVE_NICE 1 -#define HAVE_OPENAT 1 -#define HAVE_OPENDIR 1 -#define HAVE_PATHCONF 1 -#define HAVE_PAUSE 1 -#define HAVE_PIPE 1 -#define HAVE_POLL 1 -#define HAVE_POSIX_OPENPT 1 -#define HAVE_POSIX_SPAWN 1 -#define HAVE_POSIX_SPAWNP 1 -#define HAVE_PREAD 1 -#define HAVE_PREADV 1 -#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 1 -#define HAVE_PTHREAD_KILL 1 -#define HAVE_PTHREAD_GETNAME_NP 1 -#define HAVE_PTHREAD_SETNAME_NP 1 -#define HAVE_PTSNAME 1 -/* end confdefs.h. */ -/* Define ptsname_r to an innocuous variant, in case declares ptsname_r. - For example, HP-UX 11i declares gettimeofday. */ -#define ptsname_r innocuous_ptsname_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char ptsname_r (void); below. */ - -#include -#undef ptsname_r - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ptsname_r (void); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_ptsname_r || defined __stub___ptsname_r -choke me -#endif - -int -main (void) -{ -return ptsname_r (); - ; - return 0; -} diff --git a/conftest.err b/conftest.err deleted file mode 100644 index e69de29bb2d..00000000000