Fix build with gcc15#35
Conversation
|
Thanks for opening a PR! These decls were, I recall distinctly, added to prevent a problem when (on some platforms) “-ansi” was used (or “-std=c90”) which would shut out these declarations (since they are in SUS/POSIX but not strictly in the C standard), and then the C compiler would use the implicit declaration I don’t think this happend on Linux, but it is something that worries me to this day (and which prompts me to tell people not to use “-std=cXX” but rather “-std=gnuXX”, but I digress) In lieu of using a proper configure script, instead of removing, I’d propose changing the forward decls to match exactly what POSIX says they should be (the error probably occurs because more modern C standards don’t like these oldstyle decls), and perhaps wrapping them in an ifndef which detects whether POSIX “extensions” to C are enabled. |
Makes sense! PR updated. |
Compile error in gcc15:
The
fdopenfunction should be instdio.hheader which is already included in the file. So I just removed the problematic definition.