From b2d4b6c87827e34a694278d085a31508af052a37 Mon Sep 17 00:00:00 2001 From: Harald van Dijk Date: Mon, 3 Aug 2020 21:59:04 +0200 Subject: [PATCH] fopen: Avoid undesired interactions with glibc headers. * lib/fopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this instead of __need_FILE, as the latter does not work with glibc. --- ChangeLog | 6 ++++++ lib/fopen.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b078da4d33..ff7b2eb8b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-03 Harald van Dijk (tiny change) + + fopen: Avoid undesired interactions with glibc headers. + * lib/fopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this instead of + __need_FILE, as the latter does not work with glibc. + 2020-08-02 Paul Eggert fcntl: document some F_SETLK errno variations diff --git a/lib/fopen.c b/lib/fopen.c index 4a0cab17c6..252785019b 100644 --- a/lib/fopen.c +++ b/lib/fopen.c @@ -19,12 +19,12 @@ /* If the user's config.h happens to include , let it include only the system's here, so that orig_fopen doesn't recurse to rpl_fopen. */ -#define __need_FILE +#define _GL_ALREADY_INCLUDING_STDIO_H #include /* Get the original definition of fopen. It might be defined as a macro. */ #include -#undef __need_FILE +#undef _GL_ALREADY_INCLUDING_STDIO_H static FILE * orig_fopen (const char *filename, const char *mode) -- 2.39.5