summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-02-05 12:52:16 (GMT)
committer Slávek Banko <slavek.banko@axis.cz>2017-02-05 12:52:16 (GMT)
commit783e11f17e1fab6bf7cd85d215f03ba446a42644 (patch)
treee387689d898ca5210c8a1d62870d5b15a99f38a5
parentdda25dba5bbda97310035c719cee5bdddc3b7d0f (diff)
downloadtdenetworkmanager-783e11f1.zip
tdenetworkmanager-783e11f1.tar.gz
Fix detection whether the system is big endian
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ConfigureChecks.cmake5
-rw-r--r--config.h.cmake4
-rw-r--r--tdenetworkmanager/src/sha1.cpp2
3 files changed, 11 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index eec03f1..962ce3d 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -10,5 +10,10 @@
#################################################
# required stuff
+tde_setup_architecture_flags( )
+
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
find_package( TQt )
find_package( TDE )
diff --git a/config.h.cmake b/config.h.cmake
index a17378f..b709202 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1 +1,5 @@
#define TDENETWORKMANAGER_VERSION_STRING "@TDENETWORKMANAGER_VERSION@"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
diff --git a/tdenetworkmanager/src/sha1.cpp b/tdenetworkmanager/src/sha1.cpp
index 74f4df9..180f4bb 100644
--- a/tdenetworkmanager/src/sha1.cpp
+++ b/tdenetworkmanager/src/sha1.cpp
@@ -12,6 +12,8 @@
* See README and COPYING for more details.
*/
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>