Commit 1d0b6066 authored by Niels Möller's avatar Niels Möller
Browse files

* lsh_types.h: Moved definitions of UINT* to

include/crypto_types.h.

Rev: src/lsh_types.h:1.17
Rev: src/symmetric/include/crypto_types.h:1.3
parent fa61d59d
......@@ -30,31 +30,7 @@
#include "config.h"
#endif
/* FIXME: This should probably be set in config.h by autoconf */
/* The crypt function requires _XOPEN_SOURCE, while the initgroups
* function requires _BSD_SOURCE. Appearantly also needed for strsignal() */
#define _GNU_SOURCE
#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
#if SIZEOF_SHORT >= 2
#define UINT16 unsigned short
#elif SIZEOF_INT >= 2
#define UINT16 unsigned int
#else
#error Ledsen error
#endif
#define UINT8 unsigned char
#include "include/crypto_types.h"
#ifdef __GNUC__
#define NORETURN __attribute__ ((noreturn))
......
......@@ -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 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment