fixes for sunos brokenness
authorJohan Danielsson <joda@pdc.kth.se>
Sun, 10 Aug 1997 04:13:59 +0000 (04:13 +0000)
committerJohan Danielsson <joda@pdc.kth.se>
Sun, 10 Aug 1997 04:13:59 +0000 (04:13 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2875 ec53bebd-3082-4978-b11e-865c3cabbd6b

acconfig.h
acinclude.m4
configure.in

index 42532f16f7e42aaa51e3484518893f10ed842932..03a0f644f6d02b686b9b12cea56b94aab22a821f 100644 (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
 
 /*  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
index 682002ba62616d2c8e1e004c995ef3b457d25488..2e2fcb9bc65fe00310320d9ac5a8411d04351ee3 100644 (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)
+])
index e80a3744e8bea70df19515b39dd052e107dbd670..2baf0306fbd4121be077e035e1341e417234cf17 100644 (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)