File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ target_link_libraries(zone-bench PRIVATE zone)
169
169
check_include_file (endian.h HAVE_ENDIAN_H )
170
170
171
171
check_include_file (unistd.h HAVE_UNISTD_H )
172
- check_symbol_exists (getopt unistd.h HAVE_GETOPT )
172
+ check_symbol_exists (getopt "stdio.h; unistd.h" HAVE_GETOPT )
173
173
if (NOT HAVE_UNISTD_H OR NOT HAVE_GETOPT )
174
174
target_include_directories (
175
175
zone-bench PRIVATE $< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /compat> )
Original file line number Diff line number Diff line change 64
64
# define no_sanitize_undefined
65
65
# endif
66
66
67
- # define likely (params ) __builtin_expect(!!(params), 1)
68
- # define unlikely (params ) __builtin_expect(!!(params), 0)
67
+ # if has_builtin (__builtin_expect )
68
+ # define likely (params ) __builtin_expect(!!(params), 1)
69
+ # define unlikely (params ) __builtin_expect(!!(params), 0)
70
+ # else
71
+ # define likely (params ) (params)
72
+ # define unlikely (params ) (params)
73
+ # endif
69
74
#endif
70
75
71
76
#endif // ATTRIBUTES_H
Original file line number Diff line number Diff line change
1
+ /* Wether or not we have getopt */
2
+ #undef HAVE_GETOPT
3
+
1
4
/* Wether or not have the <endian.h> header file */
2
5
#undef HAVE_ENDIAN_H
3
6
You can’t perform that action at this time.
0 commit comments