wjaguar / mtPaint

Mark Tyler's Painting Program
http://mtpaint.sourceforge.net
GNU General Public License v3.0
157 stars 29 forks source link

configure: Improve C99 compatibility #70

Open fweimer-rh opened 1 year ago

fweimer-rh commented 1 year ago

C99 compilers do not necessarily recognize implicit ints, so use int explicitly as the return type of main in CAN_DO.

In HAVE_FUNC, supply a custom prototype to avoid an implicit function declaration, otherwise this test fails at compile time as well. The same prototype declaration is used by autoconf, so future compilers are likely to remain compatible.

wjaguar commented 1 year ago

Thanks. And which compiler specifically is that fussy?

fweimer-rh commented 1 year ago

There are plans for Clang 16 to make the switch, and perhaps GCC 14. For now, I'm using an instrumented GCC version to prepare for the transition: