summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-15 13:02:28 +1100
committerDamien Miller <djm@mindrot.org>2006-03-15 13:02:28 +1100
commitaf87af165f25b7db22e32c0b2e55606bc68c450c (patch)
treec0c8557324164e41b9b09b9db942b7193be69c02 /defines.h
parenta63128d1a8a4077bc992e09d00e2683d1592e500 (diff)
- (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.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/defines.h b/defines.h
index f25934176..9ecf18d5a 100644
--- a/defines.h
+++ b/defines.h
@@ -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))