File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,15 @@ target_include_directories(
168
168
target_link_libraries (zone-bench PRIVATE zone)
169
169
170
170
check_include_file(endian.h HAVE_ENDIAN_H)
171
+ check_include_file(sys/endian.h HAVE_SYS_ENDIAN_H)
171
172
check_include_file(unistd.h HAVE_UNISTD_H)
173
+ set (ENDIAN_INCLUDES "endian.h" )
174
+ if (HAVE_SYS_ENDIAN_H)
175
+ set (ENDIAN_INCLUDES "${ENDIAN_INCLUDES} ;sys/endian.h" )
176
+ endif ()
177
+ check_symbol_exists(bswap16 ${ENDIAN_INCLUDES} HAVE_DECL_BSWAP16)
178
+ check_symbol_exists(bswap32 ${ENDIAN_INCLUDES} HAVE_DECL_BSWAP32)
179
+ check_symbol_exists(bswap64 ${ENDIAN_INCLUDES} HAVE_DECL_BSWAP64)
172
180
173
181
set (CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE=1" )
174
182
check_symbol_exists(getopt "stdlib.h;unistd.h" HAVE_GETOPT)
Original file line number Diff line number Diff line change 9
9
#ifndef CONFIG_H
10
10
#define CONFIG_H
11
11
12
+ /* Define to 1 if you have the declaration of `bswap16', and to 0 if you
13
+ don't. */
14
+ #cmakedefine01 HAVE_DECL_BSWAP16
15
+
16
+ /* Define to 1 if you have the declaration of `bswap32', and to 0 if you
17
+ don't. */
18
+ #cmakedefine01 HAVE_DECL_BSWAP32
19
+
20
+ /* Define to 1 if you have the declaration of `bswap64', and to 0 if you
21
+ don't. */
22
+ #cmakedefine01 HAVE_DECL_BSWAP64
23
+
12
24
/* Define to 1 if you have the <endian.h> header file. */
13
25
#cmakedefine HAVE_ENDIAN_H 1
14
26
You can’t perform that action at this time.
0 commit comments