aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2007-12-26 14:45:19 +0000
committerMatthias Andree <matthias.andree@gmx.de>2007-12-26 14:45:19 +0000
commitd583c6119a4be8ccf08cb82b47542d00b2ab47a3 (patch)
treee3827b7fc12cbf1ece91dbb52f1ade7b7c6510e9
parente7189017e19dd5162f40a91050a730c5de982d9a (diff)
downloadfetchmail-d583c6119a4be8ccf08cb82b47542d00b2ab47a3.tar.gz
fetchmail-d583c6119a4be8ccf08cb82b47542d00b2ab47a3.tar.bz2
fetchmail-d583c6119a4be8ccf08cb82b47542d00b2ab47a3.zip
Revise getnameinfo check to ensure NULL is defined and the result is properly
evaluated, to avoid bogus results on for instance FreeBSD and redefinitions of NI_* at compile time. svn path=/branches/BRANCH_6-3/; revision=5146
-rw-r--r--NEWS3
-rw-r--r--configure.ac6
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index bbdf2180..554a99fa 100644
--- a/NEWS
+++ b/NEWS
@@ -85,6 +85,9 @@ fetchmail 6.3.9 (not yet released):
was also changed to reflect this. (Peter O'Gorman)
* m4/gethostbyname_r.m4 does AC_TRY_COMPILE, which unfortunately can pass even
if there is no gethostbyname_r. Changed to AC_TRY_LINK. (Peter O'Gorman)
+* Revise getnameinfo check to ensure NULL is defined and the result is properly
+ evaluated, to avoid bogus results on for instance FreeBSD and redefinitions of
+ NI_* at compile time. (Matthias Andree).
* __attribute__ ((unused)) is a gccism, removed from libesmtp/gethostbyname.c.
(Peter O'Gorman)
* In KAME/getnameinfo.c it's best to use the correct argument to inet_ntoa.
diff --git a/configure.ac b/configure.ac
index 3433a5c6..29d913f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -467,10 +467,16 @@ AC_CACHE_CHECK([for getnameinfo],[fm_cv_getnameinfo],[
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
], [getnameinfo(NULL,0, NULL,0, NULL, 0, 0);],
[ fm_cv_getnameinfo=yes],
[ fm_cv_getnameinfo=no ])
])
+if test $fm_cv_getnameinfo = yes ; then
+ AC_DEFINE(HAVE_GETNAMEINFO,1,[Define to 1 if your system has getnameinfo()])
+fi
AM_CONDITIONAL(NEED_GETADDRINFO, test "$fm_cv_getaddrinfo" != yes)
AM_CONDITIONAL(NEED_GETNAMEINFO, test "$fm_cv_getnameinfo" != yes)