summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/krb5/ChangeLog7
-rw-r--r--src/include/krb5/configure.in7
-rw-r--r--src/include/krb5/wordsize.h48
3 files changed, 26 insertions, 36 deletions
diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog
index cbbef050ee..ab4aaf74ce 100644
--- a/src/include/krb5/ChangeLog
+++ b/src/include/krb5/ChangeLog
@@ -1,3 +1,10 @@
+Fri Feb 3 07:57:31 1995 Theodore Y. Ts'o (tytso@dcl)
+
+ * configure.in:
+ * wordsize.h: Don't use BITS16, BITS32, etc. anymore. Use
+ autoconf's SIZEOF_INT and SIZEOF_LONG definitions to make
+ things work.
+
Mon Jan 30 15:43:19 1995 Chris Provenzano (proven@mit.edu)
* func-proto.h Added krb5_keytype arg to rb5_rdreq_key_proc.
diff --git a/src/include/krb5/configure.in b/src/include/krb5/configure.in
index 5bb54f1b2d..655fe339b1 100644
--- a/src/include/krb5/configure.in
+++ b/src/include/krb5/configure.in
@@ -3,7 +3,6 @@ WITH_CCOPTS
WITH_KRB5ROOT
AC_SET_BUILDTOP
CONFIG_RULES
-ISODE_DEFS
AC_CONFIG_HEADER(autoconf.h)
AC_PROG_LEX
AC_PROG_INSTALL
@@ -119,8 +118,10 @@ AC_DEFINE(HAS_ANSI_VOLATILE)
fi
dnl
-dnl BITS16, BITS32, BITS64
-AC_DEFINE(BITS32)
+dnl Word sizes...
+AC_SIZEOF_TYPE(short)
+AC_SIZEOF_TYPE(int)
+AC_SIZEOF_TYPE(long)
dnl then from osconf.h, we have
AC_TIME_WITH_SYS_TIME
diff --git a/src/include/krb5/wordsize.h b/src/include/krb5/wordsize.h
index 8c08643a23..87ad7aa90c 100644
--- a/src/include/krb5/wordsize.h
+++ b/src/include/krb5/wordsize.h
@@ -28,49 +28,31 @@
#ifndef KRB5_WORDSIZE__
#define KRB5_WORDSIZE__
-#ifdef BITS16
-#define __OK
-typedef int krb5_int16;
-typedef long krb5_int32;
-
typedef unsigned char krb5_octet;
typedef unsigned char krb5_ui_1;
-typedef unsigned int krb5_ui_2;
-typedef unsigned long krb5_ui_4;
-#endif
-#ifdef BITS32
-#define __OK
+#if (SIZEOF_INT == 2)
+typedef int krb5_int16;
+typedef unsigned int krb5_ui_2;
+#elif (SIZEOF_SHORT == 2)
typedef short krb5_int16;
-typedef int krb5_int32;
-typedef unsigned char krb5_octet;
-typedef unsigned char krb5_ui_1;
typedef unsigned short krb5_ui_2;
-typedef unsigned int krb5_ui_4;
+#else
+ ?==error: undefined 16 bit type
#endif
-#ifdef NOT_RIGHT_YET
-/*
- * Incorporated from the Sandia changes; but this can't be right; if
- * we're on a 64 bit machine, an int shouldn't be 32 bits!?!
- * [tytso:19920616.2224EDT]
- */
-#ifdef BITS64
-#define __OK
-typedef short krb5_int16;
+#if (SIZEOF_INT == 4)
typedef int krb5_int32;
-typedef unsigned char krb5_octet;
-typedef unsigned char krb5_ui_1;
-typedef unsigned short krb5_ui_2;
typedef unsigned int krb5_ui_4;
+#elif (SIZEOF_LONG == 4)
+typedef long krb5_int32;
+typedef unsigned long krb5_ui_4;
+#elif (SIZEOF_SHORT == 4)
+typedef short krb5_int32;
+typedef unsigned short krb5_ui_4;
+#else
+ ?== error: undefined 32 bit type
#endif
-#endif /* NOT RIGHT YET */
-
-#ifndef __OK
- ?==error: must define word size!
-#endif /* __OK */
-
-#undef __OK
#define KRB5_INT32_MAX 2147483647
/* this strange form is necessary since - is a unary operator, not a sign