Skip to content

Commit 6481203

Browse files
committed
simplify preprocessor checks
Linux, FreeBSD already define DISPATCH_COCOA_COMPAT, and Windows was defining that in a couple of places in an unstructured haphazard manner. Define it similarly and clean up the other sites.
1 parent f7a0cbb commit 6481203

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

private/private.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ void _dispatch_prohibit_transition_to_multithreaded(bool prohibit);
177177

178178
#if TARGET_OS_MAC
179179
#define DISPATCH_COCOA_COMPAT 1
180-
#elif defined(__linux__) || defined(__FreeBSD__)
180+
#elif defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32)
181181
#define DISPATCH_COCOA_COMPAT 1
182182
#else
183183
#define DISPATCH_COCOA_COMPAT 0
184184
#endif
185185

186-
#if DISPATCH_COCOA_COMPAT || defined(_WIN32)
186+
#if DISPATCH_COCOA_COMPAT
187187

188188
#define DISPATCH_CF_SPI_VERSION 20160712
189189

@@ -257,7 +257,7 @@ API_AVAILABLE(macos(10.6), ios(4.0))
257257
DISPATCH_EXPORT
258258
void (*_Nullable _dispatch_end_NSAutoReleasePool)(void *);
259259

260-
#endif /* DISPATCH_COCOA_COMPAT || defined(_WIN32) */
260+
#endif /* DISPATCH_COCOA_COMPAT */
261261

262262
API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
263263
DISPATCH_EXPORT DISPATCH_NOTHROW

0 commit comments

Comments
 (0)