#undef HAVE_U_INT32_T
#undef HAVE_U_INT64_T
+#undef ssize_t
+#undef sig_atomic_t
+
/* Define this if struct utmp have ut_user */
#undef HAVE_UT_USER
/* Define this if struct sockaddr has sa_len */
#undef SOCKADDR_HAS_SA_LEN
+/* Define to isoc_realloc if you have a broken realloc */
+#undef BROKEN_REALLOC
+#ifdef BROKEN_REALLOC
+#define realloc(X, Y) isoc_realloc((X), (Y))
+#define isoc_realloc(X, Y) ((X) ? realloc((X), (Y)) : malloc(Y))
+#endif
+
#undef VOID_RETSIGTYPE
#ifdef VOID_RETSIGTYPE
#define LOGIN_PATH BINDIR "/login"
#endif
-
+/* operating system kludges ahead */
+#undef SunOS
AC_MSG_RESULT($ac_cv_prog_LN_S)
AC_SUBST(LN_S)dnl
])
+
+dnl test for sig_atomic_t
+
+AC_DEFUN(AC_TYPE_SIG_ATOMIC_T,
+[AC_MSG_CHECKING(for sig_atomic_t)
+AC_CACHE_VAL(ac_cv_type_sig_atomic_t,
+AC_TRY_COMPILE(
+[#include <signal.h>],
+[sig_atomic_t foo = 1;],
+ac_cv_type_sig_atomic_t=yes,
+ac_cv_type_sig_atomic_t=no))
+if test "$ac_cv_type_sig_atomic_t" = no; then
+ AC_DEFINE(sig_atomic_t, int)dnl
+fi
+AC_MSG_RESULT($ac_cv_type_sig_atomic_t)
+])
CANONICAL_HOST=$host
AC_SUBST(CANONICAL_HOST)
+case "$host" in
+*-*-sunos4*)
+ AC_DEFINE(SunOS, 4)
+ ;;
+esac
+
dnl Checks for programs.
AC_PROG_CC
AC_KRB_PROG_LN_S
if test "$GCC" = "yes"; then
- WFLAGS="-Wall -Wno-unused -Wconversion -Wmissing-prototypes"
+ WFLAGS="-Wall -Wno-unused -Wmissing-prototypes"
fi
AC_SUBST(WFLAGS)
CFLAGS="-g"
AC_BROKEN(strlwr strnlen strsep strtok_r strupr unsetenv)
AC_BROKEN(verr verrx vsyslog vwarn vwarnx warn warnx)
+AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [
+ac_cv_func_realloc_broken=no
+AC_TRY_RUN([
+#include <stddef.h>
+#include <stdlib.h>
+
+int main()
+{
+ return realloc(NULL, 17) == NULL;
+}
+],:, ac_cv_func_realloc_broken=yes, :)
+])
+if test "$ac_cv_func_realloc_broken" = yes ; then
+ AC_DEFINE(BROKEN_REALLOC)
+fi
+
dnl AC_KRB_FUNC_GETCWD_BROKEN
dnl
AC_TYPE_UID_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
+AC_CHECK_TYPE(ssize_t, int)
+AC_TYPE_SIG_ATOMIC_T
dnl AC_SUBST(LIBOBJS)