Imported Upstream version 1.7.4p4
[debian/sudo] / aclocal.m4
index 5bbb4ac1341a4f1a1583fdb52e49370d0d386a31..1276746a6d2a2ce742bc4cd13998aa014d80a2ca 100644 (file)
@@ -227,7 +227,7 @@ AC_DEFUN([SUDO_FUNC_UNSETENV_VOID],
     ],
     [sudo_cv_func_unsetenv_void=no],
     [sudo_cv_func_unsetenv_void=yes],
-    [sudo_cv_func_unsetenv_void=yes])])
+    [sudo_cv_func_unsetenv_void=no])])
     if test $sudo_cv_func_unsetenv_void = yes; then
       AC_DEFINE(UNSETENV_VOID, 1,
         [Define to 1 if the `unsetenv' function returns void instead of `int'.])
@@ -253,24 +253,14 @@ int putenv(const char *string) {return 0;}], [])],
 dnl
 dnl check for sa_len field in struct sockaddr
 dnl
-AC_DEFUN(SUDO_SOCK_SA_LEN,
-[AC_MSG_CHECKING(for sa_len field in struct sockaddr)
-AC_CACHE_VAL(sudo_cv_sock_sa_len,
-[AC_TRY_RUN([#include <sys/types.h>
-#include <sys/socket.h>
-main() {
-struct sockaddr s;
-s.sa_len = 0;
-exit(0);
-}], sudo_cv_sock_sa_len=yes, sudo_cv_sock_sa_len=no,
-  sudo_cv_sock_sa_len=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($sudo_cv_sock_sa_len)
-if test $sudo_cv_sock_sa_len = yes; then
-  AC_DEFINE(HAVE_SA_LEN, 1, [Define if your struct sockadr has an sa_len field.])
-fi
-])
-
+AC_DEFUN(SUDO_SOCK_SA_LEN, [
+    AC_CHECK_MEMBER([struct sockaddr.sa_len], 
+       [AC_DEFINE(HAVE_SA_LEN, 1, [Define if your struct sockadr has an sa_len field.])],    
+       [],
+       [ #include <sys/types.h>
+         #include <sys/socket.h>] 
+    )]
+)
 dnl
 dnl check for max length of uid_t in string representation.
 dnl we can't really trust UID_MAX or MAXUID since they may exist
@@ -299,33 +289,13 @@ main() {
   (void) fprintf(f, "%d\n", strlen(b));
   (void) fclose(f);
   exit(0);
-}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10)
+}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10, sudo_cv_uid_t_len=10)
 ])
 rm -f conftestdata
 AC_MSG_RESULT($sudo_cv_uid_t_len)
 AC_DEFINE_UNQUOTED(MAX_UID_T_LEN, $sudo_cv_uid_t_len, [Define to the max length of a uid_t in string context (excluding the NUL).])
 ])
 
-dnl
-dnl Check for presence of long long and for sizeof(long long) == sizeof(long)
-dnl
-AC_DEFUN(SUDO_TYPE_LONG_LONG,
-[AC_CHECK_TYPES(long long, [AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.])]
-[AC_MSG_CHECKING(for long and long long equivalence)
-AC_CACHE_VAL(sudo_cv_type_long_is_quad,
-[AC_TRY_RUN([
-main() {
-if (sizeof(long long) == sizeof(long)) exit(0);
-else exit(1);
-}], [sudo_cv_type_long_is_quad=yes],
-[sudo_cv_type_long_is_quad=no], [sudo_cv_type_long_is_quad=no])
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($sudo_cv_type_long_is_quad)
-if test $sudo_cv_type_long_is_quad = yes; then
-  AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).])
-fi
-])])
-
 dnl
 dnl append a libpath to an LDFLAGS style variable
 dnl