From 43b557d52f2013995bca95afaccfad95cbbc2c17 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Mon, 30 Mar 2020 21:24:48 +0200 Subject: Fix HAVE_DECL_ users to check value, not definition. All such uses in fetchmail stem from AC_CHECK_DECLS(), which will always define a HAVE_DECL_ macro with either 0 or 1, thus we must not check if that macro is defined, but we must check its value. --- fetchmail.c | 4 ++-- fetchmail.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fetchmail.c b/fetchmail.c index 0ce3ddc8..eef77752 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -272,10 +272,10 @@ int main(int argc, char **argv) "-SSLv3" #endif #endif -#ifndef HAVE_DECL_TLS1_2_VERSION +#if HAVE_DECL_TLS1_2_VERSION + 0 == 0 "-TLS1.2" #endif -#ifndef HAVE_DECL_TLS1_2_VERSION +#if HAVE_DECL_TLS1_3_VERSION + 0 == 0 "-TLS1.3" #endif #ifdef OPIE_ENABLE diff --git a/fetchmail.h b/fetchmail.h index 2db6d880..f731e159 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -724,7 +724,7 @@ void itimerthread(void*); #endif /* _EMX_ */ #ifdef HAVE_STRERROR -# if !defined(strerror) && !defined(HAVE_DECL_STRERROR) /* On some systems, strerror is a macro */ +# if !defined(strerror) && !HAVE_DECL_STRERROR /* On some systems, strerror is a macro */ char *strerror (int); # endif #endif /* HAVE_STRERROR */ -- cgit v1.2.3