These implicit declarations always fail with compilers in strict C99 mode. The patch below should fix it.
tclconfig/tcl.m4
has been fixed in Tcl itself.
diff --git a/configure.in b/configure.in
index b1699b345eb71908..621a2560e0baf231 100755
--- a/configure.in
+++ b/configure.in
@@ -194,11 +194,15 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED uses an int. */
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/times.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int
main() {
struct tms cpu;
times(&cpu);
sleep(2);
- exit ((times(&cpu) > 0) ? 0 : 1);
+ return (times(&cpu) > 0) ? 0 : 1;
}
], [AC_MSG_RESULT(elapsed real time)],
[AC_MSG_RESULT(a status)
@@ -268,7 +272,7 @@ main() {
AC_CHECK_FUNC(catgets,
[AC_MSG_CHECKING([catclose return value])
AC_TRY_COMPILE([#include <nl_types.h>], [
- if (catclose ((nl_catd) 0) == 0) exit (0);],
+ if (catclose ((nl_catd) 0) == 0) return 0;],
AC_MSG_RESULT(ok), [
AC_MSG_RESULT([broken catclose return type])
AC_DEFINE(BAD_CATCLOSE)])],
There seems to be a newer version available at https://github.com/flightaware/tclx. Patch for that at https://github.com/flightaware/tclx/pull/15.