File tree Expand file tree Collapse file tree 4 files changed +26
-30
lines changed Expand file tree Collapse file tree 4 files changed +26
-30
lines changed Original file line number Diff line number Diff line change 24
24
#ifdef __APPLE__
25
25
#include <Availability.h>
26
26
#include <TargetConditionals.h>
27
- #else
28
- #ifndef API_AVAILABLE
29
- #define API_AVAILABLE (...)
27
+ #include <os/base.h>
28
+ #elif defined( __linux__ )
29
+ #include <os/linux_base.h>
30
30
#endif
31
- #ifndef API_DEPRECATED
32
- #define API_DEPRECATED (...)
33
- #endif
34
- #ifndef API_UNAVAILABLE
35
- #define API_UNAVAILABLE (...)
36
- #endif
37
- #ifndef API_DEPRECATED_WITH_REPLACEMENT
38
- #define API_DEPRECATED_WITH_REPLACEMENT (...)
39
- #endif
40
- #endif // __APPLE__
41
31
42
- #if HAVE_SYS_CDEFS_H
43
- #include <sys/cdefs.h>
44
- #endif
45
32
#include <sys/types.h>
46
33
#include <stddef.h>
47
34
#include <stdint.h>
48
35
#include <stdbool.h>
49
36
#include <stdarg.h>
50
- #if HAVE_UNISTD_H
37
+ #if !defined( HAVE_UNISTD_H ) || HAVE_UNISTD_H
51
38
#include <unistd.h>
52
39
#endif
53
40
#include <fcntl.h>
Original file line number Diff line number Diff line change 15
15
16
16
#include <sys/param.h>
17
17
18
+ #if HAVE_SYS_CDEFS_H
19
+ #include <sys/cdefs.h>
20
+ #endif
21
+
22
+ #ifndef API_AVAILABLE
23
+ #define API_AVAILABLE (...)
24
+ #endif
25
+ #ifndef API_DEPRECATED
26
+ #define API_DEPRECATED (...)
27
+ #endif
28
+ #ifndef API_UNAVAILABLE
29
+ #define API_UNAVAILABLE (...)
30
+ #endif
31
+ #ifndef API_DEPRECATED_WITH_REPLACEMENT
32
+ #define API_DEPRECATED_WITH_REPLACEMENT (...)
33
+ #endif
34
+
18
35
#if __GNUC__
19
36
#define OS_EXPECT (x , v ) __builtin_expect((x), (v))
20
37
#define OS_UNUSED __attribute__((__unused__))
Original file line number Diff line number Diff line change 23
23
24
24
#ifdef __APPLE__
25
25
#include < Availability.h>
26
- #include < TargetConditionals.h>
27
26
#include < os/availability.h>
28
- #endif
29
- #ifdef __linux__
30
- #include < os/linux_base.h>
31
- #else
27
+ #include < TargetConditionals.h>
32
28
#include < os/base.h>
29
+ #elif defined(__linux__)
30
+ #include < os/linux_base.h>
33
31
#endif
34
32
35
33
/* !
Original file line number Diff line number Diff line change 27
27
#ifndef __OS_OBJECT_PRIVATE__
28
28
#define __OS_OBJECT_PRIVATE__
29
29
30
- #if HAVE_SYS_CDEFS_H
31
- #include < sys/cdefs.h>
32
- #endif
33
- #include < stddef.h>
34
30
#include < os/object.h>
35
-
36
- #ifndef API_AVAILABLE
37
- #define API_AVAILABLE (...)
38
- #endif
31
+ #include < stddef.h>
32
+ #include < stdint.h>
39
33
40
34
#if __GNUC__
41
35
#define OS_OBJECT_NOTHROW __attribute__ ((__nothrow__))
You can’t perform that action at this time.
0 commit comments