Skip to content

Commit

Permalink
Merge pull request #15 from thesamesam/master
Browse files Browse the repository at this point in the history
Fix configure.ac compatibility with Clang 16
  • Loading branch information
resuna authored Apr 17, 2023
2 parents 3cccfe1 + a65705e commit 6572c05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,11 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED uses an int. */

AC_MSG_CHECKING(checking to see what 'times' returns)
AC_TRY_RUN([
#include <stdlib.h>
#include <sys/types.h>
#include <sys/times.h>
#include <unistd.h>
main() {
int main(void) {
struct tms cpu;
times(&cpu);
sleep(2);
Expand Down Expand Up @@ -269,7 +270,8 @@ main() {
AC_CHECK_FUNC(catgets,
[AC_MSG_CHECKING([catclose return value])
AC_TRY_COMPILE([#include <nl_types.h>], [
AC_TRY_COMPILE([#include <stdlib.h>
#include <nl_types.h>], [
if (catclose ((nl_catd) 0) == 0) exit (0);],
AC_MSG_RESULT(ok), [
AC_MSG_RESULT([broken catclose return type])
Expand Down
8 changes: 5 additions & 3 deletions tclconfig/tcl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,8 @@ AC_DEFUN([TEA_TIME_HANDLER], [
# (like convex) have timezone functions, etc.
#
AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
AC_TRY_COMPILE([#include <time.h>],
AC_TRY_COMPILE([#include <stdlib.h>
#include <time.h>],
[extern long timezone;
timezone += 1;
exit (0);],
Expand All @@ -2537,7 +2538,8 @@ AC_DEFUN([TEA_TIME_HANDLER], [
# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
#
AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
AC_TRY_COMPILE([#include <time.h>],
AC_TRY_COMPILE([#include <stdlib.h>
#include <time.h>],
[extern time_t timezone;
timezone += 1;
exit (0);],
Expand Down Expand Up @@ -2574,7 +2576,7 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [
AC_TRY_RUN([
#include <stdlib.h>
extern double strtod();
int main() {
int main(void) {
char *infString="Inf", *nanString="NaN", *spaceString=" ";
char *term;
double value;
Expand Down

0 comments on commit 6572c05

Please sign in to comment.