Added some more stuff to deal with byte order identification on Solaris 10 x86 systems.

git-svn-id: file:///home/mbr/svn/fwknop/trunk@142 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
Damien Stuart
2009-09-09 01:38:03 +00:00
parent 4fef98682b
commit a07decf1d9
2 changed files with 16 additions and 2 deletions
+12 -2
View File
@@ -36,6 +36,10 @@
#include <assert.h> /* assert() */
#include "sha2.h"
#if HAVE_SYS_BYTEORDER_H
#include <sys/byteorder.h>
#endif
/*
* ASSERT NOTE:
* Some sanity checking code is included using assert(). On my FreeBSD
@@ -86,8 +90,14 @@
* made).
*/
#ifdef WIN32
#define BYTE_ORDER BIG_ENDIAN
#ifndef BYTE_ORDER
#ifdef WIN32
#define BYTE_ORDER BIG_ENDIAN
#elif defined(_BIG_ENDIAN)
#define BYTE_ORDER BIG_ENDIAN
#elif defined(_LITTLE_ENDIAN)
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#endif
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
+4
View File
@@ -48,6 +48,10 @@ extern "C" {
*/
#include <sys/types.h>
#if HAVE_INTTYPES_H
#define SHA2_USE_INTTYPES_H
#endif
#ifdef SHA2_USE_INTTYPES_H
#include <inttypes.h>
#endif /* SHA2_USE_INTTYPES_H */