From 1522c9cc3a56854c294c9805dfb2605755609415 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 18 Dec 2025 12:41:52 -0800 Subject: [PATCH] Remove dead header files These aren't installed into the sysroot and don't look to be needed to build. I'm not entirely sure from whence they came but it looks like they're no longer necessary, so delete them. --- libc-bottom-half/CMakeLists.txt | 27 ------------------- libc-bottom-half/headers/public/dirent.h | 10 ------- libc-bottom-half/headers/public/errno.h | 7 ----- libc-bottom-half/headers/public/fcntl.h | 10 ------- libc-bottom-half/headers/public/inttypes.h | 10 ------- libc-bottom-half/headers/public/netinet/in.h | 6 ----- libc-bottom-half/headers/public/poll.h | 10 ------- libc-bottom-half/headers/public/stdlib.h | 10 ------- libc-bottom-half/headers/public/string.h | 10 ------- libc-bottom-half/headers/public/sys/ioctl.h | 10 ------- .../headers/public/sys/resource.h | 10 ------- libc-bottom-half/headers/public/sys/select.h | 18 ------------- libc-bottom-half/headers/public/sys/socket.h | 6 ----- libc-bottom-half/headers/public/sys/stat.h | 10 ------- libc-bottom-half/headers/public/sys/time.h | 6 ----- libc-bottom-half/headers/public/sys/times.h | 6 ----- libc-bottom-half/headers/public/sys/types.h | 16 ----------- libc-bottom-half/headers/public/sys/uio.h | 6 ----- libc-bottom-half/headers/public/sys/un.h | 6 ----- libc-bottom-half/headers/public/time.h | 10 ------- libc-bottom-half/headers/public/unistd.h | 10 ------- libc-bottom-half/headers/public/wchar.h | 9 ------- 22 files changed, 223 deletions(-) delete mode 100644 libc-bottom-half/headers/public/dirent.h delete mode 100644 libc-bottom-half/headers/public/errno.h delete mode 100644 libc-bottom-half/headers/public/fcntl.h delete mode 100644 libc-bottom-half/headers/public/inttypes.h delete mode 100644 libc-bottom-half/headers/public/netinet/in.h delete mode 100644 libc-bottom-half/headers/public/poll.h delete mode 100644 libc-bottom-half/headers/public/stdlib.h delete mode 100644 libc-bottom-half/headers/public/string.h delete mode 100644 libc-bottom-half/headers/public/sys/ioctl.h delete mode 100644 libc-bottom-half/headers/public/sys/resource.h delete mode 100644 libc-bottom-half/headers/public/sys/select.h delete mode 100644 libc-bottom-half/headers/public/sys/socket.h delete mode 100644 libc-bottom-half/headers/public/sys/stat.h delete mode 100644 libc-bottom-half/headers/public/sys/time.h delete mode 100644 libc-bottom-half/headers/public/sys/times.h delete mode 100644 libc-bottom-half/headers/public/sys/types.h delete mode 100644 libc-bottom-half/headers/public/sys/uio.h delete mode 100644 libc-bottom-half/headers/public/sys/un.h delete mode 100644 libc-bottom-half/headers/public/time.h delete mode 100644 libc-bottom-half/headers/public/unistd.h delete mode 100644 libc-bottom-half/headers/public/wchar.h diff --git a/libc-bottom-half/CMakeLists.txt b/libc-bottom-half/CMakeLists.txt index b3a891871..b37487b10 100644 --- a/libc-bottom-half/CMakeLists.txt +++ b/libc-bottom-half/CMakeLists.txt @@ -17,33 +17,6 @@ file( headers/public/*.h ) -# TODO: these headers are not actually installed in the sysroot since the -# musl-sourced ones are. These should probably be deleted from the source -# tree and the musl ones used instead. -list(REMOVE_ITEM globbed_headers - headers/public/dirent.h - headers/public/errno.h - headers/public/fcntl.h - headers/public/inttypes.h - headers/public/netinet/in.h - headers/public/poll.h - headers/public/stdlib.h - headers/public/string.h - headers/public/sys/ioctl.h - headers/public/sys/resource.h - headers/public/sys/select.h - headers/public/sys/socket.h - headers/public/sys/stat.h - headers/public/sys/time.h - headers/public/sys/times.h - headers/public/sys/types.h - headers/public/sys/uio.h - headers/public/sys/un.h - headers/public/time.h - headers/public/unistd.h - headers/public/wchar.h -) - if (WASI STREQUAL "p1") list(REMOVE_ITEM globbed_headers headers/public/wasi/wasip2.h) endif() diff --git a/libc-bottom-half/headers/public/dirent.h b/libc-bottom-half/headers/public/dirent.h deleted file mode 100644 index ce1364a6b..000000000 --- a/libc-bottom-half/headers/public/dirent.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_dirent_h -#define __wasilibc_dirent_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc dirent implementations. - */ -#include <__header_dirent.h> - -#endif diff --git a/libc-bottom-half/headers/public/errno.h b/libc-bottom-half/headers/public/errno.h deleted file mode 100644 index f3914ee75..000000000 --- a/libc-bottom-half/headers/public/errno.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __wasilibc_errno_h -#define __wasilibc_errno_h - -#include <__errno.h> -#include <__errno_values.h> - -#endif diff --git a/libc-bottom-half/headers/public/fcntl.h b/libc-bottom-half/headers/public/fcntl.h deleted file mode 100644 index 0ca3e861a..000000000 --- a/libc-bottom-half/headers/public/fcntl.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_fcntl_h -#define __wasilibc_fcntl_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc fcntl implementations. - */ -#include <__header_fcntl.h> - -#endif diff --git a/libc-bottom-half/headers/public/inttypes.h b/libc-bottom-half/headers/public/inttypes.h deleted file mode 100644 index a2378579a..000000000 --- a/libc-bottom-half/headers/public/inttypes.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_inttypes_h -#define __wasilibc_inttypes_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc stdlib implementations. - */ -#include <__header_inttypes.h> - -#endif diff --git a/libc-bottom-half/headers/public/netinet/in.h b/libc-bottom-half/headers/public/netinet/in.h deleted file mode 100644 index b27bffeb1..000000000 --- a/libc-bottom-half/headers/public/netinet/in.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __wasilibc_netinet_in_h -#define __wasilibc_netinet_in_h - -#include <__header_netinet_in.h> - -#endif diff --git a/libc-bottom-half/headers/public/poll.h b/libc-bottom-half/headers/public/poll.h deleted file mode 100644 index 22f4b6c06..000000000 --- a/libc-bottom-half/headers/public/poll.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_poll_h -#define __wasilibc_poll_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc poll implementations. - */ -#include <__header_poll.h> - -#endif diff --git a/libc-bottom-half/headers/public/stdlib.h b/libc-bottom-half/headers/public/stdlib.h deleted file mode 100644 index 8425cb80a..000000000 --- a/libc-bottom-half/headers/public/stdlib.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_stdlib_h -#define __wasilibc_stdlib_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc stdlib implementations. - */ -#include <__functions_malloc.h> - -#endif diff --git a/libc-bottom-half/headers/public/string.h b/libc-bottom-half/headers/public/string.h deleted file mode 100644 index fee51ef6c..000000000 --- a/libc-bottom-half/headers/public/string.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_string_h -#define __wasilibc_string_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc string implementations. - */ -#include <__header_string.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/ioctl.h b/libc-bottom-half/headers/public/sys/ioctl.h deleted file mode 100644 index 085b31449..000000000 --- a/libc-bottom-half/headers/public/sys/ioctl.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_sys_ioctl_h -#define __wasilibc_sys_ioctl_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc ioctl implementations. - */ -#include <__header_sys_ioctl.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/resource.h b/libc-bottom-half/headers/public/sys/resource.h deleted file mode 100644 index 5896861e8..000000000 --- a/libc-bottom-half/headers/public/sys/resource.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_sys_resource_h -#define __wasilibc_sys_resource_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc resource implementations. - */ -#include <__header_sys_resource.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/select.h b/libc-bottom-half/headers/public/sys/select.h deleted file mode 100644 index 7570f14b7..000000000 --- a/libc-bottom-half/headers/public/sys/select.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __wasilibc_sys_select_h -#define __wasilibc_sys_select_h - -#include <__fd_set.h> -#include <__struct_timespec.h> -#include <__struct_timeval.h> - -#ifdef __cplusplus -extern "C" { -#endif - -int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libc-bottom-half/headers/public/sys/socket.h b/libc-bottom-half/headers/public/sys/socket.h deleted file mode 100644 index 874f60517..000000000 --- a/libc-bottom-half/headers/public/sys/socket.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __wasilibc_sys_socket_h -#define __wasilibc_sys_socket_h - -#include <__header_sys_socket.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/stat.h b/libc-bottom-half/headers/public/sys/stat.h deleted file mode 100644 index 586b41f50..000000000 --- a/libc-bottom-half/headers/public/sys/stat.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_sys_stat_h -#define __wasilibc_sys_stat_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc stat implementations. - */ -#include <__header_sys_stat.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/time.h b/libc-bottom-half/headers/public/sys/time.h deleted file mode 100644 index 3ee0b3beb..000000000 --- a/libc-bottom-half/headers/public/sys/time.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __wasilibc_sys_time_h -#define __wasilibc_sys_time_h - -#include <__struct_timeval.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/times.h b/libc-bottom-half/headers/public/sys/times.h deleted file mode 100644 index 986bc0d1b..000000000 --- a/libc-bottom-half/headers/public/sys/times.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __wasilibc_sys_times_h -#define __wasilibc_sys_times_h - -#include <__struct_tms.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/types.h b/libc-bottom-half/headers/public/sys/types.h deleted file mode 100644 index 3bce96f2f..000000000 --- a/libc-bottom-half/headers/public/sys/types.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __wasilibc_sys_types_h -#define __wasilibc_sys_types_h - -#define __need_size_t -#include - -#include <__typedef_clock_t.h> -#include <__typedef_time_t.h> -#include <__typedef_blksize_t.h> -#include <__typedef_off_t.h> -#include <__typedef_ssize_t.h> -#include <__typedef_suseconds_t.h> -#include <__typedef_nlink_t.h> -#include <__typedef_clockid_t.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/uio.h b/libc-bottom-half/headers/public/sys/uio.h deleted file mode 100644 index bb502a10a..000000000 --- a/libc-bottom-half/headers/public/sys/uio.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __wasilibc_sys_uio_h -#define __wasilibc_sys_uio_h - -#include <__struct_iovec.h> - -#endif diff --git a/libc-bottom-half/headers/public/sys/un.h b/libc-bottom-half/headers/public/sys/un.h deleted file mode 100644 index 997e613ac..000000000 --- a/libc-bottom-half/headers/public/sys/un.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __wasilibc_sys_un_h -#define __wasilibc_sys_un_h - -#include <__struct_sockaddr_un.h> - -#endif diff --git a/libc-bottom-half/headers/public/time.h b/libc-bottom-half/headers/public/time.h deleted file mode 100644 index 646e59935..000000000 --- a/libc-bottom-half/headers/public/time.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_time_h -#define __wasilibc_time_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc time implementations. - */ -#include <__header_time.h> - -#endif diff --git a/libc-bottom-half/headers/public/unistd.h b/libc-bottom-half/headers/public/unistd.h deleted file mode 100644 index 5f8edfaad..000000000 --- a/libc-bottom-half/headers/public/unistd.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __wasilibc_unistd_h -#define __wasilibc_unistd_h - -/* - * Include the real implementation, which is factored into a separate file so - * that it can be reused by other libc unistd implementations. - */ -#include <__header_unistd.h> - -#endif diff --git a/libc-bottom-half/headers/public/wchar.h b/libc-bottom-half/headers/public/wchar.h deleted file mode 100644 index f43d72fe2..000000000 --- a/libc-bottom-half/headers/public/wchar.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __wasilibc_wchar_h -#define __wasilibc_wchar_h - -#define __need_size_t -#define __need_wchar_t -#define __need_NULL -#include - -#endif