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:
+12
-2
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user