]> Savannah Git Hosting - gnulib.git/commitdiff
fopen: Avoid undesired interactions with glibc headers.
authorHarald van Dijk <harald@gigawatt.nl>
Mon, 3 Aug 2020 19:59:04 +0000 (21:59 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 3 Aug 2020 19:59:23 +0000 (21:59 +0200)
* lib/fopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this instead of
__need_FILE, as the latter does not work with glibc.

ChangeLog
lib/fopen.c

index b078da4d33fc4dc734dcb7d2c7985ece93693b21..ff7b2eb8b062fcdaec57069d69ca81d3d87faac2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-03  Harald van Dijk  <harald@gigawatt.nl>  (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  <eggert@cs.ucla.edu>
 
        fcntl: document some F_SETLK errno variations
index 4a0cab17c621f01724246f6f98ee062174025150..252785019b758e6c4b706553ea6f0e473445d966 100644 (file)
 /* If the user's config.h happens to include <stdio.h>, let it include only
    the system's <stdio.h> here, so that orig_fopen doesn't recurse to
    rpl_fopen.  */
-#define __need_FILE
+#define _GL_ALREADY_INCLUDING_STDIO_H
 #include <config.h>
 
 /* Get the original definition of fopen.  It might be defined as a macro.  */
 #include <stdio.h>
-#undef __need_FILE
+#undef _GL_ALREADY_INCLUDING_STDIO_H
 
 static FILE *
 orig_fopen (const char *filename, const char *mode)