Skip to content

Commit 4698b92

Browse files
kastiglioneparkera
authored andcommitted
Use #include over #import in C souce (#682)
This is because Clang's MSVC compatibility does not handle #import statements outside of of objc. #import of type library is an unsupported Microsoft feature See also #663
1 parent 5ab4679 commit 4698b92

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CoreFoundation/Base.subproj/CFPlatform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ CF_EXPORT int32_t _CF_SOCK_STREAM() { return SOCK_STREAM; }
13081308
#endif
13091309

13101310
#if DEPLOYMENT_RUNTIME_SWIFT
1311-
#import <fcntl.h>
1311+
#include <fcntl.h>
13121312
int _CFOpenFileWithMode(const char *path, int opts, mode_t mode) {
13131313
return open(path, opts, mode);
13141314
}

CoreFoundation/Collections.subproj/CFBasicHash.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
Responsibility: Christopher Kane
1414
*/
1515

16-
#import "CFBasicHash.h"
17-
#import <CoreFoundation/CFRuntime.h>
18-
#import <CoreFoundation/CFSet.h>
19-
#import <math.h>
16+
#include "CFBasicHash.h"
17+
#include <CoreFoundation/CFRuntime.h>
18+
#include <CoreFoundation/CFSet.h>
19+
#include <math.h>
2020
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
2121
#if __HAS_DISPATCH__
22-
#import <dispatch/dispatch.h>
22+
#include <dispatch/dispatch.h>
2323
#endif
2424
#endif
2525

CoreFoundation/Collections.subproj/CFData.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#endif
2828

2929
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
30-
#import <mach/mach.h>
30+
#include <mach/mach.h>
3131
CF_INLINE unsigned long __CFPageSize() { return vm_page_size; }
3232
#elif DEPLOYMENT_TARGET_WINDOWS
3333
CF_INLINE unsigned long __CFPageSize() {

0 commit comments

Comments
 (0)