Tcl Source Code

View Ticket
Ticket UUID: 15845d9fd8accdf193b85d54498bfa48dcd275a3
Title: unix/tcl.m4: implicit declaration of exit() in timezone variable checks
Type: Bug Version: 8.6.12
Submitter: chrstphrchvz Created on: 2021-11-06 04:18:58
Subsystem: 53. Configuration and Build Tools Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2021-11-07 21:44:45
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2021-11-07 21:44:45

The checks for long timezone variable and time_t timezone variable may both erroneously fail due to compilers which by default use -Werror=implicit-function-declaration (e.g. Xcode 12 and newer on macOS, as required by ARM64 ABI), because the exit() function is used without #include <stdlib.h>.

To correct this: in unix/tcl.m4, either stdlib.h should be included for these tests, or return 0; used instead of exit (0);. Then unix/configure should then be regenerated to pick up the changes.

User Comments: jan.nijtmans added on 2021-11-07 21:44:45:

Fixed in all branches (8.6 and up) now. Thanks for the report and for the suggested fix!