return value to correct types. (raeburn@cygnus.com)
* obj/Makefile.in (check): Set srcdir in environment.
(raeburn@cygnus.com)
* configure.in (AC_COMPILE_TYPE): replacment for AC_CHECK_TYPE
that uses AC_TRY_COMPILE instead of AC_EGREP_CPP. For now, only
use it for the int32 types (where AC_CHECK_TYPE gets the wrong
result on __CYGWIN32__) and plan that AC_CHECK_TYPE itself gets
repaired. (Fix by eichin@cygnus.com)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10351
dc483132-0cff-0310-8789-
dd5450dbe970
+Thu Jan 15 11:34:13 1998 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * hash/hash_bigkey.c (collect_key, collect_data): Cast malloc
+ return value to correct types. (raeburn@cygnus.com)
+
+ * obj/Makefile.in (check): Set srcdir in environment.
+ (raeburn@cygnus.com)
+
+ * configure.in (AC_COMPILE_TYPE): replacment for AC_CHECK_TYPE
+ that uses AC_TRY_COMPILE instead of AC_EGREP_CPP. For now, only
+ use it for the int32 types (where AC_CHECK_TYPE gets the wrong
+ result on __CYGWIN32__) and plan that AC_CHECK_TYPE itself gets
+ repaired. (Fix by eichin@cygnus.com)
+
+
Sun Dec 21 18:33:14 1997 Tom Yu <tlyu@mit.edu>
* hash/dbm.c: Rename the errno member of HTAB.
dnl checks for typedefs
AC_TYPE_SIZE_T
+dnl AC_COMPILE_TYPE(TYPE, DEFAULT)
+define(AC_COMPILE_TYPE,
+[AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(ac_cv_type_$1,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#endif], [$1 test_variable;], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
+AC_MSG_RESULT($ac_cv_type_$1)
+if test $ac_cv_type_$1 = no; then
+ AC_DEFINE($1, $2)
+fi
+])
+
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(u_char, unsigned char)
AC_CHECK_TYPE(u_int8_t, unsigned char)
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(u_int16_t, unsigned short)
-AC_CHECK_TYPE(int32_t, int)
-AC_CHECK_TYPE(u_int32_t, unsigned int)
+AC_COMPILE_TYPE(int32_t, int)
+AC_COMPILE_TYPE(u_int32_t, unsigned int)
dnl checks for structures
dnl checks for compiler characteristics
totlen = len + BIGKEYLEN(pagep);
if (hashp->bigkey_buf)
free(hashp->bigkey_buf);
- hashp->bigkey_buf = (char *)malloc(totlen);
+ hashp->bigkey_buf = (u_int8_t *)malloc(totlen);
if (!hashp->bigkey_buf)
return (-1);
memcpy(hashp->bigkey_buf + len,
if (BIGKEYLEN(pagep) == 0) {
if (hashp->bigkey_buf)
free(hashp->bigkey_buf);
- hashp->bigkey_buf = (char *)malloc(len);
+ hashp->bigkey_buf = (u_int8_t *)malloc(len);
return (hashp->bigkey_buf ? len : -1);
}
totlen = len + BIGKEYLEN(pagep);
if (hashp->bigdata_buf)
free(hashp->bigdata_buf);
totlen = len + BIGDATALEN(pagep);
- hashp->bigdata_buf = (char *)malloc(totlen);
+ hashp->bigdata_buf = (u_int8_t *)malloc(totlen);
if (!hashp->bigdata_buf)
return (-1);
memcpy(hashp->bigdata_buf + totlen - BIGDATALEN(pagep),
$(CC) -o $@ dbtest.o $(STRERROR_OBJ) $(LIBDB)
check:: dbtest
- TMPDIR=$(TMPDIR) $(FCTSH) $(top_srcdir)/test/run.test
+ srcdir=$(srcdir) TMPDIR=$(TMPDIR) $(FCTSH) $(top_srcdir)/test/run.test
install::