Avoid implicit ints and implicit function declarations
These language features have been removed from C in 1999. Future compilers are likely to stop accepting these constructs by default.
Related to:
- https://fedoraproject.org/wiki/Changes/PortingToModernC
- https://fedoraproject.org/wiki/Toolchain/PortingToModernC
I concur that these issues should be addressed, as #79 and #80 are alternative approaches for some of them (e.g. adding #include <stdlib.h> rather than replacing exit(…) with return …).
Also note that if Perl/Tk ever intends to build with -std=c2x or later, then K&R-style definitions will have to be removed entirely.
It looks like a big part of the issue is actually just bundling a decrepit code copy of tk.
For the record, I needed the patch attached to https://bugzilla.opensuse.org/show_bug.cgi?id=1225909#c1 to make openSUSE perl-tk build without -fpermissive with GCC 14. In the end, I decided to use only the configuration options of the patch (mainly because apparently the configuration mechanism was not passing the option to GCC when compiling its snippets and so they are necessary) and rely on -fpermissive for the rest in order not to introduce too much divergence from upstream.