summaryrefslogtreecommitdiffstats
path: root/src/include/krb5
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-02-03 17:05:51 +0000
committerTheodore Tso <tytso@mit.edu>1995-02-03 17:05:51 +0000
commitb1a4093522e4eeec4fc6b44b05f60804bea80ed1 (patch)
treec2eeef35b498bc3d0db42ccb624a79ce80f27471 /src/include/krb5
parent3c58d9996b4c786cd4a1d725e3baa8a04b394ea3 (diff)
downloadkrb5-b1a4093522e4eeec4fc6b44b05f60804bea80ed1.tar.gz
krb5-b1a4093522e4eeec4fc6b44b05f60804bea80ed1.tar.xz
krb5-b1a4093522e4eeec4fc6b44b05f60804bea80ed1.zip
Don't define BITS16, BITS32, BITS64, etc. anymore. Instead,
individually test for SIZEOF_SHORT, SIZEOF_INT, and SIZEOF_LONG and use them as appropriate in wordsize.h git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4897 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/krb5')
-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 cbbef050e..ab4aaf74c 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 5bb54f1b2..655fe339b 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 8c08643a2..87ad7aa90 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