diff options
author | Damien Miller <djm@mindrot.org> | 2006-03-15 03:02:28 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2006-03-15 03:02:28 +0100 |
commit | af87af165f25b7db22e32c0b2e55606bc68c450c (patch) | |
tree | c0c8557324164e41b9b09b9db942b7193be69c02 /defines.h | |
parent | - djm@cvs.openbsd.org 2006/03/07 09:07:40 (diff) | |
download | openssh-af87af165f25b7db22e32c0b2e55606bc68c450c.tar.xz openssh-af87af165f25b7db22e32c0b2e55606bc68c450c.zip |
- (djm) [configure.ac defines.h kex.c md-sha256.c]
[openbsd-compat/sha2.h openbsd-compat/openbsd-compat.h]
[openbsd-compat/sha2.c] First stab at portability glue for SHA256
KEX support, should work with libc SHA256 support or OpenSSL
EVP_sha256 if present
Diffstat (limited to 'defines.h')
-rw-r--r-- | defines.h | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -25,7 +25,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -/* $Id: defines.h,v 1.130 2005/12/17 11:04:09 dtucker Exp $ */ +/* $Id: defines.h,v 1.131 2006/03/15 02:02:28 djm Exp $ */ /* Constants */ @@ -496,6 +496,22 @@ struct winsize { # define offsetof(type, member) ((size_t) &((type *)0)->member) #endif +/* Set up BSD-style BYTE_ORDER definition if it isn't there already */ +/* XXX: doesn't try to cope with strange byte orders (PDP_ENDIAN) */ +#ifndef BYTE_ORDER +# ifndef LITTLE_ENDIAN +# define LITTLE_ENDIAN 1234 +# endif /* LITTLE_ENDIAN */ +# ifndef BIG_ENDIAN +# define BIG_ENDIAN 4321 +# endif /* BIG_ENDIAN */ +# ifdef WORDS_BIGENDIAN +# define BYTE_ORDER BIG_ENDIAN +# else /* WORDS_BIGENDIAN */ +# define BYTE_ORDER LITTLE_ENDIAN +# endif /* WORDS_BIGENDIAN */ +#endif /* BYTE_ORDER */ + /* Function replacement / compatibility hacks */ #if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO)) |