schedule. Also, define the key schedule more sanely. See related
comments in lib/crypto/des.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10230
dc483132-0cff-0310-8789-
dd5450dbe970
+Tue Oct 14 15:39:28 1997 Tom Yu <tlyu@voltage-multiplier.mit.edu>
+
+ * des.h: Define KRB_INT32 for the purposes of dealing with the key
+ schedule. Also, define the key schedule more sanely. See related
+ comments in lib/crypto/des.
+
Sat Feb 22 00:49:37 1997 Sam Hartman <hartmans@tertius.mit.edu>
* krb.h: Do not depend on unix being defined on Unix systems;
typedef unsigned char des_cblock[8]; /* crypto-block size */
+
/* Key schedule */
-typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16];
+/* Ick. We need this in here unfortunately... */
+#ifndef KRB_INT32
+#ifdef SIZEOF_INT
+#if SIZEOF_INT >= 4
+#define KRB_INT32 int
+#else
+#define KRB_INT32 long
+#endif
+#else /* !defined(SIZEOF_INT) */
+#include <limits.h>
+#if (UINT_MAX >= 0xffffffff)
+#define KRB_INT32 int
+#else
+#define KRB_INT32 long
+#endif
+#endif /* !defined(SIZEOF_INT) */
+#endif /* !defined(KRB_INT32) */
+
+typedef struct des_ks_struct { KRB_INT32 _[2]; } des_key_schedule[16];
#define DES_KEY_SZ (sizeof(des_cblock))
#define DES_ENCRYPT 1