Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Undeclared exit function in tcl.m4

Closed / Duplicated550f4837a078ff3054d3b00a156d8a11fb628cfCreated 4 years agoUpdated 4 years ago
Descriptionplain2022-11-18 08:55:19
A change like this one is needed to avoid the implicit function declaration.
(This avoids relying on a feature that has been removed from C99.)

diff --git a/unix/tcl.m4 b/unix/tcl.m4
index ed12cda75bbc4ad9..d77184421bf8df16 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2352,7 +2352,7 @@ AC_DEFUN([SC_TIME_HANDLER], [
 	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
 	[[extern long timezone;
 	    timezone += 1;
-	    exit (0);]])],
+	    return 0;]])],
 	    [tcl_cv_timezone_long=yes], [tcl_cv_timezone_long=no])])
     if test $tcl_cv_timezone_long = yes ; then
 	AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
@@ -2364,7 +2364,7 @@ AC_DEFUN([SC_TIME_HANDLER], [
 	    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
 	    [[extern time_t timezone;
 		timezone += 1;
-		exit (0);]])],
+		return 0;]])],
 		[tcl_cv_timezone_time=yes], [tcl_cv_timezone_time=no])])
 	if test $tcl_cv_timezone_time = yes ; then
 	    AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
jan.nijtmansplain2022-11-18 09:23:26
This is used in the functions SC_TIME_HANDLER, but SC_TIME_HANDLER is not used anywhere in Tcl or Tk. The same function is available in TEA (for extensions) , so I'm curious: which extension is still using SC_TIME_HANDLER?

Since Tcl 8.6.13 is about to be released, and this isn't used in any battery-included extensions, let's defer this until after the release.
jan.nijtmanswiki2022-11-18 10:57:00

Actually, it's already fixed, this problem was already reported.

Dup of [15845d9fd8], will be in Tcl 8.6.13

Log in (anonymous is fine) to add a comment.