From aae106e37b48f2158e68902293df1e4bf7b80c0f Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sat, 15 Jul 2023 15:22:45 +0200 Subject: [PATCH] LibC: Add most of the "header may make visible" dependencies from POSIX --- Userland/Libraries/LibC/arpa/inet.h | 3 +++ Userland/Libraries/LibC/fcntl.h | 5 +++++ Userland/Libraries/LibC/langinfo.h | 3 +++ Userland/Libraries/LibC/netdb.h | 6 ++++++ Userland/Libraries/LibC/netinet/in.h | 5 +++++ Userland/Libraries/LibC/pthread.h | 7 +++++-- Userland/Libraries/LibC/sched.h | 4 ++++ Userland/Libraries/LibC/semaphore.h | 5 +++++ Userland/Libraries/LibC/signal.h | 4 ++++ Userland/Libraries/LibC/spawn.h | 3 +++ Userland/Libraries/LibC/stdio.h | 4 ++++ Userland/Libraries/LibC/stdlib.h | 8 +++++++- Userland/Libraries/LibC/string.h | 4 ++++ Userland/Libraries/LibC/sys/resource.h | 5 ++++- Userland/Libraries/LibC/sys/select.h | 6 +++++- Userland/Libraries/LibC/sys/socket.h | 4 ++++ Userland/Libraries/LibC/sys/time.h | 4 ++++ Userland/Libraries/LibC/sys/wait.h | 4 ++++ Userland/Libraries/LibC/time.h | 4 ++++ Userland/Libraries/LibC/wchar.h | 12 ++++++++++-- Userland/Libraries/LibC/wctype.h | 13 +++++++++++-- 21 files changed, 104 insertions(+), 9 deletions(-) diff --git a/Userland/Libraries/LibC/arpa/inet.h b/Userland/Libraries/LibC/arpa/inet.h index b5c4d64a0d..fcfbc3ec3f 100644 --- a/Userland/Libraries/LibC/arpa/inet.h +++ b/Userland/Libraries/LibC/arpa/inet.h @@ -6,8 +6,11 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/arpa_inet.h.html #include #include + #include #include diff --git a/Userland/Libraries/LibC/fcntl.h b/Userland/Libraries/LibC/fcntl.h index 73fa5ec9c9..ceb5896c47 100644 --- a/Userland/Libraries/LibC/fcntl.h +++ b/Userland/Libraries/LibC/fcntl.h @@ -7,6 +7,11 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html +#include +#include + #include #include #include diff --git a/Userland/Libraries/LibC/langinfo.h b/Userland/Libraries/LibC/langinfo.h index 1545e18c2d..f5836915ba 100644 --- a/Userland/Libraries/LibC/langinfo.h +++ b/Userland/Libraries/LibC/langinfo.h @@ -6,7 +6,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html #include + #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/netdb.h b/Userland/Libraries/LibC/netdb.h index b825f63182..f0a7d28e75 100644 --- a/Userland/Libraries/LibC/netdb.h +++ b/Userland/Libraries/LibC/netdb.h @@ -6,6 +6,12 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netdb.h.html +#include +#include +#include + #include #include diff --git a/Userland/Libraries/LibC/netinet/in.h b/Userland/Libraries/LibC/netinet/in.h index 6a3163d2e6..074c0cda51 100644 --- a/Userland/Libraries/LibC/netinet/in.h +++ b/Userland/Libraries/LibC/netinet/in.h @@ -6,6 +6,11 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html +#include +#include + #include #include #include diff --git a/Userland/Libraries/LibC/pthread.h b/Userland/Libraries/LibC/pthread.h index f5f76b6dfd..7129fbdde4 100644 --- a/Userland/Libraries/LibC/pthread.h +++ b/Userland/Libraries/LibC/pthread.h @@ -6,12 +6,15 @@ #pragma once -#include +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html #include +#include + +#include #include #include #include -#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sched.h b/Userland/Libraries/LibC/sched.h index 61d6fd77c7..b6867df04b 100644 --- a/Userland/Libraries/LibC/sched.h +++ b/Userland/Libraries/LibC/sched.h @@ -6,6 +6,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sched.h.html +#include + #include #include #include diff --git a/Userland/Libraries/LibC/semaphore.h b/Userland/Libraries/LibC/semaphore.h index ed009f0c7e..7a415246bf 100644 --- a/Userland/Libraries/LibC/semaphore.h +++ b/Userland/Libraries/LibC/semaphore.h @@ -6,6 +6,11 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/semaphore.h.html +#include +#include + #include #include #include diff --git a/Userland/Libraries/LibC/signal.h b/Userland/Libraries/LibC/signal.h index 4aa0048733..c3cb70a386 100644 --- a/Userland/Libraries/LibC/signal.h +++ b/Userland/Libraries/LibC/signal.h @@ -6,6 +6,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html +#include + #include #include #include diff --git a/Userland/Libraries/LibC/spawn.h b/Userland/Libraries/LibC/spawn.h index 8531e67044..9458628da3 100644 --- a/Userland/Libraries/LibC/spawn.h +++ b/Userland/Libraries/LibC/spawn.h @@ -13,8 +13,11 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/spawn.h.html #include #include + #include #include diff --git a/Userland/Libraries/LibC/stdio.h b/Userland/Libraries/LibC/stdio.h index 83c349f57d..97c58799dd 100644 --- a/Userland/Libraries/LibC/stdio.h +++ b/Userland/Libraries/LibC/stdio.h @@ -8,6 +8,10 @@ #define _STDIO_H // Make GMP believe we exist. +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html +#include + #include #include #include diff --git a/Userland/Libraries/LibC/stdlib.h b/Userland/Libraries/LibC/stdlib.h index fbe0b7ca55..8b1f937d35 100644 --- a/Userland/Libraries/LibC/stdlib.h +++ b/Userland/Libraries/LibC/stdlib.h @@ -6,8 +6,14 @@ #pragma once -#include +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html +#include +#include #include +#include + +#include #include #include diff --git a/Userland/Libraries/LibC/string.h b/Userland/Libraries/LibC/string.h index 23ec5ef69f..0d96455205 100644 --- a/Userland/Libraries/LibC/string.h +++ b/Userland/Libraries/LibC/string.h @@ -7,6 +7,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html +#include + #include #include diff --git a/Userland/Libraries/LibC/sys/resource.h b/Userland/Libraries/LibC/sys/resource.h index 7d3f265396..ce954d9e39 100644 --- a/Userland/Libraries/LibC/sys/resource.h +++ b/Userland/Libraries/LibC/sys/resource.h @@ -6,9 +6,12 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_resource.h.html +#include + #include #include -#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/select.h b/Userland/Libraries/LibC/sys/select.h index 02e9f0d6f6..f16307c56c 100644 --- a/Userland/Libraries/LibC/sys/select.h +++ b/Userland/Libraries/LibC/sys/select.h @@ -6,8 +6,12 @@ #pragma once -#include +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_select.h.html #include +#include + +#include #include #include #include diff --git a/Userland/Libraries/LibC/sys/socket.h b/Userland/Libraries/LibC/sys/socket.h index f505992c02..bb8aee03ed 100644 --- a/Userland/Libraries/LibC/sys/socket.h +++ b/Userland/Libraries/LibC/sys/socket.h @@ -6,6 +6,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html +#include + #include #include #include diff --git a/Userland/Libraries/LibC/sys/time.h b/Userland/Libraries/LibC/sys/time.h index 00d741f6e9..7dfa189104 100644 --- a/Userland/Libraries/LibC/sys/time.h +++ b/Userland/Libraries/LibC/sys/time.h @@ -6,6 +6,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html +#include + #include #include #include diff --git a/Userland/Libraries/LibC/sys/wait.h b/Userland/Libraries/LibC/sys/wait.h index a5292f9ffe..5d1fd7af36 100644 --- a/Userland/Libraries/LibC/sys/wait.h +++ b/Userland/Libraries/LibC/sys/wait.h @@ -6,6 +6,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html +#include + #include #include #include diff --git a/Userland/Libraries/LibC/time.h b/Userland/Libraries/LibC/time.h index 538c5e025d..66a09d32bd 100644 --- a/Userland/Libraries/LibC/time.h +++ b/Userland/Libraries/LibC/time.h @@ -6,6 +6,10 @@ #pragma once +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html +#include + #include #include diff --git a/Userland/Libraries/LibC/wchar.h b/Userland/Libraries/LibC/wchar.h index b6052f7c81..090f340c43 100644 --- a/Userland/Libraries/LibC/wchar.h +++ b/Userland/Libraries/LibC/wchar.h @@ -6,10 +6,18 @@ #pragma once -#include -#include +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html +#include #include #include +#include +#include +#include +#include + +#include +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/wctype.h b/Userland/Libraries/LibC/wctype.h index 514371c163..a154f983b8 100644 --- a/Userland/Libraries/LibC/wctype.h +++ b/Userland/Libraries/LibC/wctype.h @@ -6,11 +6,20 @@ #pragma once -#include +// Includes essentially mandated by POSIX: +// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wctype.h.html #include -#include +#include +#include +#include +#include +#include +#include #include +#include +#include + __BEGIN_DECLS typedef long wctrans_t;