]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
* lsh_types.h: Moved definitions of UINT* to
authorNiels Möller <nisse@lysator.liu.se>
Sun, 22 Nov 1998 00:03:34 +0000 (01:03 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sun, 22 Nov 1998 00:03:34 +0000 (01:03 +0100)
include/crypto_types.h.

Rev: src/symmetric/include/crypto_types.h:1.3

include/crypto_types.h

index f23251df14d1b34be58f3b0c800d8bd14bc3e5a5..f30da6ec46acfba4b3ae09f5c2ee1a3e18d867a5 100644 (file)
@@ -6,19 +6,42 @@
 #define CRYPTO_TYPES_H_INCLUDED
 
 #ifdef PIKE
-#include "pike_types.h"
-#include "global.h"
-#define UINT32 unsigned INT32
-#define UINT16 unsigned INT16
-#define UINT8 unsigned INT8
+# include "pike_types.h"
+# include "global.h"
+# define UINT32 unsigned INT32
+# define UINT16 unsigned INT16
+# define UINT8 unsigned INT8
 #else  /* !PIKE */
-#ifdef LSH
-#include "lsh_types.h"
-#else /* !LSH */
-#define UINT32 unsigned long
-#define UINT16 unsigned short
-#define UINT8 unsigned char
-#endif
+
+# ifdef LSH
+#  ifdef HAVE_CONFIG_H
+#   include "config.h"
+#  endif
+#  if SIZEOF_SHORT >= 4
+#   define UINT32 unsigned short
+#  elif SIZEOF_INT >= 4
+#   define UINT32 unsigned int
+#  elif SIZEOF_LONG >= 4
+#   define UINT32 unsigned long
+#  else
+#   error Ledsen error
+#  endif /* UINT32 */
+
+#  if SIZEOF_SHORT >= 2
+#   define UINT16 unsigned short
+#  elif SIZEOF_INT >= 2
+#   define UINT16 unsigned int
+#  else
+#   error Ledsen error
+#  endif  /* UINT16 */
+
+#  define UINT8 unsigned char
+
+# else /* !LSH */
+#  define UINT32 unsigned long
+#  define UINT16 unsigned short
+#  define UINT8 unsigned char
+# endif /* !PIKE */
 #endif
 
 #endif /* CRYPTO_TYPES_H_INCLUDED */