|
55 | 55 | * In mixing the test with other tests or using negations will result in compile |
56 | 56 | * errors. |
57 | 57 | */ |
58 | | -#if defined(__APPLE__) && defined(__has_builtin) && __has_builtin(__builtin_available) |
| 58 | +#if defined(__APPLE__) |
| 59 | + |
| 60 | +#if defined(__has_builtin) && __has_builtin(__builtin_available) |
59 | 61 | # define HAVE_FSTATAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) |
60 | 62 | # define HAVE_FACCESSAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) |
61 | 63 | # define HAVE_FCHMODAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) |
|
72 | 74 | # define HAVE_UTIMENSAT_RUNTIME __builtin_available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) |
73 | 75 | # define HAVE_PWRITEV_RUNTIME __builtin_available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) |
74 | 76 |
|
| 77 | +#else /* Xcode 8 or earlier */ |
| 78 | + |
| 79 | +#ifdef HAVE_FSTATAT |
| 80 | +# define HAVE_FSTATAT_RUNTIME (fstatat != NULL) |
| 81 | +#endif |
| 82 | + |
| 83 | +#ifdef HAVE_FACCESSAT |
| 84 | +# define HAVE_FACCESSAT_RUNTIME (faccessat != NULL) |
| 85 | +#endif |
| 86 | + |
| 87 | +#ifdef HAVE_FCHMODAT |
| 88 | +# define HAVE_FCHMODAT_RUNTIME (fchmodat != NULL) |
| 89 | +#endif |
| 90 | + |
| 91 | +#ifdef HAVE_FCHOWNAT |
| 92 | +# define HAVE_FCHOWNAT_RUNTIME (fchownat != NULL) |
| 93 | +#endif |
| 94 | + |
| 95 | +#ifdef HAVE_LINKAT |
| 96 | +# define HAVE_LINKAT_RUNTIME (linkat != NULL) |
| 97 | +#endif |
| 98 | + |
| 99 | +#ifdef HAVE_FDOPENDIR |
| 100 | +# define HAVE_FDOPENDIR_RUNTIME (fdopendir != NULL) |
| 101 | +#endif |
| 102 | + |
| 103 | +#ifdef HAVE_MKDIRAT |
| 104 | +# define HAVE_MKDIRAT_RUNTIME (mkdirat != NULL) |
| 105 | +#endif |
| 106 | + |
| 107 | +#ifdef HAVE_RENAMEAT |
| 108 | +# define HAVE_RENAMEAT_RUNTIME (renameat != NULL) |
| 109 | +#endif |
| 110 | + |
| 111 | +#ifdef HAVE_UNLINKAT |
| 112 | +# define HAVE_UNLINKAT_RUNTIME (unlinkat != NULL) |
| 113 | +#endif |
| 114 | + |
| 115 | +#ifdef HAVE_OPENAT |
| 116 | +# define HAVE_OPENAT_RUNTIME (openat != NULL) |
| 117 | +#endif |
| 118 | + |
| 119 | +#ifdef HAVE_READLINKAT |
| 120 | +# define HAVE_READLINKAT_RUNTIME (readlinkat != NULL) |
| 121 | +#endif |
| 122 | + |
| 123 | +#ifdef HAVE_SYMLINKAT |
| 124 | +# define HAVE_SYMLINKAT_RUNTIME (symlinkat != NULL) |
| 125 | +#endif |
| 126 | + |
| 127 | +#endif |
| 128 | + |
75 | 129 | #ifdef HAVE_FUTIMESAT |
| 130 | +/* Some of the logic for weak linking depends on this assertion */ |
76 | 131 | # error "HAVE_FUTIMESAT unexpectedly defined" |
77 | 132 | #endif |
78 | 133 |
|
|
94 | 149 | # define HAVE_PWRITEV_RUNTIME 1 |
95 | 150 | #endif |
96 | 151 |
|
| 152 | + |
97 | 153 | #ifdef __cplusplus |
98 | 154 | extern "C" { |
99 | 155 | #endif |
|
0 commit comments