Don't define BITS16, BITS32, BITS64, etc. anymore. Instead,
authorTheodore Tso <tytso@mit.edu>
Fri, 3 Feb 1995 17:05:51 +0000 (17:05 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 3 Feb 1995 17:05:51 +0000 (17:05 +0000)
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

src/include/krb5/ChangeLog
src/include/krb5/configure.in
src/include/krb5/wordsize.h

index cbbef050ee5b3d19074176a42afde8ef4682d7c7..ab4aaf74ce81cec744f894a048ee1a98b9764282 100644 (file)
@@ -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.
index 5bb54f1b2d0bd03bc30659ab9300de4a415dcbd0..655fe339b1337cce8a5900b214d7e6842ba24899 100644 (file)
@@ -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
index 8c08643a230b3586a08a09a83d2d2752cc3a905c..87ad7aa90cb0ee7b545e7eed50c8d28591abefdc 100644 (file)
 #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