mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-10 06:23:01 +03:00
Add cmake check for big endian.
This commit is contained in:
@@ -4,6 +4,7 @@ include(CheckFunctionExists)
|
|||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
include(CheckTypeSize)
|
include(CheckTypeSize)
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
|
include(TestBigEndian)
|
||||||
|
|
||||||
set(PACKAGE ${APPLICATION_NAME})
|
set(PACKAGE ${APPLICATION_NAME})
|
||||||
set(VERSION ${APPLICATION_VERSION})
|
set(VERSION ${APPLICATION_VERSION})
|
||||||
@@ -55,3 +56,5 @@ if (WITH_DEBUG_CRYPTO)
|
|||||||
set(DEBUG_CRYPTO 1)
|
set(DEBUG_CRYPTO 1)
|
||||||
endif (WITH_DEBUG_CRYPTO)
|
endif (WITH_DEBUG_CRYPTO)
|
||||||
|
|
||||||
|
# ENDIAN
|
||||||
|
test_big_endian(WORDS_BIGENDIAN)
|
||||||
|
@@ -77,14 +77,8 @@
|
|||||||
/* Define to 1 if you want to enable debug output for crypto functions */
|
/* Define to 1 if you want to enable debug output for crypto functions */
|
||||||
#cmakedefine DEBUG_CRYPTO 1
|
#cmakedefine DEBUG_CRYPTO 1
|
||||||
|
|
||||||
|
/*************************** ENDIAN *****************************/
|
||||||
|
|
||||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
#cmakedefine WORDS_BIGENDIAN 1
|
||||||
# if defined __BIG_ENDIAN__
|
|
||||||
# define WORDS_BIGENDIAN 1
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# ifndef WORDS_BIGENDIAN
|
|
||||||
/* # undef WORDS_BIGENDIAN */
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
Reference in New Issue
Block a user