From 88f4b6929c26f9240a4b0b7dcc62922f02544a09 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 18 Oct 2022 17:00:07 +0200 Subject: Introduce , extracted from This allows us to define a generic no-op version of PTR_MANGLE and PTR_DEMANGLE. In the future, we can use PTR_MANGLE and PTR_DEMANGLE unconditionally in C sources, avoiding an unintended loss of hardening due to missing include files or unlucky header inclusion ordering. In i386 and x86_64, we can avoid a dependency in the C code by using the computed constant from . no longer includes these definitions, so there is no cyclic dependency anymore when computing the constants. Reviewed-by: Adhemerval Zanella --- libio/iofopncook.c | 1 + libio/iofwide.c | 2 +- libio/libioP.h | 1 + libio/vtables.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libio') diff --git a/libio/iofopncook.c b/libio/iofopncook.c index e108ad2..a7db4ef 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -28,6 +28,7 @@ #include #include #include +#include static ssize_t _IO_cookie_read (FILE *fp, void *buf, ssize_t size) diff --git a/libio/iofwide.c b/libio/iofwide.c index 01616e0..1ce685f 100644 --- a/libio/iofwide.c +++ b/libio/iofwide.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include /* Return orientation of stream. If mode is nonzero try to change diff --git a/libio/libioP.h b/libio/libioP.h index ba4fdbd..dac3de7 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -47,6 +47,7 @@ #include "iolibio.h" #include +#include /* For historical reasons this is the name of the sysdeps header that adjusts the libio configuration. */ diff --git a/libio/vtables.c b/libio/vtables.c index 50acab7..32459e4 100644 --- a/libio/vtables.c +++ b/libio/vtables.c @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef SHARED -- cgit v1.1