dnl
AC_DEFUN([SUDO_FUNC_ISBLANK],
[AC_CACHE_CHECK([for isblank], sudo_cv_func_isblank,
- [AC_TRY_LINK([#include <ctype.h>], [(void)isblank(1);],
+ [AC_TRY_LINK([#include <ctype.h>], [return (isblank('a'));],
sudo_cv_func_isblank=yes, sudo_cv_func_isblank=no)])
] [
if test "$sudo_cv_func_isblank" = "yes"; then
dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <$ac_header_dirent>]], [[DIR d; (void)dirfd(&d);]])], [AC_DEFINE(HAVE_DIRFD)], [AC_TRY_LINK([#include <sys/types.h>
-#include <$ac_header_dirent>], [DIR d; (void)&d.dd_fd;], [AC_DEFINE(HAVE_DD_FD)])])
+#include <$ac_header_dirent>], [DIR d; memset(&d, 0, sizeof(d)); return(d.dd_fd);], [AC_DEFINE(HAVE_DD_FD)])])
dnl
dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS
dnl (it contains snprintf, vsnprintf, asprintf, and vasprintf)