From 00ffd425dad8799b4445bc56c9320f08764efa00 Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Mon, 8 Jun 2026 09:55:23 +0200 Subject: [PATCH] refactor: remove *MAX constants fitting rust-lang/libc#3131 This follows from rust-lang/libc#5118, where all these symbols were deprecated. @JohnTitor then advised for their removal in a separate PR that was not on track to a stable release. There have been a few more symbols that had to be altogether removed because they relied on the now non-existent constants. See the accompanying PR for details. --- libc-test/build.rs | 5 +- libc-test/semver/aix.txt | 1 - libc-test/semver/android.txt | 30 --- libc-test/semver/apple.txt | 12 -- libc-test/semver/cygwin.txt | 1 - libc-test/semver/dragonfly.txt | 9 - libc-test/semver/freebsd.txt | 19 -- libc-test/semver/l4re.txt | 4 +- libc-test/semver/linux-aarch64.txt | 1 - libc-test/semver/linux-gnu.txt | 2 - libc-test/semver/linux-loongarch64.txt | 1 - libc-test/semver/linux-x86_64.txt | 1 - libc-test/semver/linux.txt | 31 --- libc-test/semver/netbsd.txt | 6 +- libc-test/semver/openbsd.txt | 2 - libc-test/semver/unix.txt | 1 - libc-test/semver/vxworks.txt | 27 --- src/fuchsia/mod.rs | 2 - src/new/linux_uapi/linux/can/j1939.rs | 2 - src/new/linux_uapi/linux/can/raw.rs | 1 - src/new/qurt/limits.rs | 3 - src/new/qurt/signal.rs | 1 - src/unix/aix/mod.rs | 1 - src/unix/bsd/apple/mod.rs | 35 ---- src/unix/bsd/freebsdlike/dragonfly/mod.rs | 9 - src/unix/bsd/freebsdlike/freebsd/mod.rs | 125 ------------ src/unix/bsd/mod.rs | 3 - src/unix/bsd/netbsdlike/netbsd/mod.rs | 36 ---- src/unix/bsd/netbsdlike/openbsd/mod.rs | 3 - src/unix/cygwin/mod.rs | 2 - src/unix/haiku/mod.rs | 1 - src/unix/haiku/native.rs | 45 ----- src/unix/hurd/mod.rs | 5 - src/unix/linux_like/android/mod.rs | 44 ---- src/unix/linux_like/linux/mod.rs | 44 ---- src/unix/linux_like/linux/musl/b32/hexagon.rs | 2 - src/unix/linux_like/linux_l4re_shared.rs | 2 - src/unix/linux_like/mod.rs | 3 - src/unix/newlib/horizon/mod.rs | 1 - src/unix/newlib/rtems/mod.rs | 1 - src/unix/nto/mod.rs | 10 - src/unix/redox/mod.rs | 3 - src/unix/solarish/illumos.rs | 7 - src/unix/solarish/mod.rs | 2 - src/vxworks/mod.rs | 188 ------------------ 45 files changed, 3 insertions(+), 731 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 328bac6e56a6b..c98ad1bef0870 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -5192,7 +5192,7 @@ fn test_haiku(target: &str) { "dirent" => true, // The following structs contain function pointers, which cannot be initialized // with mem::zeroed(), so skip the automated test - "image_info" | "thread_info" => true, + "thread_info" => true, "Elf64_Phdr" => true, @@ -5292,7 +5292,6 @@ fn test_haiku(target: &str) { // skip these enum-type fields ("thread_info", "state") => true, - ("image_info", "image_type") => true, _ => false, } }); @@ -5323,7 +5322,6 @@ fn test_haiku(target: &str) { | "cpu_info" | "system_info" | "object_wait_info" - | "image_info" | "attr_info" | "index_info" | "fs_info" @@ -5351,7 +5349,6 @@ fn test_haiku(target: &str) { "type_" if struct_ == "attr_info" => Some("type".to_string()), "type_" if struct_ == "index_info" => Some("type".to_string()), "type_" if struct_ == "cpu_topology_node_info" => Some("type".to_string()), - "image_type" if struct_ == "image_info" => Some("type".to_string()), _ => None, } }); diff --git a/libc-test/semver/aix.txt b/libc-test/semver/aix.txt index ac82c5576f34c..2a8c740ded753 100644 --- a/libc-test/semver/aix.txt +++ b/libc-test/semver/aix.txt @@ -1139,7 +1139,6 @@ RTAX_GATEWAY RTAX_GENMASK RTAX_IFA RTAX_IFP -RTAX_MAX RTAX_NETMASK RTA_AUTHOR RTA_BRD diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index 00d9bf08a0e86..34f3a2929b674 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -1,5 +1,3 @@ -ABS_CNT -ABS_MAX ADDR_COMPAT_LAYOUT ADDR_LIMIT_32BIT ADDR_LIMIT_3GB @@ -581,8 +579,6 @@ ETXTBSY EUCLEAN EUNATCH EUSERS -EV_CNT -EV_MAX EWOULDBLOCK EXDEV EXFULL @@ -612,8 +608,6 @@ FD_ZERO FF0 FF1 FFDLY -FF_CNT -FF_MAX FICLONE FICLONERANGE FILE @@ -839,8 +833,6 @@ INADDR_LOOPBACK INADDR_NONE INLCR INPCK -INPUT_PROP_CNT -INPUT_PROP_MAX INT_MAX INT_MIN IN_ACCESS @@ -1085,8 +1077,6 @@ KEXEC_FILE_ON_CRASH KEXEC_FILE_UNLOAD KEXEC_ON_CRASH KEXEC_PRESERVE_CONTEXT -KEY_CNT -KEY_MAX KLOG_CLEAR KLOG_CLOSE KLOG_CONSOLE_LEVEL @@ -1124,8 +1114,6 @@ LC_TELEPHONE LC_TELEPHONE_MASK LC_TIME LC_TIME_MASK -LED_CNT -LED_MAX LINUX_REBOOT_CMD_CAD_OFF LINUX_REBOOT_CMD_CAD_ON LINUX_REBOOT_CMD_HALT @@ -1263,8 +1251,6 @@ MPOL_F_STATIC_NODES MPOL_INTERLEAVE MPOL_LOCAL MPOL_PREFERRED -MSC_CNT -MSC_MAX MSDOS_SUPER_MAGIC MSG_CMSG_CLOEXEC MSG_CONFIRM @@ -1443,7 +1429,6 @@ NFQA_CFG_FLAGS NFQA_CFG_F_CONNTRACK NFQA_CFG_F_FAIL_OPEN NFQA_CFG_F_GSO -NFQA_CFG_F_MAX NFQA_CFG_F_SECCTX NFQA_CFG_F_UID_GID NFQA_CFG_MASK @@ -1571,7 +1556,6 @@ NFT_MSG_GETRULE NFT_MSG_GETSET NFT_MSG_GETSETELEM NFT_MSG_GETTABLE -NFT_MSG_MAX NFT_MSG_NEWCHAIN NFT_MSG_NEWGEN NFT_MSG_NEWOBJ @@ -1861,7 +1845,6 @@ O_WRONLY PARENB PARMRK PARODD -PATH_MAX PENDIN PF_ALG PF_APPLETALK @@ -2030,7 +2013,6 @@ PR_RISCV_V_VSTATE_CTRL_ON PR_SCHED_CORE PR_SCHED_CORE_CREATE PR_SCHED_CORE_GET -PR_SCHED_CORE_MAX PR_SCHED_CORE_SCOPE_PROCESS_GROUP PR_SCHED_CORE_SCOPE_THREAD PR_SCHED_CORE_SCOPE_THREAD_GROUP @@ -2231,13 +2213,9 @@ REG_PEND REG_STARTEND REG_TRACE REISERFS_SUPER_MAGIC -REL_CNT -REL_MAX RENAME_EXCHANGE RENAME_NOREPLACE RENAME_WHITEOUT -REP_CNT -REP_MAX RLIMIT_AS RLIMIT_CORE RLIMIT_CPU @@ -2545,8 +2523,6 @@ SIOCWANDEV SIOGIFINDEX SI_LOAD_SHIFT SMB_SUPER_MAGIC -SND_CNT -SND_MAX SOCK_CLOEXEC SOCK_DCCP SOCK_DGRAM @@ -2663,10 +2639,6 @@ ST_NOSUID ST_RDONLY ST_RELATIME ST_SYNCHRONOUS -SW_CNT -SW_MAX -SYN_CNT -SYN_MAX SYSCALL_DISPATCH_FILTER_ALLOW SYSCALL_DISPATCH_FILTER_BLOCK SYS_accept4 @@ -3331,7 +3303,6 @@ _SC_XOPEN_VERSION _SC_XOPEN_XCU_VERSION __CPU_BITS __CPU_BITTYPE -__NFT_REG_MAX __WALL __WCLONE __WNOTHREAD @@ -4114,7 +4085,6 @@ uinput_abs_setup uinput_ff_erase uinput_ff_upload uinput_setup -uinput_user_dev uint16_t uint32_t uint64_t diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index cf1d92de132dc..cda85a23a9fb9 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1237,7 +1237,6 @@ RTAX_GATEWAY RTAX_GENMASK RTAX_IFA RTAX_IFP -RTAX_MAX RTAX_NETMASK RTA_AUTHOR RTA_BRD @@ -1529,14 +1528,7 @@ UF_NODUMP UF_OPAQUE UF_SETTABLE UF_TRACKED -USER_BC_BASE_MAX -USER_BC_DIM_MAX -USER_BC_SCALE_MAX -USER_BC_STRING_MAX -USER_COLL_WEIGHTS_MAX USER_CS_PATH -USER_EXPR_NEST_MAX -USER_LINE_MAX USER_MAXID USER_POSIX2_CHAR_TERM USER_POSIX2_C_BIND @@ -1548,7 +1540,6 @@ USER_POSIX2_SW_DEV USER_POSIX2_UPE USER_POSIX2_VERSION USER_PROCESS -USER_RE_DUP_MAX USER_STREAM_MAX USER_TZNAME_MAX UTIME_NOW @@ -1925,9 +1916,6 @@ getxattr glob glob_t globfree -host_cpu_load_info -host_cpu_load_info_data_t -host_cpu_load_info_t icmp6_ifstat iconv_t id_t diff --git a/libc-test/semver/cygwin.txt b/libc-test/semver/cygwin.txt index a978f7312d9c3..722ed37f7f3d4 100644 --- a/libc-test/semver/cygwin.txt +++ b/libc-test/semver/cygwin.txt @@ -281,7 +281,6 @@ MSG_BCAST MSG_CMSG_CLOEXEC MSG_DONTWAIT MSG_MCAST -NGROUPS_MAX NI_DGRAM NI_MAXSERV NI_NAMEREQD diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt index 0b158da70a17a..43881bfce75d8 100644 --- a/libc-test/semver/dragonfly.txt +++ b/libc-test/semver/dragonfly.txt @@ -882,7 +882,6 @@ RLIMIT_STACK RLIMIT_VMEM RLIM_INFINITY RLIM_NLIMITS -RTAX_MAX RTAX_MPLS1 RTAX_MPLS2 RTAX_MPLS3 @@ -1087,14 +1086,7 @@ UF_NOUNLINK UF_OPAQUE UF_SETTABLE UF_XLINK -USER_BC_BASE_MAX -USER_BC_DIM_MAX -USER_BC_SCALE_MAX -USER_BC_STRING_MAX -USER_COLL_WEIGHTS_MAX USER_CS_PATH -USER_EXPR_NEST_MAX -USER_LINE_MAX USER_MAXID USER_POSIX2_CHAR_TERM USER_POSIX2_C_BIND @@ -1106,7 +1098,6 @@ USER_POSIX2_SW_DEV USER_POSIX2_UPE USER_POSIX2_VERSION USER_PROCESS -USER_RE_DUP_MAX USER_STREAM_MAX USER_TZNAME_MAX UTIME_NOW diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 35d5b7dff420a..3821af291443f 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -1221,7 +1221,6 @@ RLIMIT_UMTXP RLIMIT_VMEM RLIM_INFINITY RLIM_NLIMITS -RTAX_MAX RTF_BROADCAST RTF_FIXEDMTU RTF_LLDATA @@ -1285,7 +1284,6 @@ SCTP_ASSOC_RESET_FAILED SCTP_ASSOC_SUPPORTS_ASCONF SCTP_ASSOC_SUPPORTS_AUTH SCTP_ASSOC_SUPPORTS_INTERLEAVING -SCTP_ASSOC_SUPPORTS_MAX SCTP_ASSOC_SUPPORTS_MULTIBUF SCTP_ASSOC_SUPPORTS_PR SCTP_ASSOC_SUPPORTS_RE_CONFIG @@ -1359,7 +1357,6 @@ SCTP_PRINFO SCTP_PR_ASSOC_STATUS SCTP_PR_SCTP_ALL SCTP_PR_SCTP_BUF -SCTP_PR_SCTP_MAX SCTP_PR_SCTP_NONE SCTP_PR_SCTP_PRIO SCTP_PR_SCTP_RTX @@ -1465,7 +1462,6 @@ SO_SPLICE SO_TIMESTAMP SO_TS_BINTIME SO_TS_CLOCK -SO_TS_CLOCK_MAX SO_TS_DEFAULT SO_TS_MONOTONIC SO_TS_REALTIME @@ -1539,7 +1535,6 @@ TCP_FASTOPEN_PSK_LEN TCP_FIN_IS_RST TCP_FUNCTION_ALIAS TCP_FUNCTION_BLK -TCP_FUNCTION_NAME_LEN_MAX TCP_IDLE_REDUCE TCP_INFO TCP_KEEPCNT @@ -1676,14 +1671,7 @@ UMTX_OP_WAIT_UINT UMTX_OP_WAIT_UINT_PRIVATE UMTX_OP_WAKE UMTX_OP_WAKE_PRIVATE -USER_BC_BASE_MAX -USER_BC_DIM_MAX -USER_BC_SCALE_MAX -USER_BC_STRING_MAX -USER_COLL_WEIGHTS_MAX USER_CS_PATH -USER_EXPR_NEST_MAX -USER_LINE_MAX USER_POSIX2_CHAR_TERM USER_POSIX2_C_BIND USER_POSIX2_C_DEV @@ -1694,7 +1682,6 @@ USER_POSIX2_SW_DEV USER_POSIX2_UPE USER_POSIX2_VERSION USER_PROCESS -USER_RE_DUP_MAX USER_STREAM_MAX USER_TZNAME_MAX UTIME_NOW @@ -2057,10 +2044,7 @@ kcmp kevent key_t killpg -kinfo_file -kinfo_getvmmap kinfo_proc -kinfo_vmentry kld_isloaded kld_load kqueue @@ -2180,10 +2164,8 @@ procstat procstat_close procstat_freefiles procstat_freeprocs -procstat_freevmmap procstat_getfiles procstat_getprocs -procstat_getvmmap procstat_open_sysctl pseudo_AF_HDRCMPLT pseudo_AF_KEY @@ -2398,7 +2380,6 @@ sysctl sysctlbyname sysctlnametomib tcp_fastopen -tcp_function_set tcp_info telldir thr_kill diff --git a/libc-test/semver/l4re.txt b/libc-test/semver/l4re.txt index ea50f8f58bf0d..421fc8faf08ab 100644 --- a/libc-test/semver/l4re.txt +++ b/libc-test/semver/l4re.txt @@ -1269,7 +1269,6 @@ PR_MPX_ENABLE_MANAGEMENT PR_SCHED_CORE PR_SCHED_CORE_CREATE PR_SCHED_CORE_GET -PR_SCHED_CORE_MAX PR_SCHED_CORE_SCOPE_PROCESS_GROUP PR_SCHED_CORE_SCOPE_THREAD PR_SCHED_CORE_SCOPE_THREAD_GROUP @@ -1448,7 +1447,6 @@ RT_ADDRCLASS RT_CLASS_DEFAULT RT_CLASS_LOCAL RT_CLASS_MAIN -RT_CLASS_MAX RT_CLASS_UNSPEC RT_LOCALADDR RT_TOS @@ -2300,7 +2298,7 @@ mntent mode_t mount mprotect -msghdr +msghdr msync munlock munlockall diff --git a/libc-test/semver/linux-aarch64.txt b/libc-test/semver/linux-aarch64.txt index 03a312bcc13dc..cda7ef8066925 100644 --- a/libc-test/semver/linux-aarch64.txt +++ b/libc-test/semver/linux-aarch64.txt @@ -58,7 +58,6 @@ SKF_AD_ALU_XOR_X SKF_AD_CPU SKF_AD_HATYPE SKF_AD_MARK -SKF_AD_MAX SKF_AD_NLATTR SKF_AD_NLATTR_NEST SKF_AD_OFF diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt index 243d0f6eababe..2f801e44c51de 100644 --- a/libc-test/semver/linux-gnu.txt +++ b/libc-test/semver/linux-gnu.txt @@ -253,7 +253,6 @@ NFT_MSG_GETRULE NFT_MSG_GETSET NFT_MSG_GETSETELEM NFT_MSG_GETTABLE -NFT_MSG_MAX NFT_MSG_NEWCHAIN NFT_MSG_NEWGEN NFT_MSG_NEWRULE @@ -561,7 +560,6 @@ _SC_USER_GROUPS _SC_USER_GROUPS_R _SC_USHRT_MAX _SC_WORD_BIT -__NFT_REG_MAX __UT_HOSTSIZE __UT_LINESIZE __UT_NAMESIZE diff --git a/libc-test/semver/linux-loongarch64.txt b/libc-test/semver/linux-loongarch64.txt index b3a7a13fbc101..a27236edfe2ef 100644 --- a/libc-test/semver/linux-loongarch64.txt +++ b/libc-test/semver/linux-loongarch64.txt @@ -62,7 +62,6 @@ SKF_AD_ALU_XOR_X SKF_AD_CPU SKF_AD_HATYPE SKF_AD_MARK -SKF_AD_MAX SKF_AD_NLATTR SKF_AD_NLATTR_NEST SKF_AD_OFF diff --git a/libc-test/semver/linux-x86_64.txt b/libc-test/semver/linux-x86_64.txt index 9d62f8cd3cd35..764eb24068fab 100644 --- a/libc-test/semver/linux-x86_64.txt +++ b/libc-test/semver/linux-x86_64.txt @@ -71,7 +71,6 @@ SKF_AD_ALU_XOR_X SKF_AD_CPU SKF_AD_HATYPE SKF_AD_MARK -SKF_AD_MAX SKF_AD_NLATTR SKF_AD_NLATTR_NEST SKF_AD_OFF diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index 3d1c73dca9ef0..0b8ebcd620c02 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -17,8 +17,6 @@ ABMON_6 ABMON_7 ABMON_8 ABMON_9 -ABS_CNT -ABS_MAX ADDR_COMPAT_LAYOUT ADDR_LIMIT_32BIT ADDR_LIMIT_3GB @@ -324,7 +322,6 @@ CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER -CAN_RAW_FILTER_MAX CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS @@ -780,9 +777,7 @@ ET_REL EUCLEAN EUNATCH EUSERS -EV_CNT EV_CURRENT -EV_MAX EV_NONE EV_NUM EXFULL @@ -894,8 +889,6 @@ FAN_UNLIMITED_QUEUE FF0 FF1 FFDLY -FF_CNT -FF_MAX FILENAME_MAX FIONCLEX FIONREAD @@ -1192,9 +1185,7 @@ IF_OPER_UP IMAXBEL INPUT_PROP_ACCELEROMETER INPUT_PROP_BUTTONPAD -INPUT_PROP_CNT INPUT_PROP_DIRECT -INPUT_PROP_MAX INPUT_PROP_POINTER INPUT_PROP_POINTING_STICK INPUT_PROP_SEMI_MT @@ -1660,8 +1651,6 @@ KEYCTL_SET_REQKEY_KEYRING KEYCTL_SET_TIMEOUT KEYCTL_UNLINK KEYCTL_UPDATE -KEY_CNT -KEY_MAX KEY_REQKEY_DEFL_DEFAULT KEY_REQKEY_DEFL_GROUP_KEYRING KEY_REQKEY_DEFL_NO_CHANGE @@ -1691,8 +1680,6 @@ LC_NUMERIC LC_NUMERIC_MASK LC_TIME LC_TIME_MASK -LED_CNT -LED_MAX LINUX_REBOOT_CMD_CAD_OFF LINUX_REBOOT_CMD_CAD_ON LINUX_REBOOT_CMD_HALT @@ -1829,8 +1816,6 @@ MOUNT_ATTR_STRICTATIME MOUNT_ATTR__ATIME MREMAP_FIXED MREMAP_MAYMOVE -MSC_CNT -MSC_MAX MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_COPY @@ -1878,7 +1863,6 @@ MS_SLAVE MS_STRICTATIME MS_SYNCHRONOUS MS_UNBINDABLE -NAME_MAX NDA_CACHEINFO NDA_DST NDA_IFINDEX @@ -1959,7 +1943,6 @@ NFQA_CFG_FLAGS NFQA_CFG_F_CONNTRACK NFQA_CFG_F_FAIL_OPEN NFQA_CFG_F_GSO -NFQA_CFG_F_MAX NFQA_CFG_F_SECCTX NFQA_CFG_F_UID_GID NFQA_CFG_MASK @@ -2442,7 +2425,6 @@ PR_MPX_ENABLE_MANAGEMENT PR_SCHED_CORE PR_SCHED_CORE_CREATE PR_SCHED_CORE_GET -PR_SCHED_CORE_MAX PR_SCHED_CORE_SCOPE_PROCESS_GROUP PR_SCHED_CORE_SCOPE_THREAD PR_SCHED_CORE_SCOPE_THREAD_GROUP @@ -2649,13 +2631,9 @@ REG_NOMATCH REG_NOSUB REG_NOTBOL REG_NOTEOL -REL_CNT -REL_MAX RENAME_EXCHANGE RENAME_NOREPLACE RENAME_WHITEOUT -REP_CNT -REP_MAX RESOLVE_BENEATH RESOLVE_CACHED RESOLVE_IN_ROOT @@ -2827,7 +2805,6 @@ RT_ADDRCLASS RT_CLASS_DEFAULT RT_CLASS_LOCAL RT_CLASS_MAIN -RT_CLASS_MAX RT_CLASS_UNSPEC RT_LOCALADDR RT_SCOPE_HOST @@ -2918,7 +2895,6 @@ SCTP_PEER_AUTH_CHUNKS SCTP_PRIMARY_ADDR SCTP_PR_SCTP_ALL SCTP_PR_SCTP_MASK -SCTP_PR_SCTP_MAX SCTP_PR_SCTP_NONE SCTP_PR_SCTP_PRIO SCTP_PR_SCTP_RTX @@ -3136,8 +3112,6 @@ SI_SIGIO SI_TIMER SI_TKILL SI_USER -SND_CNT -SND_MAX SOCK_CLOEXEC SOCK_DCCP SOCK_NONBLOCK @@ -3247,13 +3221,9 @@ ST_NOSUID ST_RDONLY ST_SYNCHRONOUS ST_WRITE -SW_CNT -SW_MAX SYNC_FILE_RANGE_WAIT_AFTER SYNC_FILE_RANGE_WAIT_BEFORE SYNC_FILE_RANGE_WRITE -SYN_CNT -SYN_MAX SYS_accept4 SYS_acct SYS_add_key @@ -4551,7 +4521,6 @@ uinput_abs_setup uinput_ff_erase uinput_ff_upload uinput_setup -uinput_user_dev umount umount2 unshare diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index 182d4e2b5a7b2..7fb9e37e1b97c 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -935,7 +935,6 @@ RLIM_INFINITY RLIM_NLIMITS RLIM_SAVED_CUR RLIM_SAVED_MAX -RTAX_MAX RTAX_TAG RTA_TAG RTF_ANNOUNCE @@ -1399,11 +1398,9 @@ kevent key_t killpg kinfo_file -kinfo_getvmmap kinfo_lwp kinfo_pcb kinfo_proc2 -kinfo_vmentry kqueue kqueue1 labs @@ -1646,6 +1643,5 @@ utmpname utmpx utmpxname utrace -uucred wait4 -waitid \ No newline at end of file +waitid diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index b92a8d1edaa6a..306e85b142f56 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -604,7 +604,6 @@ NFSMNT_WANTAUTH NFSMNT_WANTRCV NFSMNT_WANTSND NFSMNT_WSIZE -NFS_ARGSVERSION NI_DGRAM NI_NAMEREQD NI_NOFQDN @@ -802,7 +801,6 @@ RLIM_SAVED_MAX RTAX_BFD RTAX_DNS RTAX_LABEL -RTAX_MAX RTAX_SEARCH RTAX_SRC RTAX_SRCMASK diff --git a/libc-test/semver/unix.txt b/libc-test/semver/unix.txt index 052c24178dfcc..801e53a9e4ad4 100644 --- a/libc-test/semver/unix.txt +++ b/libc-test/semver/unix.txt @@ -260,7 +260,6 @@ O_WRONLY PARENB PARMRK PARODD -PATH_MAX PF_INET PF_INET6 PF_UNIX diff --git a/libc-test/semver/vxworks.txt b/libc-test/semver/vxworks.txt index 35d795a706e8a..548c4d2d170b9 100644 --- a/libc-test/semver/vxworks.txt +++ b/libc-test/semver/vxworks.txt @@ -255,7 +255,6 @@ O_WRONLY PARENB PARMRK PARODD -PATH_MAX PF_INET PF_INET6 PF_UNIX @@ -270,11 +269,8 @@ PROT_EXEC PROT_NONE PROT_READ PROT_WRITE -PTHREAD_COND_INITIALIZER -PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_NORMAL PTHREAD_MUTEX_RECURSIVE -PTHREAD_RWLOCK_INITIALIZER RTLD_DEFAULT RTLD_GLOBAL RTLD_LAZY @@ -470,7 +466,6 @@ confstr connect creat dev_t -dirent dirfd dladdr dlclose @@ -632,13 +627,6 @@ pthread_attr_init pthread_attr_setdetachstate pthread_attr_setstacksize pthread_attr_t -pthread_cond_broadcast -pthread_cond_destroy -pthread_cond_init -pthread_cond_signal -pthread_cond_t -pthread_cond_timedwait -pthread_cond_wait pthread_condattr_destroy pthread_condattr_init pthread_condattr_t @@ -651,24 +639,10 @@ pthread_join pthread_key_create pthread_key_delete pthread_key_t -pthread_mutex_destroy -pthread_mutex_init -pthread_mutex_lock -pthread_mutex_t -pthread_mutex_trylock -pthread_mutex_unlock pthread_mutexattr_destroy pthread_mutexattr_init pthread_mutexattr_settype pthread_mutexattr_t -pthread_rwlock_destroy -pthread_rwlock_init -pthread_rwlock_rdlock -pthread_rwlock_t -pthread_rwlock_tryrdlock -pthread_rwlock_trywrlock -pthread_rwlock_unlock -pthread_rwlock_wrlock pthread_rwlockattr_destroy pthread_rwlockattr_init pthread_rwlockattr_t @@ -683,7 +657,6 @@ puts pwrite raise read -readdir readlink readlinkat readv diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 20bf7401e570f..d8da9ca4f7ac8 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -1592,8 +1592,6 @@ pub const LOCK_UN: c_int = 8; pub const SS_ONSTACK: c_int = 1; pub const SS_DISABLE: c_int = 2; -pub const PATH_MAX: c_int = 4096; - pub const FD_SETSIZE: c_int = 1024; pub const EPOLLIN: c_int = 0x1; diff --git a/src/new/linux_uapi/linux/can/j1939.rs b/src/new/linux_uapi/linux/can/j1939.rs index fdf425ce6c0c1..5e34623ce472f 100644 --- a/src/new/linux_uapi/linux/can/j1939.rs +++ b/src/new/linux_uapi/linux/can/j1939.rs @@ -56,5 +56,3 @@ s! { pub addr_mask: u8, } } - -pub const J1939_FILTER_MAX: c_int = 512; diff --git a/src/new/linux_uapi/linux/can/raw.rs b/src/new/linux_uapi/linux/can/raw.rs index 470334bd5d147..42a8aa4a16553 100644 --- a/src/new/linux_uapi/linux/can/raw.rs +++ b/src/new/linux_uapi/linux/can/raw.rs @@ -3,7 +3,6 @@ pub use crate::linux::can::*; pub const SOL_CAN_RAW: c_int = SOL_CAN_BASE + CAN_RAW; -pub const CAN_RAW_FILTER_MAX: c_int = 512; // FIXME(cleanup): use `c_enum!`, which needs to be adapted to allow omitting a type. pub const CAN_RAW_FILTER: c_int = 1; diff --git a/src/new/qurt/limits.rs b/src/new/qurt/limits.rs index ae1a007ff1c66..faeeb006675ac 100644 --- a/src/new/qurt/limits.rs +++ b/src/new/qurt/limits.rs @@ -27,12 +27,9 @@ pub const USHRT_MAX: c_ushort = 65535; // POSIX Limits pub const ARG_MAX: c_int = 4096; pub const CHILD_MAX: c_int = 25; -pub const LINK_MAX: c_int = 8; pub const MAX_CANON: c_int = 255; pub const MAX_INPUT: c_int = 255; -pub const NAME_MAX: c_int = 255; pub const OPEN_MAX: c_int = 20; -pub const PATH_MAX: c_int = 260; pub const PIPE_BUF: c_int = 512; pub const STREAM_MAX: c_int = 20; pub const TZNAME_MAX: c_int = 50; diff --git a/src/new/qurt/signal.rs b/src/new/qurt/signal.rs index f525fa15ff29e..89835f68e54ad 100644 --- a/src/new/qurt/signal.rs +++ b/src/new/qurt/signal.rs @@ -50,7 +50,6 @@ pub const SIG_SETMASK: c_int = 3; pub const POSIX_MSG: c_int = 7; pub const POSIX_NOTIF: c_int = 8; pub const SIGRTMIN: c_int = 10; -pub const SIGRTMAX: c_int = 32; // Notification types (from QuRT signal.h) pub const SIGEV_NONE: c_int = 0; diff --git a/src/unix/aix/mod.rs b/src/unix/aix/mod.rs index 04df0b6ba336d..79e8ac708d3e4 100644 --- a/src/unix/aix/mod.rs +++ b/src/unix/aix/mod.rs @@ -932,7 +932,6 @@ pub const RTAX_IFP: c_int = 4; pub const RTAX_IFA: c_int = 5; pub const RTAX_AUTHOR: c_int = 6; pub const RTAX_BRD: c_int = 7; -pub const RTAX_MAX: c_int = 8; pub const RTF_UP: c_int = 0x1; pub const RTF_GATEWAY: c_int = 0x2; pub const RTF_HOST: c_int = 0x4; diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 86fba1a2dc58f..e5baa31023840 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -79,13 +79,7 @@ pub type ledger_array_t = *mut crate::ledger_t; pub type iconv_t = *mut c_void; -// mach/host_info.h -pub type host_cpu_load_info_t = *mut host_cpu_load_info; -pub type host_cpu_load_info_data_t = host_cpu_load_info; - // mach/processor_info.h -pub type processor_cpu_load_info_t = *mut processor_cpu_load_info; -pub type processor_cpu_load_info_data_t = processor_cpu_load_info; pub type processor_basic_info_t = *mut processor_basic_info; pub type processor_basic_info_data_t = processor_basic_info; pub type processor_set_basic_info_data_t = processor_set_basic_info; @@ -892,16 +886,6 @@ s! { pub vi_fsid: crate::fsid_t, } - pub struct vnode_info_path { - pub vip_vi: vnode_info, - pub vip_path: [c_char; crate::MAXPATHLEN as usize], - } - - pub struct proc_vnodepathinfo { - pub pvi_cdir: vnode_info_path, - pub pvi_rdir: vnode_info_path, - } - pub struct vm_statistics { pub free_count: natural_t, pub active_count: natural_t, @@ -1204,11 +1188,6 @@ s! { pub ifs6_out_mlddone: crate::u_quad_t, } - // mach/host_info.h - pub struct host_cpu_load_info { - pub cpu_ticks: [crate::natural_t; CPU_STATE_MAX as usize], - } - // net/if_mib.h pub struct ifmibdata { /// Name of interface @@ -1366,9 +1345,6 @@ s! { __unused1: Padding<*mut c_void>, //actually a function pointer pub sigev_notify_attributes: *mut crate::pthread_attr_t, } - pub struct processor_cpu_load_info { - pub cpu_ticks: [c_uint; CPU_STATE_MAX as usize], - } pub struct processor_basic_info { pub cpu_type: cpu_type_t, @@ -2014,7 +1990,6 @@ pub const CPU_STATE_USER: c_int = 0; pub const CPU_STATE_SYSTEM: c_int = 1; pub const CPU_STATE_IDLE: c_int = 2; pub const CPU_STATE_NICE: c_int = 3; -pub const CPU_STATE_MAX: c_int = 4; pub const PROCESSOR_BASIC_INFO: c_int = 1; pub const PROCESSOR_CPU_LOAD_INFO: c_int = 2; @@ -3396,14 +3371,6 @@ pub const HW_TARGET: c_int = 26; pub const HW_PRODUCT: c_int = 27; pub const HW_MAXID: c_int = 28; pub const USER_CS_PATH: c_int = 1; -pub const USER_BC_BASE_MAX: c_int = 2; -pub const USER_BC_DIM_MAX: c_int = 3; -pub const USER_BC_SCALE_MAX: c_int = 4; -pub const USER_BC_STRING_MAX: c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: c_int = 6; -pub const USER_EXPR_NEST_MAX: c_int = 7; -pub const USER_LINE_MAX: c_int = 8; -pub const USER_RE_DUP_MAX: c_int = 9; pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; @@ -3526,8 +3493,6 @@ pub const RTV_SSTHRESH: c_int = 0x20; pub const RTV_RTT: c_int = 0x40; pub const RTV_RTTVAR: c_int = 0x80; -pub const RTAX_MAX: c_int = 8; - pub const KERN_PROCARGS2: c_int = 49; pub const PROC_PIDTASKALLINFO: c_int = 2; diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 22cb415f9b552..489eab27d558a 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -641,14 +641,6 @@ pub const HW_MACHINE_PLATFORM: c_int = 12; pub const HW_SENSORS: c_int = 13; pub const HW_MAXID: c_int = 14; pub const USER_CS_PATH: c_int = 1; -pub const USER_BC_BASE_MAX: c_int = 2; -pub const USER_BC_DIM_MAX: c_int = 3; -pub const USER_BC_SCALE_MAX: c_int = 4; -pub const USER_BC_STRING_MAX: c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: c_int = 6; -pub const USER_EXPR_NEST_MAX: c_int = 7; -pub const USER_LINE_MAX: c_int = 8; -pub const USER_RE_DUP_MAX: c_int = 9; pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; @@ -1168,7 +1160,6 @@ pub const RTM_VERSION: c_int = 7; pub const RTAX_MPLS1: c_int = 8; pub const RTAX_MPLS2: c_int = 9; pub const RTAX_MPLS3: c_int = 10; -pub const RTAX_MAX: c_int = 11; const fn _CMSG_ALIGN(n: usize) -> usize { (n + (size_of::() - 1)) & !(size_of::() - 1) diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index ed6391cea51a2..c628437800a91 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -384,42 +384,6 @@ s! { b_destroying: c_int, } - pub struct kinfo_vmentry { - pub kve_structsize: c_int, - pub kve_type: c_int, - pub kve_start: u64, - pub kve_end: u64, - pub kve_offset: u64, - pub kve_vn_fileid: u64, - #[cfg(not(freebsd11))] - pub kve_vn_fsid_freebsd11: u32, - #[cfg(freebsd11)] - pub kve_vn_fsid: u32, - pub kve_flags: c_int, - pub kve_resident: c_int, - pub kve_private_resident: c_int, - pub kve_protection: c_int, - pub kve_ref_count: c_int, - pub kve_shadow_count: c_int, - pub kve_vn_type: c_int, - pub kve_vn_size: u64, - #[cfg(not(freebsd11))] - pub kve_vn_rdev_freebsd11: u32, - #[cfg(freebsd11)] - pub kve_vn_rdev: u32, - pub kve_vn_mode: u16, - pub kve_status: u16, - #[cfg(not(freebsd11))] - pub kve_vn_fsid: u64, - #[cfg(not(freebsd11))] - pub kve_vn_rdev: u64, - #[cfg(not(freebsd11))] - _kve_is_spare: [c_int; 8], - #[cfg(freebsd11)] - _kve_is_spare: [c_int; 12], - pub kve_path: [c_char; crate::PATH_MAX as usize], - } - pub struct __c_anonymous_filestat { pub stqe_next: *mut filestat, } @@ -954,11 +918,6 @@ s! { pub psk: [u8; crate::TCP_FASTOPEN_PSK_LEN as usize], } - pub struct tcp_function_set { - pub function_set_name: [c_char; crate::TCP_FUNCTION_NAME_LEN_MAX as usize], - pub pcbcnt: u32, - } - // Note: this structure will change in a backwards-incompatible way in // FreeBSD 15. pub struct tcp_info { @@ -1465,12 +1424,6 @@ s! { pub __ifi_lastchange: __c_anonymous_ifi_lastchange, } - pub struct ifstat { - /// if name, e.g. "en0" - pub ifs_name: [c_char; crate::IFNAMSIZ as usize], - pub ascii: [c_char; crate::IFSTATMAX as usize + 1], - } - pub struct ifrsskey { /// if name, e.g. "en0" pub ifrk_name: [c_char; crate::IFNAMSIZ as usize], @@ -1569,23 +1522,6 @@ s! { pub cause: sctp_error_cause, pub hmac_id: u16, } - - pub struct kinfo_file { - pub kf_structsize: c_int, - pub kf_type: c_int, - pub kf_fd: c_int, - pub kf_ref_count: c_int, - pub kf_flags: c_int, - _kf_pad0: Padding, - pub kf_offset: i64, - _priv: [u8; 304], // FIXME(freebsd): this is really a giant union - pub kf_status: u16, - _kf_pad1: Padding, - _kf_ispare0: c_int, - pub kf_cap_rights: crate::cap_rights_t, - _kf_cap_spare: u64, - pub kf_path: [c_char; crate::PATH_MAX as usize], - } } s_no_extra_traits! { @@ -2320,14 +2256,6 @@ pub const HW_MACHINE_ARCH: c_int = 11; pub const HW_REALMEM: c_int = 12; pub const USER_CS_PATH: c_int = 1; -pub const USER_BC_BASE_MAX: c_int = 2; -pub const USER_BC_DIM_MAX: c_int = 3; -pub const USER_BC_SCALE_MAX: c_int = 4; -pub const USER_BC_STRING_MAX: c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: c_int = 6; -pub const USER_EXPR_NEST_MAX: c_int = 7; -pub const USER_LINE_MAX: c_int = 8; -pub const USER_RE_DUP_MAX: c_int = 9; pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; @@ -2444,7 +2372,6 @@ pub const SO_TS_BINTIME: c_int = 1; pub const SO_TS_REALTIME: c_int = 2; pub const SO_TS_MONOTONIC: c_int = 3; pub const SO_TS_DEFAULT: c_int = SO_TS_REALTIME_MICRO; -pub const SO_TS_CLOCK_MAX: c_int = SO_TS_MONOTONIC; pub const LOCAL_CREDS: c_int = 2; pub const LOCAL_CREDS_PERSISTENT: c_int = 3; @@ -2724,8 +2651,6 @@ pub const IFNET_SLOWHZ: c_int = 1; pub const IFAN_ARRIVAL: c_int = 0; pub const IFAN_DEPARTURE: c_int = 1; -pub const IFSTATMAX: c_int = 800; - pub const RSS_FUNC_NONE: c_int = 0; pub const RSS_FUNC_PRIVATE: c_int = 1; pub const RSS_FUNC_TOEPLITZ: c_int = 2; @@ -3061,7 +2986,6 @@ pub const TCP_PCAP_IN: c_int = 4096; pub const TCP_FUNCTION_BLK: c_int = 8192; pub const TCP_FUNCTION_ALIAS: c_int = 8193; pub const TCP_FASTOPEN_PSK_LEN: c_int = 16; -pub const TCP_FUNCTION_NAME_LEN_MAX: c_int = 32; pub const TCP_REUSPORT_LB_NUMA: c_int = 1026; pub const TCP_RACK_MBUF_QUEUE: c_int = 1050; @@ -3428,7 +3352,6 @@ pub const KKST_STATE_RUNNING: c_int = 2; // Constants about priority. pub const PRI_MIN: c_int = 0; -pub const PRI_MAX: c_int = 255; pub const PRI_MIN_ITHD: c_int = PRI_MIN; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] @@ -3493,7 +3416,6 @@ pub const PRI_MAX_TIMESHARE: c_int = PRI_MIN_IDLE - 1; #[allow(deprecated)] pub const PUSER: c_int = PRI_MIN_TIMESHARE; pub const PRI_MIN_IDLE: c_int = 224; -pub const PRI_MAX_IDLE: c_int = PRI_MAX; pub const NZERO: c_int = 0; @@ -3510,16 +3432,12 @@ cfg_if! { pub const CHILD_MAX: c_int = 40; /// max command name remembered pub const MAXCOMLEN: usize = 19; -/// max interpreter file name length -pub const MAXINTERP: c_int = crate::PATH_MAX; /// max login name length (incl. NUL) pub const MAXLOGNAME: c_int = 33; /// max simultaneous processes pub const MAXUPRC: c_int = CHILD_MAX; /// max bytes for an exec function pub const NCARGS: c_int = ARG_MAX; -/// /* max number groups -pub const NGROUPS: c_int = NGROUPS_MAX + 1; /// max open files per process pub const NOFILE: c_int = OPEN_MAX; /// marker for empty group set member @@ -3530,11 +3448,7 @@ pub const MAXHOSTNAMELEN: c_int = 256; pub const MAX_CANON: c_int = 255; /// max bytes in terminal input pub const MAX_INPUT: c_int = 255; -/// max bytes in a file name -pub const NAME_MAX: c_int = 255; pub const MAXSYMLINKS: c_int = 32; -/// max supplemental group id's -pub const NGROUPS_MAX: c_int = 1023; /// max open files per process pub const OPEN_MAX: c_int = 64; @@ -3547,25 +3461,6 @@ pub const _POSIX_PIPE_BUF: c_int = 512; pub const _POSIX_SSIZE_MAX: c_int = 32767; pub const _POSIX_STREAM_MAX: c_int = 8; -/// max ibase/obase values in bc(1) -pub const BC_BASE_MAX: c_int = 99; -/// max array elements in bc(1) -pub const BC_DIM_MAX: c_int = 2048; -/// max scale value in bc(1) -pub const BC_SCALE_MAX: c_int = 99; -/// max const string length in bc(1) -pub const BC_STRING_MAX: c_int = 1000; -/// max character class name size -pub const CHARCLASS_NAME_MAX: c_int = 14; -/// max weights for order keyword -pub const COLL_WEIGHTS_MAX: c_int = 10; -/// max expressions nested in expr(1) -pub const EXPR_NEST_MAX: c_int = 32; -/// max bytes in an input line -pub const LINE_MAX: c_int = 2048; -/// max RE's in interval notation -pub const RE_DUP_MAX: c_int = 255; - pub const _POSIX2_BC_BASE_MAX: c_int = 99; pub const _POSIX2_BC_DIM_MAX: c_int = 2048; pub const _POSIX2_BC_SCALE_MAX: c_int = 99; @@ -3971,8 +3866,6 @@ pub const RTF_FIXEDMTU: c_int = 0x80000; pub const RTM_VERSION: c_int = 5; -pub const RTAX_MAX: c_int = 8; - // sys/signal.h pub const SIGTHR: c_int = 32; pub const SIGLWP: c_int = SIGTHR; @@ -4018,7 +3911,6 @@ pub const SCTP_PR_SCTP_TTL: c_int = 0x0001; pub const SCTP_PR_SCTP_PRIO: c_int = 0x0002; pub const SCTP_PR_SCTP_BUF: c_int = SCTP_PR_SCTP_PRIO; pub const SCTP_PR_SCTP_RTX: c_int = 0x0003; -pub const SCTP_PR_SCTP_MAX: c_int = SCTP_PR_SCTP_RTX; pub const SCTP_PR_SCTP_ALL: c_int = 0x000f; pub const SCTP_INIT: c_int = 0x0001; @@ -4100,7 +3992,6 @@ pub const SCTP_ASSOC_SUPPORTS_ASCONF: c_int = 0x03; pub const SCTP_ASSOC_SUPPORTS_MULTIBUF: c_int = 0x04; pub const SCTP_ASSOC_SUPPORTS_RE_CONFIG: c_int = 0x05; pub const SCTP_ASSOC_SUPPORTS_INTERLEAVING: c_int = 0x06; -pub const SCTP_ASSOC_SUPPORTS_MAX: c_int = 0x06; pub const SCTP_ADDR_AVAILABLE: c_int = 0x0001; pub const SCTP_ADDR_UNREACHABLE: c_int = 0x0002; @@ -4316,14 +4207,6 @@ safe_f! { pub const fn PR_SCTP_RTX_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) == SCTP_PR_SCTP_RTX } - - pub const fn PR_SCTP_INVALID_POLICY(x: c_int) -> bool { - PR_SCTP_POLICY(x) > SCTP_PR_SCTP_MAX - } - - pub const fn PR_SCTP_VALID_POLICY(x: c_int) -> bool { - PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX - } } cfg_if! { @@ -4877,8 +4760,6 @@ extern "C" { pub fn kld_isloaded(name: *const c_char) -> c_int; pub fn kld_load(name: *const c_char) -> c_int; - pub fn kinfo_getvmmap(pid: crate::pid_t, cntp: *mut c_int) -> *mut kinfo_vmentry; - pub fn hexdump(ptr: *const c_void, length: c_int, hdr: *const c_char, flags: c_int); pub fn humanize_number( buf: *mut c_char, @@ -4922,12 +4803,6 @@ extern "C" { count: *mut c_uint, ) -> *mut kinfo_proc; pub fn procstat_freeprocs(procstat: *mut procstat, p: *mut kinfo_proc); - pub fn procstat_getvmmap( - procstat: *mut procstat, - kp: *mut kinfo_proc, - count: *mut c_uint, - ) -> *mut kinfo_vmentry; - pub fn procstat_freevmmap(procstat: *mut procstat, vmmap: *mut kinfo_vmentry); pub fn procstat_close(procstat: *mut procstat); pub fn procstat_freeargv(procstat: *mut procstat); pub fn procstat_freeenvv(procstat: *mut procstat); diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 47fd27321609f..49d058557c51a 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -163,9 +163,6 @@ pub const FIOASYNC: c_ulong = 0x8004667d; pub const FIOSETOWN: c_ulong = 0x8004667c; pub const FIOGETOWN: c_ulong = 0x4004667b; -pub const PATH_MAX: c_int = 1024; -pub const MAXPATHLEN: c_int = PATH_MAX; - pub const IOV_MAX: c_int = 1024; pub const SA_ONSTACK: c_int = 0x0001; diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index f67d9ad740c62..8193f5504eddd 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -371,14 +371,6 @@ s! { pub sc_groups: [crate::gid_t; 1], } - pub struct uucred { - cr_unused: Padding, - pub cr_uid: crate::uid_t, - pub cr_gid: crate::gid_t, - pub cr_ngroups: c_short, - pub cr_groups: [crate::gid_t; NGROUPS_MAX as usize], - } - pub struct unpcbid { pub unp_pid: crate::pid_t, pub unp_euid: crate::uid_t, @@ -615,29 +607,6 @@ s! { pub l_name: [c_char; KI_LNAMELEN as usize], } - pub struct kinfo_vmentry { - pub kve_start: u64, - pub kve_end: u64, - pub kve_offset: u64, - pub kve_type: u32, - pub kve_flags: u32, - pub kve_count: u32, - pub kve_wired_count: u32, - pub kve_advice: u32, - pub kve_attributes: u32, - pub kve_protection: u32, - pub kve_max_protection: u32, - pub kve_ref_count: u32, - pub kve_inheritance: u32, - pub kve_vn_fileid: u64, - pub kve_vn_size: u64, - pub kve_vn_fsid: u64, - pub kve_vn_rdev: u64, - pub kve_vn_type: u32, - pub kve_vn_mode: u32, - pub kve_path: [c_char; crate::PATH_MAX as usize], - } - pub struct __c_anonymous_posix_spawn_fae_open { pub path: *mut c_char, pub oflag: c_int, @@ -1715,8 +1684,6 @@ pub const KVME_FLAG_PAGEABLE: c_int = 0x000000008; pub const KVME_FLAG_GROWS_UP: c_int = 0x000000010; pub const KVME_FLAG_GROWS_DOWN: c_int = 0x000000020; -pub const NGROUPS_MAX: c_int = 16; - pub const KI_NGROUPS: c_int = 16; pub const KI_MAXCOMLEN: c_int = 24; pub const KI_WMESGLEN: c_int = 8; @@ -1791,7 +1758,6 @@ pub const RTM_CHGADDR: c_int = 0x18; pub const RTA_TAG: c_int = 0x100; pub const RTAX_TAG: c_int = 8; -pub const RTAX_MAX: c_int = 9; // For eventfd pub const EFD_SEMAPHORE: c_int = crate::O_RDWR; @@ -2437,8 +2403,6 @@ extern "C" { clrp: *mut c_ulong, ) -> c_int; pub fn flags_to_string(flags: c_ulong, def: *const c_char) -> c_int; - - pub fn kinfo_getvmmap(pid: crate::pid_t, cntp: *mut size_t) -> *mut kinfo_vmentry; } #[link(name = "execinfo")] diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index 6242505420559..c6aa5ccabf629 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -1507,8 +1507,6 @@ pub const ISOFSMNT_EXTATT: c_int = 0x4; // enable extended attr pub const ISOFSMNT_NOJOLIET: c_int = 0x8; // disable Joliet Ext pub const ISOFSMNT_SESS: c_int = 0x10; // use iso_args.sess -pub const NFS_ARGSVERSION: c_int = 4; // change when nfs_args changes - pub const NFSMNT_RESVPORT: c_int = 0; // always use reserved ports pub const NFSMNT_SOFT: c_int = 0x1; // soft mount (hard is default) pub const NFSMNT_WSIZE: c_int = 0x2; // set write size @@ -1814,7 +1812,6 @@ pub const RTAX_BFD: c_int = 11; pub const RTAX_DNS: c_int = 12; pub const RTAX_STATIC: c_int = 13; pub const RTAX_SEARCH: c_int = 14; -pub const RTAX_MAX: c_int = 15; const fn _ALIGN(p: usize) -> usize { (p + _ALIGNBYTES) & !_ALIGNBYTES diff --git a/src/unix/cygwin/mod.rs b/src/unix/cygwin/mod.rs index c712c03ff5b32..4f55849a5ac39 100644 --- a/src/unix/cygwin/mod.rs +++ b/src/unix/cygwin/mod.rs @@ -897,9 +897,7 @@ pub const ARG_MAX: c_int = 32000; pub const CHILD_MAX: c_int = 256; pub const IOV_MAX: c_int = 1024; pub const PTHREAD_STACK_MIN: size_t = 65536; -pub const PATH_MAX: c_int = 4096; pub const PIPE_BUF: usize = 4096; -pub const NGROUPS_MAX: c_int = 1024; pub const FILENAME_MAX: c_int = 4096; diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index bf1e8d5f2938f..8a3eb11738acb 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -902,7 +902,6 @@ pub const MINSIGSTKSZ: size_t = 8192; pub const SIGSTKSZ: size_t = 16384; pub const IOV_MAX: c_int = 1024; -pub const PATH_MAX: c_int = 1024; pub const SA_NOCLDSTOP: c_int = 0x01; pub const SA_NOCLDWAIT: c_int = 0x02; diff --git a/src/unix/haiku/native.rs b/src/unix/haiku/native.rs index 9c86f72638a3c..d7d9e0c5fc203 100644 --- a/src/unix/haiku/native.rs +++ b/src/unix/haiku/native.rs @@ -390,28 +390,6 @@ s! { pub fsh_name: [c_char; B_OS_NAME_LENGTH], } - // kernel/image.h - // FIXME(1.0): This should not implement `PartialEq` - #[allow(unpredictable_function_pointer_comparisons)] - pub struct image_info { - pub id: image_id, - pub image_type: c_int, - pub sequence: i32, - pub init_order: i32, - // FIXME(1.0): these should be made optional - pub init_routine: extern "C" fn(), - pub term_routine: extern "C" fn(), - pub device: crate::dev_t, - pub node: crate::ino_t, - pub name: [c_char; crate::PATH_MAX as usize], - pub text: *mut c_void, - pub data: *mut c_void, - pub text_size: i32, - pub data_size: i32, - pub api_version: i32, - pub abi: i32, - } - pub struct __c_anonymous_eax_0 { pub max_eax: u32, pub vendor_id: [c_char; 12], @@ -629,7 +607,6 @@ pub const B_SYMBOL_TYPE_ANY: i32 = 0x5; // storage/StorageDefs.h pub const B_DEV_NAME_LENGTH: usize = 128; pub const B_FILE_NAME_LENGTH: usize = crate::FILENAME_MAX as usize; -pub const B_PATH_NAME_LENGTH: usize = crate::PATH_MAX as usize; pub const B_ATTR_NAME_LENGTH: usize = B_FILE_NAME_LENGTH - 1; pub const B_MIME_TYPE_LENGTH: usize = B_ATTR_NAME_LENGTH - 15; pub const B_MAX_SYMLINKS: usize = 16; @@ -1219,13 +1196,6 @@ extern "C" { symbolLocation: *mut *mut c_void, ) -> status_t; pub fn clear_caches(address: *mut c_void, length: size_t, flags: u32); - pub fn _get_image_info(image: image_id, info: *mut image_info, size: size_t) -> status_t; - pub fn _get_next_image_info( - team: team_id, - cookie: *mut i32, - info: *mut image_info, - size: size_t, - ) -> status_t; pub fn find_path( codePointer: *const c_void, baseDirectory: path_base_directory, @@ -1373,18 +1343,3 @@ pub unsafe fn get_next_thread_info( ) -> status_t { _get_next_thread_info(team, cookie, info, size_of::() as size_t) } - -// kernel/image.h -#[inline] -pub unsafe fn get_image_info(image: image_id, info: *mut image_info) -> status_t { - _get_image_info(image, info, size_of::() as size_t) -} - -#[inline] -pub unsafe fn get_next_image_info( - team: team_id, - cookie: *mut i32, - info: *mut image_info, -) -> status_t { - _get_next_image_info(team, cookie, info, size_of::() as size_t) -} diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs index 29a5c95e9bb26..027f4b483f86a 100644 --- a/src/unix/hurd/mod.rs +++ b/src/unix/hurd/mod.rs @@ -1230,7 +1230,6 @@ pub const PF_IPX: c_int = 23; pub const PF_SIP: c_int = 24; pub const PF_PIP: c_int = 25; pub const PF_INET6: c_int = 26; -pub const PF_MAX: c_int = 27; pub const AF_UNSPEC: c_int = 0; pub const AF_LOCAL: c_int = 1; pub const AF_UNIX: c_int = 1; @@ -1260,7 +1259,6 @@ pub const AF_IPX: c_int = 23; pub const AF_SIP: c_int = 24; pub const pseudo_AF_PIP: c_int = 25; pub const AF_INET6: c_int = 26; -pub const AF_MAX: c_int = 27; pub const SOMAXCONN: c_int = 4096; pub const _SS_SIZE: usize = 128; pub const CMGROUP_MAX: usize = 16; @@ -1526,8 +1524,6 @@ pub const _POSIX_QLIMIT: usize = 1; pub const _POSIX_HIWAT: usize = 512; pub const _POSIX_UIO_MAXIOV: usize = 16; pub const _POSIX_CLOCKRES_MIN: usize = 20000000; -pub const NAME_MAX: usize = 255; -pub const NGROUPS_MAX: usize = 256; pub const _POSIX_THREAD_KEYS_MAX: usize = 128; pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: usize = 4; pub const _POSIX_THREAD_THREADS_MAX: usize = 64; @@ -3207,7 +3203,6 @@ pub const RTLD_DI_PROFILEOUT: c_int = 8; pub const RTLD_DI_TLS_MODID: c_int = 9; pub const RTLD_DI_TLS_DATA: c_int = 10; pub const RTLD_DI_PHDR: c_int = 11; -pub const RTLD_DI_MAX: c_int = 11; pub const SI_ASYNCIO: c_int = -4; pub const SI_MESGQ: c_int = -3; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 4e3f8a1f4b678..3130367e228b5 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -561,16 +561,6 @@ s! { pub ff_effects_max: crate::__u32, } - pub struct uinput_user_dev { - pub name: [c_char; UINPUT_MAX_NAME_SIZE], - pub id: input_id, - pub ff_effects_max: crate::__u32, - pub absmax: [crate::__s32; ABS_CNT], - pub absmin: [crate::__s32; ABS_CNT], - pub absfuzz: [crate::__s32; ABS_CNT], - pub absflat: [crate::__s32; ABS_CNT], - } - pub struct prop_info { __name: [c_char; 32], __serial: c_uint, @@ -1681,7 +1671,6 @@ pub const NFQA_CFG_F_CONNTRACK: c_int = 0x0002; pub const NFQA_CFG_F_GSO: c_int = 0x0004; pub const NFQA_CFG_F_UID_GID: c_int = 0x0008; pub const NFQA_CFG_F_SECCTX: c_int = 0x0010; -pub const NFQA_CFG_F_MAX: c_int = 0x0020; pub const NFQA_SKB_CSUMNOTREADY: c_int = 0x0001; pub const NFQA_SKB_GSO: c_int = 0x0002; @@ -2001,7 +1990,6 @@ pub const NFT_REG_1: c_int = 1; pub const NFT_REG_2: c_int = 2; pub const NFT_REG_3: c_int = 3; pub const NFT_REG_4: c_int = 4; -pub const __NFT_REG_MAX: c_int = 5; pub const NFT_REG32_00: c_int = 8; pub const NFT_REG32_01: c_int = 9; pub const NFT_REG32_02: c_int = 10; @@ -2050,7 +2038,6 @@ pub const NFT_MSG_NEWOBJ: c_int = 18; pub const NFT_MSG_GETOBJ: c_int = 19; pub const NFT_MSG_DELOBJ: c_int = 20; pub const NFT_MSG_GETOBJ_RESET: c_int = 21; -pub const NFT_MSG_MAX: c_int = 25; pub const NFT_SET_ANONYMOUS: c_int = 0x1; pub const NFT_SET_CONSTANT: c_int = 0x2; @@ -2180,34 +2167,6 @@ pub const NFT_TRACETYPE_RULE: c_int = 3; pub const NFT_NG_INCREMENTAL: c_int = 0; pub const NFT_NG_RANDOM: c_int = 1; -// linux/input.h -pub const FF_MAX: crate::__u16 = 0x7f; -pub const FF_CNT: usize = FF_MAX as usize + 1; - -// linux/input-event-codes.h -pub const INPUT_PROP_MAX: crate::__u16 = 0x1f; -pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1; -pub const EV_MAX: crate::__u16 = 0x1f; -pub const EV_CNT: usize = EV_MAX as usize + 1; -pub const SYN_MAX: crate::__u16 = 0xf; -pub const SYN_CNT: usize = SYN_MAX as usize + 1; -pub const KEY_MAX: crate::__u16 = 0x2ff; -pub const KEY_CNT: usize = KEY_MAX as usize + 1; -pub const REL_MAX: crate::__u16 = 0x0f; -pub const REL_CNT: usize = REL_MAX as usize + 1; -pub const ABS_MAX: crate::__u16 = 0x3f; -pub const ABS_CNT: usize = ABS_MAX as usize + 1; -pub const SW_MAX: crate::__u16 = 0x0f; -pub const SW_CNT: usize = SW_MAX as usize + 1; -pub const MSC_MAX: crate::__u16 = 0x07; -pub const MSC_CNT: usize = MSC_MAX as usize + 1; -pub const LED_MAX: crate::__u16 = 0x0f; -pub const LED_CNT: usize = LED_MAX as usize + 1; -pub const REP_MAX: crate::__u16 = 0x01; -pub const REP_CNT: usize = REP_MAX as usize + 1; -pub const SND_MAX: crate::__u16 = 0x07; -pub const SND_CNT: usize = SND_MAX as usize + 1; - // linux/uinput.h pub const UINPUT_VERSION: c_uint = 5; pub const UINPUT_MAX_NAME_SIZE: usize = 80; @@ -2835,7 +2794,6 @@ pub const PR_SCHED_CORE_GET: c_int = 0; pub const PR_SCHED_CORE_CREATE: c_int = 1; pub const PR_SCHED_CORE_SHARE_TO: c_int = 2; pub const PR_SCHED_CORE_SHARE_FROM: c_int = 3; -pub const PR_SCHED_CORE_MAX: c_int = 4; pub const PR_SCHED_CORE_SCOPE_THREAD: c_int = 0; pub const PR_SCHED_CORE_SCOPE_THREAD_GROUP: c_int = 1; pub const PR_SCHED_CORE_SCOPE_PROCESS_GROUP: c_int = 2; @@ -3138,7 +3096,6 @@ pub const KERN_S390_USER_DEBUG_LOGGING: c_int = 51; pub const KERN_CORE_USES_PID: c_int = 52; pub const KERN_TAINTED: c_int = 53; pub const KERN_CADPID: c_int = 54; -pub const KERN_PIDMAX: c_int = 55; pub const KERN_CORE_PATTERN: c_int = 56; pub const KERN_PANIC_ON_OOPS: c_int = 57; pub const KERN_HPPA_PWRSW: c_int = 58; @@ -3146,7 +3103,6 @@ pub const KERN_HPPA_UNALIGNED: c_int = 59; pub const KERN_PRINTK_RATELIMIT: c_int = 60; pub const KERN_PRINTK_RATELIMIT_BURST: c_int = 61; pub const KERN_PTY: c_int = 62; -pub const KERN_NGROUPS_MAX: c_int = 63; pub const KERN_SPARC_SCONS_PWROFF: c_int = 64; pub const KERN_HZ_TIMER: c_int = 65; pub const KERN_UNKNOWN_NMI_PANIC: c_int = 66; diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 570ede87403a7..8f838602ec60d 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1193,16 +1193,6 @@ s! { pub ff_effects_max: __u32, } - pub struct uinput_user_dev { - pub name: [c_char; UINPUT_MAX_NAME_SIZE], - pub id: input_id, - pub ff_effects_max: __u32, - pub absmax: [__s32; ABS_CNT], - pub absmin: [__s32; ABS_CNT], - pub absfuzz: [__s32; ABS_CNT], - pub absflat: [__s32; ABS_CNT], - } - // x32 compatibility // See https://sourceware.org/bugzilla/show_bug.cgi?id=21279 pub struct mq_attr { @@ -1714,7 +1704,6 @@ pub const SKF_AD_VLAN_TAG_PRESENT: c_int = 48; pub const SKF_AD_PAY_OFFSET: c_int = 52; pub const SKF_AD_RANDOM: c_int = 56; pub const SKF_AD_VLAN_TPID: c_int = 60; -pub const SKF_AD_MAX: c_int = 64; pub const SKF_NET_OFF: c_int = -0x100000; pub const SKF_LL_OFF: c_int = -0x200000; pub const BPF_NET_OFF: c_int = SKF_NET_OFF; @@ -2015,7 +2004,6 @@ pub const NFQA_CFG_F_CONNTRACK: c_int = 0x0002; pub const NFQA_CFG_F_GSO: c_int = 0x0004; pub const NFQA_CFG_F_UID_GID: c_int = 0x0008; pub const NFQA_CFG_F_SECCTX: c_int = 0x0010; -pub const NFQA_CFG_F_MAX: c_int = 0x0020; pub const NFQA_SKB_CSUMNOTREADY: c_int = 0x0001; pub const NFQA_SKB_GSO: c_int = 0x0002; @@ -3120,7 +3108,6 @@ pub const NFT_REG_1: c_int = 1; pub const NFT_REG_2: c_int = 2; pub const NFT_REG_3: c_int = 3; pub const NFT_REG_4: c_int = 4; -pub const __NFT_REG_MAX: c_int = 5; pub const NFT_REG32_00: c_int = 8; pub const NFT_REG32_01: c_int = 9; pub const NFT_REG32_02: c_int = 10; @@ -3174,8 +3161,6 @@ cfg_if! { } } -pub const NFT_MSG_MAX: c_int = 34; - pub const NFT_SET_ANONYMOUS: c_int = 0x1; pub const NFT_SET_CONSTANT: c_int = 0x2; pub const NFT_SET_INTERVAL: c_int = 0x4; @@ -3303,10 +3288,6 @@ pub const NFT_TRACETYPE_RULE: c_int = 3; pub const NFT_NG_INCREMENTAL: c_int = 0; pub const NFT_NG_RANDOM: c_int = 1; -// linux/input.h -pub const FF_MAX: __u16 = 0x7f; -pub const FF_CNT: usize = FF_MAX as usize + 1; - // linux/input-event-codes.h pub const INPUT_PROP_POINTER: __u16 = 0x00; pub const INPUT_PROP_DIRECT: __u16 = 0x01; @@ -3315,28 +3296,6 @@ pub const INPUT_PROP_SEMI_MT: __u16 = 0x03; pub const INPUT_PROP_TOPBUTTONPAD: __u16 = 0x04; pub const INPUT_PROP_POINTING_STICK: __u16 = 0x05; pub const INPUT_PROP_ACCELEROMETER: __u16 = 0x06; -pub const INPUT_PROP_MAX: __u16 = 0x1f; -pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1; -pub const EV_MAX: __u16 = 0x1f; -pub const EV_CNT: usize = EV_MAX as usize + 1; -pub const SYN_MAX: __u16 = 0xf; -pub const SYN_CNT: usize = SYN_MAX as usize + 1; -pub const KEY_MAX: __u16 = 0x2ff; -pub const KEY_CNT: usize = KEY_MAX as usize + 1; -pub const REL_MAX: __u16 = 0x0f; -pub const REL_CNT: usize = REL_MAX as usize + 1; -pub const ABS_MAX: __u16 = 0x3f; -pub const ABS_CNT: usize = ABS_MAX as usize + 1; -pub const SW_MAX: __u16 = 0x10; -pub const SW_CNT: usize = SW_MAX as usize + 1; -pub const MSC_MAX: __u16 = 0x07; -pub const MSC_CNT: usize = MSC_MAX as usize + 1; -pub const LED_MAX: __u16 = 0x0f; -pub const LED_CNT: usize = LED_MAX as usize + 1; -pub const REP_MAX: __u16 = 0x01; -pub const REP_CNT: usize = REP_MAX as usize + 1; -pub const SND_MAX: __u16 = 0x07; -pub const SND_CNT: usize = SND_MAX as usize + 1; // linux/uinput.h pub const UINPUT_VERSION: c_uint = 5; @@ -3569,7 +3528,6 @@ pub const SCTP_PR_SCTP_NONE: c_int = 0x0000; pub const SCTP_PR_SCTP_TTL: c_int = 0x0010; pub const SCTP_PR_SCTP_RTX: c_int = 0x0020; pub const SCTP_PR_SCTP_PRIO: c_int = 0x0030; -pub const SCTP_PR_SCTP_MAX: c_int = SCTP_PR_SCTP_PRIO; pub const SCTP_PR_SCTP_MASK: c_int = 0x0030; pub const SCTP_ENABLE_RESET_STREAM_REQ: c_int = 0x01; pub const SCTP_ENABLE_RESET_ASSOC_REQ: c_int = 0x02; @@ -3678,7 +3636,6 @@ pub const KERN_S390_USER_DEBUG_LOGGING: c_int = 51; pub const KERN_CORE_USES_PID: c_int = 52; pub const KERN_TAINTED: c_int = 53; pub const KERN_CADPID: c_int = 54; -pub const KERN_PIDMAX: c_int = 55; pub const KERN_CORE_PATTERN: c_int = 56; pub const KERN_PANIC_ON_OOPS: c_int = 57; pub const KERN_HPPA_PWRSW: c_int = 58; @@ -3686,7 +3643,6 @@ pub const KERN_HPPA_UNALIGNED: c_int = 59; pub const KERN_PRINTK_RATELIMIT: c_int = 60; pub const KERN_PRINTK_RATELIMIT_BURST: c_int = 61; pub const KERN_PTY: c_int = 62; -pub const KERN_NGROUPS_MAX: c_int = 63; pub const KERN_SPARC_SCONS_PWROFF: c_int = 64; pub const KERN_HZ_TIMER: c_int = 65; pub const KERN_UNKNOWN_NMI_PANIC: c_int = 66; diff --git a/src/unix/linux_like/linux/musl/b32/hexagon.rs b/src/unix/linux_like/linux/musl/b32/hexagon.rs index 9a62e4d57d6da..d7dee424ee612 100644 --- a/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -103,7 +103,6 @@ s! { pub const AF_FILE: c_int = 1; pub const AF_KCM: c_int = 41; -pub const AF_MAX: c_int = 43; pub const AF_QIPCRTR: c_int = 42; pub const EADDRINUSE: c_int = 98; pub const EADDRNOTAVAIL: c_int = 99; @@ -236,7 +235,6 @@ pub const O_SYNC: c_int = 1052672; pub const O_RSYNC: c_int = 1052672; pub const PF_FILE: c_int = 1; pub const PF_KCM: c_int = 41; -pub const PF_MAX: c_int = 43; pub const PF_QIPCRTR: c_int = 42; pub const SA_ONSTACK: c_int = 0x08000000; pub const SA_SIGINFO: c_int = 0x00000004; diff --git a/src/unix/linux_like/linux_l4re_shared.rs b/src/unix/linux_like/linux_l4re_shared.rs index 041e2525d9bc8..07efb636e7dcb 100644 --- a/src/unix/linux_like/linux_l4re_shared.rs +++ b/src/unix/linux_like/linux_l4re_shared.rs @@ -1175,7 +1175,6 @@ pub const PR_SCHED_CORE_GET: c_int = 0; pub const PR_SCHED_CORE_CREATE: c_int = 1; pub const PR_SCHED_CORE_SHARE_TO: c_int = 2; pub const PR_SCHED_CORE_SHARE_FROM: c_int = 3; -pub const PR_SCHED_CORE_MAX: c_int = 4; pub const PR_SCHED_CORE_SCOPE_THREAD: c_int = 0; pub const PR_SCHED_CORE_SCOPE_THREAD_GROUP: c_int = 1; pub const PR_SCHED_CORE_SCOPE_PROCESS_GROUP: c_int = 2; @@ -1365,7 +1364,6 @@ pub const RT_CLASS_UNSPEC: u8 = 0; pub const RT_CLASS_DEFAULT: u8 = 253; pub const RT_CLASS_MAIN: u8 = 254; pub const RT_CLASS_LOCAL: u8 = 255; -pub const RT_CLASS_MAX: u8 = 255; pub const MAX_ADDR_LEN: usize = 7; pub const ARPD_UPDATE: c_ushort = 0x01; diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 172e44111e455..34f68ea988c07 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1054,9 +1054,6 @@ pub const LOCK_UN: c_int = 8; pub const SS_ONSTACK: c_int = 1; pub const SS_DISABLE: c_int = 2; -pub const NAME_MAX: c_int = 255; -pub const PATH_MAX: c_int = 4096; - pub const UIO_MAXIOV: c_int = 1024; pub const FD_SETSIZE: c_int = 1024; diff --git a/src/unix/newlib/horizon/mod.rs b/src/unix/newlib/horizon/mod.rs index e94a0bb1c13d8..0f261cc71d32e 100644 --- a/src/unix/newlib/horizon/mod.rs +++ b/src/unix/newlib/horizon/mod.rs @@ -169,7 +169,6 @@ pub const EAI_SYSTEM: c_int = 11; pub const EAI_BADHINTS: c_int = 12; pub const EAI_PROTOCOL: c_int = 13; pub const EAI_OVERFLOW: c_int = 14; -pub const EAI_MAX: c_int = 15; pub const AF_UNIX: c_int = 1; pub const AF_INET6: c_int = 23; diff --git a/src/unix/newlib/rtems/mod.rs b/src/unix/newlib/rtems/mod.rs index ec4534e32a11f..574ec266dcc3a 100644 --- a/src/unix/newlib/rtems/mod.rs +++ b/src/unix/newlib/rtems/mod.rs @@ -56,7 +56,6 @@ pub const SIGWINCH: c_int = 24; pub const SIGUSR1: c_int = 25; pub const SIGUSR2: c_int = 26; pub const SIGRTMIN: c_int = 27; -pub const SIGRTMAX: c_int = 31; pub const SIGXCPU: c_int = 24; pub const SIGXFSZ: c_int = 25; pub const SIGVTALRM: c_int = 26; diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index 134d926d42d19..8416fbe621762 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -1154,8 +1154,6 @@ pub const LOCK_UN: c_int = 0x8; pub const SS_ONSTACK: c_int = 1; pub const SS_DISABLE: c_int = 2; -pub const PATH_MAX: c_int = 1024; - pub const UIO_MAXIOV: c_int = 1024; pub const FD_SETSIZE: c_int = 256; @@ -2340,14 +2338,6 @@ pub const TIOCSTOP: c_int = 29807; pub const TIOCSWINSZ: c_int = -2146929561; pub const USER_CS_PATH: c_int = 1; -pub const USER_BC_BASE_MAX: c_int = 2; -pub const USER_BC_DIM_MAX: c_int = 3; -pub const USER_BC_SCALE_MAX: c_int = 4; -pub const USER_BC_STRING_MAX: c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: c_int = 6; -pub const USER_EXPR_NEST_MAX: c_int = 7; -pub const USER_LINE_MAX: c_int = 8; -pub const USER_RE_DUP_MAX: c_int = 9; pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 12db71c7a57a5..27247eed828c6 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -332,9 +332,6 @@ cfg_if! { } } -// limits.h -pub const PATH_MAX: c_int = 4096; - // fcntl.h pub const F_GETLK: c_int = 5; pub const F_SETLK: c_int = 6; diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index b31c31bd1f6c8..3dba33679a851 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -42,12 +42,6 @@ s! { pub shm_pad4: [i64; 4], } - pub struct fil_info { - pub fi_flags: c_int, - pub fi_pos: c_int, - pub fi_name: [c_char; crate::FILNAME_MAX as usize], - } - #[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), repr(packed(4)))] pub struct epoll_event { pub events: u32, @@ -109,7 +103,6 @@ pub const FD_CLOFORK: c_int = 2; pub const FIL_ATTACH: c_int = 0x1; pub const FIL_DETACH: c_int = 0x2; pub const FIL_LIST: c_int = 0x3; -pub const FILNAME_MAX: c_int = 32; pub const FILF_PROG: c_int = 0x1; pub const FILF_AUTO: c_int = 0x2; pub const FILF_BYPASS: c_int = 0x4; diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index e571e7c1d8617..a1028c154cda5 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -823,8 +823,6 @@ pub const NOEXPR: crate::nl_item = 57; pub const _DATE_FMT: crate::nl_item = 58; pub const MAXSTRMSG: crate::nl_item = 58; -pub const PATH_MAX: c_int = 1024; - pub const SA_ONSTACK: c_int = 0x00000001; pub const SA_RESETHAND: c_int = 0x00000002; pub const SA_RESTART: c_int = 0x00000004; diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index 536930467dde4..ecfe5d4a5b341 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -126,17 +126,6 @@ s! { pub condAttrClockId: crate::clockid_t, } - // b_pthread_cond_t.h - pub struct pthread_cond_t { - pub condSemId: crate::_Vx_SEM_ID, - pub condValid: c_int, - pub condInitted: c_int, - pub condRefCount: c_int, - pub condMutex: *mut crate::pthread_mutex_t, - pub condAttr: crate::pthread_condattr_t, - pub condSemName: [c_char; _PTHREAD_SHARED_SEM_NAME_MAX], - } - // b_pthread_rwlockattr_t.h pub struct pthread_rwlockattr_t { pub rwlockAttrStatus: c_int, @@ -145,16 +134,6 @@ s! { pub rwlockAttrConformOpt: c_uint, } - // b_pthread_rwlock_t.h - pub struct pthread_rwlock_t { - pub rwlockSemId: crate::_Vx_SEM_ID, - pub rwlockReadersRefCount: c_uint, - pub rwlockValid: c_int, - pub rwlockInitted: c_int, - pub rwlockAttr: crate::pthread_rwlockattr_t, - pub rwlockSemName: [c_char; _PTHREAD_SHARED_SEM_NAME_MAX], - } - // b_struct_timeval.h #[derive(Default)] pub struct timeval { @@ -334,18 +313,6 @@ s! { mutexAttrType: c_int, } - // pthread.h (krnl) - // b_pthread_mutex_t.h (usr) - pub struct pthread_mutex_t { - pub mutexSemId: crate::_Vx_SEM_ID, /*_Vx_SEM_ID ..*/ - pub mutexValid: c_int, - pub mutexInitted: c_int, - pub mutexCondRefCount: c_int, - pub mutexSavPriority: c_int, - pub mutexAttr: crate::pthread_mutexattr_t, - pub mutexSemName: [c_char; _PTHREAD_SHARED_SEM_NAME_MAX], - } - // b_struct_timespec.h #[derive(Default)] pub struct timespec { @@ -575,12 +542,6 @@ s! { s_no_extra_traits! { // dirent.h - pub struct dirent { - pub d_ino: crate::ino_t, - pub d_name: [c_char; _PARM_NAME_MAX as usize + 1], - pub d_type: c_uchar, - } - pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, @@ -702,7 +663,6 @@ pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 1; pub const PTHREAD_MUTEX_RECURSIVE: c_int = 2; pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; pub const PTHREAD_STACK_MIN: usize = 4096; -pub const _PTHREAD_SHARED_SEM_NAME_MAX: usize = 30; //sched.h pub const SCHED_FIFO: c_int = 0x01; @@ -1041,7 +1001,6 @@ pub const AF_SOCKDEV: c_int = 31; pub const AF_TIPC: c_int = 33; pub const AF_MIPC: c_int = 34; pub const AF_MIPC_SAFE: c_int = 35; -pub const AF_MAX: c_int = 39; // termios.h pub const B0: crate::speed_t = 0; @@ -1171,7 +1130,6 @@ pub const FIOGETNAME: c_int = 18; pub const FIONBIO: c_int = 0x90040010; // limits.h -pub const PATH_MAX: c_int = _PARM_PATH_MAX; pub const _POSIX_PATH_MAX: c_int = 256; // Some poll stuff @@ -1314,62 +1272,11 @@ pub const AT_SYMLINK_NOFOLLOW: c_int = 0x100; pub const AT_REMOVEDIR: c_int = 0x200; pub const AT_SYMLINK_FOLLOW: c_int = 0x400; -// vxParams.h definitions -pub const _PARM_NAME_MAX: c_int = 255; -pub const _PARM_PATH_MAX: c_int = 1024; - // WAIT STUFF pub const WNOHANG: c_int = 0x01; pub const WUNTRACED: c_int = 0x02; pub const WCONTINUED: c_int = 0x04; -const PTHREAD_MUTEXATTR_INITIALIZER: pthread_mutexattr_t = pthread_mutexattr_t { - mutexAttrStatus: PTHREAD_INITIALIZED_OBJ, - mutexAttrProtocol: PTHREAD_PRIO_NONE, - mutexAttrPrioceiling: 0, - mutexAttrType: PTHREAD_MUTEX_DEFAULT, - mutexAttrPshared: 1, -}; -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { - mutexSemId: ptr::null_mut(), - mutexValid: PTHREAD_VALID_OBJ, - mutexInitted: PTHREAD_UNUSED_YET_OBJ, - mutexCondRefCount: 0, - mutexSavPriority: -1, - mutexAttr: PTHREAD_MUTEXATTR_INITIALIZER, - mutexSemName: [0; _PTHREAD_SHARED_SEM_NAME_MAX], -}; - -const PTHREAD_CONDATTR_INITIALIZER: pthread_condattr_t = pthread_condattr_t { - condAttrStatus: 0xf70990ef, - condAttrPshared: 1, - condAttrClockId: CLOCK_REALTIME, -}; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { - condSemId: ptr::null_mut(), - condValid: PTHREAD_VALID_OBJ, - condInitted: PTHREAD_UNUSED_YET_OBJ, - condRefCount: 0, - condMutex: ptr::null_mut(), - condAttr: PTHREAD_CONDATTR_INITIALIZER, - condSemName: [0; _PTHREAD_SHARED_SEM_NAME_MAX], -}; - -const PTHREAD_RWLOCKATTR_INITIALIZER: pthread_rwlockattr_t = pthread_rwlockattr_t { - rwlockAttrStatus: PTHREAD_INITIALIZED_OBJ, - rwlockAttrPshared: 1, - rwlockAttrMaxReaders: 0, - rwlockAttrConformOpt: 1, -}; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { - rwlockSemId: ptr::null_mut(), - rwlockReadersRefCount: 0, - rwlockValid: PTHREAD_VALID_OBJ, - rwlockInitted: PTHREAD_UNUSED_YET_OBJ, - rwlockAttr: PTHREAD_RWLOCKATTR_INITIALIZER, - rwlockSemName: [0; _PTHREAD_SHARED_SEM_NAME_MAX], -}; - pub const SEEK_SET: c_int = 0; pub const SEEK_CUR: c_int = 1; pub const SEEK_END: c_int = 2; @@ -1773,27 +1680,6 @@ extern "C" { pub fn pthread_mutexattr_settype(pAttr: *mut crate::pthread_mutexattr_t, pType: c_int) -> c_int; - // pthread.h - pub fn pthread_mutex_init( - mutex: *mut pthread_mutex_t, - attr: *const pthread_mutexattr_t, - ) -> c_int; - - // pthread.h - pub fn pthread_mutex_destroy(mutex: *mut pthread_mutex_t) -> c_int; - - // pthread.h - pub fn pthread_mutex_lock(mutex: *mut pthread_mutex_t) -> c_int; - - // pthread.h - pub fn pthread_mutex_trylock(mutex: *mut pthread_mutex_t) -> c_int; - - // pthread.h - pub fn pthread_mutex_timedlock(attr: *mut pthread_mutex_t, spec: *const timespec) -> c_int; - - // pthread.h - pub fn pthread_mutex_unlock(mutex: *mut pthread_mutex_t) -> c_int; - // pthread.h pub fn pthread_attr_setname(pAttr: *mut crate::pthread_attr_t, name: *mut c_char) -> c_int; @@ -1865,16 +1751,6 @@ extern "C" { // unistd.h pub fn ftruncate(fd: c_int, length: off_t) -> c_int; - // dirent.h - pub fn readdir_r( - pDir: *mut crate::DIR, - entry: *mut crate::dirent, - result: *mut *mut crate::dirent, - ) -> c_int; - - // dirent.h - pub fn readdir(pDir: *mut crate::DIR) -> *mut crate::dirent; - // dirent.h pub fn fdopendir(fd: c_int) -> *mut crate::DIR; @@ -1909,27 +1785,6 @@ extern "C" { clockId: crate::clockid_t, ) -> c_int; - // pthread.h - pub fn pthread_cond_init( - cond: *mut crate::pthread_cond_t, - attr: *const crate::pthread_condattr_t, - ) -> c_int; - - // pthread.h - pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> c_int; - - // pthread.h - pub fn pthread_cond_signal(cond: *mut crate::pthread_cond_t) -> c_int; - - // pthread.h - pub fn pthread_cond_broadcast(cond: *mut crate::pthread_cond_t) -> c_int; - - // pthread.h - pub fn pthread_cond_wait( - cond: *mut crate::pthread_cond_t, - mutex: *mut crate::pthread_mutex_t, - ) -> c_int; - // pthread.h pub fn pthread_rwlockattr_init(attr: *mut crate::pthread_rwlockattr_t) -> c_int; @@ -1942,42 +1797,6 @@ extern "C" { attr2: c_uint, ) -> c_int; - // pthread.h - pub fn pthread_rwlock_init( - attr: *mut crate::pthread_rwlock_t, - host: *const crate::pthread_rwlockattr_t, - ) -> c_int; - - // pthread.h - pub fn pthread_rwlock_destroy(attr: *mut crate::pthread_rwlock_t) -> c_int; - - // pthread.h - pub fn pthread_rwlock_rdlock(attr: *mut crate::pthread_rwlock_t) -> c_int; - - // pthread.h - pub fn pthread_rwlock_tryrdlock(attr: *mut crate::pthread_rwlock_t) -> c_int; - - // pthread.h - pub fn pthread_rwlock_timedrdlock( - attr: *mut crate::pthread_rwlock_t, - host: *const crate::timespec, - ) -> c_int; - - // pthread.h - pub fn pthread_rwlock_wrlock(attr: *mut crate::pthread_rwlock_t) -> c_int; - - // pthread.h - pub fn pthread_rwlock_trywrlock(attr: *mut crate::pthread_rwlock_t) -> c_int; - - // pthread.h - pub fn pthread_rwlock_timedwrlock( - attr: *mut crate::pthread_rwlock_t, - host: *const crate::timespec, - ) -> c_int; - - // pthread.h - pub fn pthread_rwlock_unlock(attr: *mut crate::pthread_rwlock_t) -> c_int; - // pthread.h pub fn pthread_key_create( key: *mut crate::pthread_key_t, @@ -1993,13 +1812,6 @@ extern "C" { // pthread.h pub fn pthread_getspecific(key: crate::pthread_key_t) -> *mut c_void; - // pthread.h - pub fn pthread_cond_timedwait( - cond: *mut crate::pthread_cond_t, - mutex: *mut crate::pthread_mutex_t, - abstime: *const crate::timespec, - ) -> c_int; - // pthread.h pub fn pthread_attr_getname(attr: *mut crate::pthread_attr_t, name: *mut *mut c_char) -> c_int;