of possibly relevant headers and only go with the fast path if we have
credible information that this is a big-endian platform.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3439
d4fa192b-c00b-0410-8231-
f00ffab90ce4
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
+AC_CHECK_HEADERS([sys/endian.h])
AC_CHECK_HEADERS([sys/filio.h])
AC_CHECK_HEADERS([sys/mount.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([sys/statvfs.h])
AC_CHECK_HEADERS([sys/vfs.h])
+AC_CHECK_HEADERS([endian.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([pthread_np.h])
AC_CHECK_HEADERS([stddef.h])
* From: $FreeBSD: head/lib/libmd/sha256c.c 154479 2006-01-17 15:35:57Z phk $
*/
-#include <stdint.h>
+#include "config.h"
+#include <stdint.h>
#include <string.h>
+#ifdef HAVE_ENDIAN_H
+#include <endian.h>
+#define BYTE_ORDER __BYTE_ORDER
+#define BIG_ENDIAN __BIG_ENDIAN
+#endif
+#ifdef HAVE_SYS_ENDIAN_H
+#include <sys/endian.h>
+#define BYTE_ORDER _BYTE_ORDER
+#define BIG_ENDIAN _BIG_ENDIAN
+#endif
+
#include "vsha256.h"
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN