[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Infinite recursion with fopen
From: |
Markus Mützel |
Subject: |
Re: Infinite recursion with fopen |
Date: |
Tue, 22 Feb 2022 17:41:13 +0100 |
To anyone curious: Don't click that link!
The quoted message is more than 10 years old and the downloadable archive will
likely contain malware.
I'm not sure how that message made it through the spam filters.
Markus
Am 22. Februar 2022 um 16:50 Uhr schrieb "Bruno Haible via Octave-maintainers":
Good day!
You can familiarize yourself with a list of the needed documents here in one
file:
File password: RO5667
Hi Michael, > It appears the problem comes from the fact that stdio.h is pulled
in indirectly from > config.h, hence it is not surrounded by the __need_FILE
macro that should prevent > the problem from occuring. The inclusion pattern
is: > > config.h > stdint.h (because of octave config.h content) > wchar.h
(because of stdint.h implementation I'm using, see [1]) > stdio.h (because of
wchar.h implementation in gnulib) Thanks for this analysis. While including
system header files from within config.h can be problematic (cf.
www.gnu.org/software/gnulib/manual/html_node/Source-changes.html[http://www.gnu.org/software/gnulib/manual/html_node/Source-changes.html]),
gnulib should not cause infinite recursions because of it. Can you please try
this patch? --- a/lib/fopen.c +++ b/lib/fopen.c @@ -16,7 +16,12 @@ /* Written
by Bruno Haible <>, 2007. */ +/* 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 _GL_ALREADY_INCLUDING_STDIO_H #include +#undef
_GL_ALREADY_INCLUDING_STDIO_H /* Get the original definition of fopen. It might
be defined as a macro. */ #define __need_FILE ---------- We are transitioning
to a web based forum for maintainer discussions at
https://octave.discourse.group/c/maintainers