aboutsummaryrefslogtreecommitdiffstats
path: root/config.h.in
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-17 14:19:38 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-17 14:19:38 +0300
commit96e14f0474571c1c27164ff79a16413de9b3027a (patch)
tree150f67f2f8d97521e3a3e535718a53629e48002f /config.h.in
parentb441439d550de340e892903b1309fb35bfba6312 (diff)
downloadrspamd-96e14f0474571c1c27164ff79a16413de9b3027a.tar.gz
rspamd-96e14f0474571c1c27164ff79a16413de9b3027a.zip
Fix build under Solaris10. Reported in https://bitbucket.org/vstakhov/rspamd/issue/21/rspamd-solaris10-x86-openindiana
Diffstat (limited to 'config.h.in')
-rw-r--r--config.h.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in
index 804ef08b5..eb20d7b5d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -58,6 +58,36 @@
#cmakedefine HAVE_MACHINE_ENDIAN_H 1
#cmakedefine HAVE_SYS_CDEFS_H 1
+ #ifdef HAVE_ENDIAN_H
+ #include <endian.h>
+ #else
+ #ifdef HAVE_SYS_ENDIAN_H
+ #include <sys/endian.h>
+ #else
+ #ifdef HAVE_MACHINE_ENDIAN_H
+ #include <machine/endian.h>
+ #else
+ #define LITTLE_ENDIAN 1234
+ #define BIG_ENDIAN 4321
+ #if defined(i386) || defined(__i386) || defined(__amd64) || \
+ defined(BIT_ZERO_ON_RIGHT) || defined(__x86__)
+ #define BYTE_ORDER LITTLE_ENDIAN
+ #endif
+
+ #if defined(__sparc) || defined(__sparc__) || defined(__powerpc__)
+ #define BYTE_ORDER BIG_ENDIAN
+ #endif
+
+ #endif /* HAVE_MACHINE_ENDIAN_H */
+ #endif /* HAVE_SYS_ENDIAN_H */
+ #endif /* HAVE_ENDIAN_H */
+
+ #if !defined(BYTE_ORDER) || (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN)
+ error "Undefined or unknown BYTE_ORDER";
+ #endif
+
+
+
#cmakedefine HAVE_SYS_QUEUE_H 1
#cmakedefine HAVE_SYS_MMAN_H 1
#cmakedefine HAVE_SYS_SOCKET_H 1