File tree Expand file tree Collapse file tree 3 files changed +2
-27
lines changed Expand file tree Collapse file tree 3 files changed +2
-27
lines changed Original file line number Diff line number Diff line change @@ -178,14 +178,9 @@ include(CheckIncludeFile)
178
178
include (CheckCSourceCompiles )
179
179
include (CheckCSourceRuns )
180
180
include (CheckSymbolExists )
181
- CHECK_INCLUDE_FILE (stdbool.h HAVE_STDBOOL_H )
182
181
CHECK_C_SOURCE_COMPILES (
183
182
"int main() { __builtin_expect(0,0); return 0; }"
184
183
HAVE___BUILTIN_EXPECT )
185
- CHECK_C_SOURCE_COMPILES ("
186
- int f(void) __attribute__ (());
187
- int main() { return 0; }
188
- " HAVE___ATTRIBUTE__ )
189
184
190
185
CONFIGURE_FILE (
191
186
${CMAKE_CURRENT_SOURCE_DIR} /config.h.in
Original file line number Diff line number Diff line change 5
5
extern "C" {
6
6
#endif
7
7
8
- #cmakedefine HAVE_STDBOOL_H
9
-
10
- #ifdef HAVE_STDBOOL_H
8
+ #if __has_include (< stdbool .h > )
11
9
#include <stdbool.h>
12
10
#elif !defined(__cplusplus)
13
11
typedef char bool ;
14
12
#endif
15
13
16
14
#cmakedefine HAVE___BUILTIN_EXPECT
17
15
18
- #cmakedefine HAVE___ATTRIBUTE__
19
-
20
16
#cmakedefine CMARK_THREADING
21
17
22
- #ifdef HAVE___ATTRIBUTE__
23
- #define CMARK_ATTRIBUTE (list ) __attribute__ (list)
24
- #else
25
- #define CMARK_ATTRIBUTE (list )
26
- #endif
27
-
28
18
#ifndef CMARK_INLINE
29
19
#if defined(_MSC_VER ) && !defined(__cplusplus )
30
20
#define CMARK_INLINE __inline
Original file line number Diff line number Diff line change 9
9
extern "C" {
10
10
#endif
11
11
12
- #define HAVE_STDBOOL_H
13
-
14
- #ifdef HAVE_STDBOOL_H
12
+ #if __has_include (< stdbool .h > )
15
13
#include <stdbool.h>
16
14
#elif !defined(__cplusplus)
17
15
typedef char bool ;
18
16
#endif
19
17
20
18
#define HAVE___BUILTIN_EXPECT
21
19
22
- #define HAVE___ATTRIBUTE__
23
-
24
20
#define CMARK_THREADING
25
21
26
- #ifdef HAVE___ATTRIBUTE__
27
- #define CMARK_ATTRIBUTE (list ) __attribute__ (list)
28
- #else
29
- #define CMARK_ATTRIBUTE (list )
30
- #endif
31
-
32
22
#ifndef CMARK_INLINE
33
23
#if defined(_MSC_VER ) && !defined(__cplusplus )
34
24
#define CMARK_INLINE __inline
You can’t perform that action at this time.
0 commit comments