[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] C99 compatibility fix for the configure script
From: |
Florian Weimer |
Subject: |
[PATCH] C99 compatibility fix for the configure script |
Date: |
Sat, 10 Dec 2022 00:48:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
It's necessary to include <term.h> for the function prototypes,
otherwise the check may fail unconditionally with compilers that no
longer support implicit function declarations (which were removed from C
in 1999).
Related to:
<https://fedoraproject.org/wiki/Changes/PortingToModernC>
<https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
diff --git gcal-4.1/configure.ac gcal-4.1/configure.ac
index f339765122b8fae0..a9c3993e81501713 100644
--- gcal-4.1/configure.ac
+++ gcal-4.1/configure.ac
@@ -319,7 +319,7 @@ if test "$gcal_cv_use_term" = yes; then
AC_MSG_CHECKING(for working terminal libraries)
SAVE_LIBS=$LIBS
LIBS="$LIBS $TTYLIBS"
- AC_TRY_LINK(,
+ AC_TRY_LINK([#include <term.h>],
[tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);],
[gcal_ttylibs_ok=yes])
if test "$gcal_ttylibs_ok" = yes; then
@@ -334,7 +334,7 @@ if test "$gcal_cv_use_term" = yes; then
[TTYLIBS="-ltermcap"])
AC_MSG_CHECKING(for working terminal libraries again)
LIBS="$LIBS $TTYLIBS"
- AC_TRY_LINK(,
+ AC_TRY_LINK([#include <term.h>],
[tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);],
[gcal_ttylibs_ok=yes])
if test "$gcal_ttylibs_ok" = yes; then
Thanks,
Florian
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] C99 compatibility fix for the configure script,
Florian Weimer <=