fixes for sunos brokenness

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2875 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-08-10 04:13:59 +00:00
parent 8802bda81b
commit e7e2e14be7
3 changed files with 53 additions and 2 deletions

View File

@@ -13,6 +13,9 @@
#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
@@ -94,6 +97,13 @@
/* 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
@@ -161,4 +171,5 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
#define LOGIN_PATH BINDIR "/login"
#endif
/* operating system kludges ahead */
#undef SunOS

View File

@@ -580,3 +580,19 @@ LN_S="$ac_cv_prog_LN_S"
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)
])

View File

@@ -11,6 +11,12 @@ AC_CANONICAL_HOST
CANONICAL_HOST=$host
AC_SUBST(CANONICAL_HOST)
case "$host" in
*-*-sunos4*)
AC_DEFINE(SunOS, 4)
;;
esac
dnl Checks for programs.
AC_PROG_CC
@@ -22,7 +28,7 @@ AC_PROG_AWK
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"
@@ -172,6 +178,22 @@ AC_BROKEN(seteuid strcasecmp strdup strerror strftime)
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
@@ -251,6 +273,8 @@ AC_TYPE_PID_T
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)