[binutils-gdb] Remove unnecessary non-standard & unportable inclusions.
Nick Alcock
nix@sourceware.org
Fri Feb 28 14:17:43 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a3177d19fb23df50419bd44d945090bb4fcc8891
commit a3177d19fb23df50419bd44d945090bb4fcc8891
Author: Jonas 'Sortie' Termansen <sortie@maxsi.org>
Date: Fri Nov 1 21:18:23 2024 +0100
Remove unnecessary non-standard & unportable inclusions.
<memory.h> is not needed and not standardized and is just an alias for
<string.h>.
<sys/param.h> is not needed and not standardized and contains a kitchen
sink of various unportable definitions not agreed upon and best done
manually or through other headers.
These fixes are needed to compile binutils on Sortix and other operating
systems with a strict POSIX.1-2024 libc without obsolete features.
Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
Diff:
---
binutils/testsuite/gentestdlls.c | 1 -
libctf/ctf-create.c | 1 -
libctf/ctf-impl.h | 1 -
3 files changed, 3 deletions(-)
diff --git a/binutils/testsuite/gentestdlls.c b/binutils/testsuite/gentestdlls.c
index 805c64822b1..df60b1e341e 100644
--- a/binutils/testsuite/gentestdlls.c
+++ b/binutils/testsuite/gentestdlls.c
@@ -25,7 +25,6 @@
See:
https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-335.pdf */
-#include <memory.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c
index a4d8e7c2528..6d2479c8cca 100644
--- a/libctf/ctf-create.c
+++ b/libctf/ctf-create.c
@@ -18,7 +18,6 @@
<http://www.gnu.org/licenses/>. */
#include <ctf-impl.h>
-#include <sys/param.h>
#include <string.h>
#include <unistd.h>
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index b40c8679c4a..2d191b0a5c9 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -22,7 +22,6 @@
#include "config.h"
#include <errno.h>
-#include <sys/param.h>
#include "ctf-decls.h"
#include <ctf-api.h>
#include "ctf-sha1.h"
More information about the Binutils-cvs
mailing list