On 2024/09/20 09:41:43 -0400, Chet Ramey wrote: > On 9/20/24 9:09 AM, Dr. Werner Fink wrote: > > On 2024/09/19 10:59:15 -0400, Chet Ramey wrote: > > > On 9/19/24 4:25 AM, Michel Lind wrote: > > > > Hi, > > > > > > > > In Fedora we have been shipping GCC 14 since Fedora 40; it turns out > > > > that at this moment we can no longer compile against readline since > > > > including readline.h failed, as FILE is defined in stdio.h and that is > > > > no longer included by default. > > > > > > What does this mean? readline.h has never included stdio.h; it's an > > > application requirement to do this, and it's documented that way. Are > > > you saying that gcc pre-14 would implicitly include stdio.h itself? > > > > > The problem is that gcc14 does not accept e.g. undeclared functions anymore. > > readline.h doesn't include any undeclared functions, so it seems like this > would be an application problem. > > > In fact I also use ia similar little change to avoid warings before gcc14 > > and error with gcc14. This for the inclusion of readline.h from standard > > include path. > > You mean instead of including <stdio.h> before <readline.h>?
If the application includes <readline/readline.h> ... which uses FILE* therein ... a <stdio.h> is missed and I included it in readline.h: @@ -32,6 +32,7 @@ extern "C" { # include "keymaps.h" # include "tilde.h" #else +# include <stdio.h> # include <readline/rlstdc.h> # include <readline/rltypedefs.h> # include <readline/keymaps.h> simply to avoid trouble e.g. of <stdio.h> included after <readline/readline.h>. For a packagers this decreases the number of bug reports ;) Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
signature.asc
Description: PGP signature