]> granicus.if.org Git - sudo/commitdiff
No longer need SUDO_CHECK_TYPE and SUDO_TYPE_* now that the default
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 12 Jan 2012 18:28:49 +0000 (13:28 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 12 Jan 2012 18:28:49 +0000 (13:28 -0500)
includes have unistd.h in them.

--HG--
branch : 1.7

aclocal.m4
config.h.in
configure
configure.in

index 255b91fb6a64563a0a3d2ec9261a9b1fcd0cadda..95fa3e49ffc2bb6ac9a0df3a757983624163643a 100644 (file)
@@ -138,52 +138,6 @@ AC_DEFUN([SUDO_IO_LOGDIR], [
     AC_MSG_RESULT($iolog_dir)
 ])dnl
 
-dnl
-dnl SUDO_CHECK_TYPE(TYPE, DEFAULT)
-dnl XXX - should require the check for unistd.h...
-dnl
-AC_DEFUN([SUDO_CHECK_TYPE],
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(sudo_cv_type_$1,
-[AC_EGREP_CPP($1, [#include <sys/types.h>
-#include <stdio.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif], sudo_cv_type_$1=yes, sudo_cv_type_$1=no)])dnl
-AC_MSG_RESULT($sudo_cv_type_$1)
-if test $sudo_cv_type_$1 = no; then
-  AC_DEFINE($1, $2, [Define if your system lacks the $1 type.])
-fi
-])
-
-dnl
-dnl Check for size_t declation
-dnl
-AC_DEFUN([SUDO_TYPE_SIZE_T],
-[SUDO_CHECK_TYPE(size_t, int)])
-
-dnl
-dnl Check for ssize_t declation
-dnl
-AC_DEFUN([SUDO_TYPE_SSIZE_T],
-[SUDO_CHECK_TYPE(ssize_t, int)])
-
-dnl
-dnl Check for dev_t declation
-dnl
-AC_DEFUN([SUDO_TYPE_DEV_T],
-[SUDO_CHECK_TYPE(dev_t, int)])
-
-dnl
-dnl Check for ino_t declation
-dnl
-AC_DEFUN([SUDO_TYPE_INO_T],
-[SUDO_CHECK_TYPE(ino_t, unsigned int)])
-
 dnl
 dnl check for working fnmatch(3)
 dnl
index f6882e50f95ae95d132a0446e1e0d1b2e96def4a..f3413479a1ed45b3c68ea2fc9e34de9c5a5043ac 100644 (file)
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const
 
-/* Define if your system lacks the dev_t type. */
+/* Define to `int' if <sys/types.h> does not define. */
 #undef dev_t
 
 /* Define to `int' if <sys/types.h> doesn't define. */
 #undef gid_t
 
-/* Define if your system lacks the ino_t type. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef ino_t
 
 /* Define to `int' if <sys/types.h> does not define. */
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
 
-/* Define if your system lacks the ssize_t type. */
+/* Define to `int' if <sys/types.h> does not define. */
 #undef ssize_t
 
 /* Define to `int' if <sys/types.h> doesn't define. */
index 1e8c8ae6026438844f47d87eba17eb4e4d1b7bf7..4c4c972cf29a5eff35ba26bf0752b1d15c592eb0 100755 (executable)
--- a/configure
+++ b/configure
@@ -15718,135 +15718,47 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
-$as_echo_n "checking for size_t... " >&6; }
-if ${sudo_cv_type_size_t+:} false; then :
-  $as_echo_n "(cached) " >&6
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <stdio.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "size_t" >/dev/null 2>&1; then :
-  sudo_cv_type_size_t=yes
-else
-  sudo_cv_type_size_t=no
-fi
-rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_type_size_t" >&5
-$as_echo "$sudo_cv_type_size_t" >&6; }
-if test $sudo_cv_type_size_t = no; then
 
-$as_echo "#define size_t int" >>confdefs.h
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+if test "x$ac_cv_type_ssize_t" = xyes; then :
 
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
-$as_echo_n "checking for ssize_t... " >&6; }
-if ${sudo_cv_type_ssize_t+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <stdio.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ssize_t" >/dev/null 2>&1; then :
-  sudo_cv_type_ssize_t=yes
-else
-  sudo_cv_type_ssize_t=no
-fi
-rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_type_ssize_t" >&5
-$as_echo "$sudo_cv_type_ssize_t" >&6; }
-if test $sudo_cv_type_ssize_t = no; then
 
-$as_echo "#define ssize_t int" >>confdefs.h
+ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
+if test "x$ac_cv_type_dev_t" = xyes; then :
 
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dev_t" >&5
-$as_echo_n "checking for dev_t... " >&6; }
-if ${sudo_cv_type_dev_t+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <stdio.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+
+cat >>confdefs.h <<_ACEOF
+#define dev_t int
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "dev_t" >/dev/null 2>&1; then :
-  sudo_cv_type_dev_t=yes
-else
-  sudo_cv_type_dev_t=no
-fi
-rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_type_dev_t" >&5
-$as_echo "$sudo_cv_type_dev_t" >&6; }
-if test $sudo_cv_type_dev_t = no; then
 
-$as_echo "#define dev_t int" >>confdefs.h
-
-fi
+ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
+if test "x$ac_cv_type_ino_t" = xyes; then :
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ino_t" >&5
-$as_echo_n "checking for ino_t... " >&6; }
-if ${sudo_cv_type_ino_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <stdio.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ino_t" >/dev/null 2>&1; then :
-  sudo_cv_type_ino_t=yes
 else
-  sudo_cv_type_ino_t=no
-fi
-rm -f conftest*
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_type_ino_t" >&5
-$as_echo "$sudo_cv_type_ino_t" >&6; }
-if test $sudo_cv_type_ino_t = no; then
-
-$as_echo "#define ino_t unsigned int" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define ino_t unsigned int
+_ACEOF
 
 fi
 
index f37d4a44de7d5ae69a30962605f836138a88be42..5c3c0fdc9fa340dd2adf9e54d2bc141a98aaef43 100644 (file)
@@ -1992,10 +1992,10 @@ AC_CHECK_TYPES([struct in6_addr], [], [], [#include <sys/types.h>
 #include <netinet/in.h>])
 AC_TYPE_LONG_LONG_INT
 AC_CHECK_SIZEOF([long int])
-SUDO_TYPE_SIZE_T
-SUDO_TYPE_SSIZE_T
-SUDO_TYPE_DEV_T
-SUDO_TYPE_INO_T
+AC_CHECK_TYPE(size_t, unsigned int)
+AC_CHECK_TYPE(ssize_t, int)
+AC_CHECK_TYPE(dev_t, int)
+AC_CHECK_TYPE(ino_t, unsigned int)
 SUDO_UID_T_LEN
 SUDO_SOCK_SA_LEN
 dnl