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 @@ -165,14 +165,9 @@ include(CheckIncludeFile)
165
165
include (CheckCSourceCompiles )
166
166
include (CheckCSourceRuns )
167
167
include (CheckSymbolExists )
168
- CHECK_INCLUDE_FILE (stdbool.h HAVE_STDBOOL_H )
169
168
CHECK_C_SOURCE_COMPILES (
170
169
"int main() { __builtin_expect(0,0); return 0; }"
171
170
HAVE___BUILTIN_EXPECT )
172
- CHECK_C_SOURCE_COMPILES ("
173
- int f(void) __attribute__ (());
174
- int main() { return 0; }
175
- " HAVE___ATTRIBUTE__ )
176
171
177
172
CONFIGURE_FILE (
178
173
${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