diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2007-12-26 14:45:19 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2007-12-26 14:45:19 +0000 |
commit | d583c6119a4be8ccf08cb82b47542d00b2ab47a3 (patch) | |
tree | e3827b7fc12cbf1ece91dbb52f1ade7b7c6510e9 /configure.ac | |
parent | e7189017e19dd5162f40a91050a730c5de982d9a (diff) | |
download | fetchmail-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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
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) |