Skip to content

CoreFoundation: use #include instead of #import #1754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ CF_EXTERN_C_BEGIN
#include <pthread.h>

#if !DEPLOYMENT_RUNTIME_SWIFT && __has_include(<os/log.h>)
#import <os/log.h>
#include <os/log.h>
#else
typedef struct os_log_s *os_log_t;
#define os_log(...) do { } while (0)
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFPlatform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ CF_PRIVATE int asprintf(char **ret, const char *format, ...) {
#endif

#if DEPLOYMENT_RUNTIME_SWIFT
#import <fcntl.h>
#include <fcntl.h>

extern void swift_retain(void *);
extern void swift_release(void *);
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFUtilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <crt_externs.h>
#include <dlfcn.h>
#include <vproc.h>
#import <libproc.h>
#include <libproc.h>
#include <sys/sysctl.h>
#include <sys/stat.h>
#include <mach/mach.h>
Expand Down
4 changes: 2 additions & 2 deletions CoreFoundation/Base.subproj/CoreFoundation_Prefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ typedef char * Class;
#define CRSetCrashLogMessage2(A) do {} while (0)

#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
#import <libkern/OSAtomic.h>
#import <pthread.h>
#include <libkern/OSAtomic.h>
#include <pthread.h>
#endif


Expand Down
16 changes: 8 additions & 8 deletions CoreFoundation/Collections.subproj/CFBasicHash.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
Responsibility: Christopher Kane
*/

#import "CFBasicHash.h"
#import <CoreFoundation/CFRuntime.h>
#import "CFRuntime_Internal.h"
#import <CoreFoundation/CFSet.h>
#import <Block.h>
#import <math.h>
#include "CFBasicHash.h"
#include <CoreFoundation/CFRuntime.h>
#include "CFRuntime_Internal.h"
#include <CoreFoundation/CFSet.h>
#include <Block.h>
#include <math.h>
#if __HAS_DISPATCH__
#import <dispatch/dispatch.h>
#include <dispatch/dispatch.h>
#endif
#import "CFOverflow.h"
#include "CFOverflow.h"

#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
#define __SetLastAllocationEventName(A, B) do { if (__CFOASafe && (A)) __CFSetLastAllocationEventName(A, B); } while (0)
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Collections.subproj/CFData.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#endif

#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
#import <mach/mach.h>
#include <mach/mach.h>
CF_INLINE unsigned long __CFPageSize() { return vm_page_size; }
#elif DEPLOYMENT_TARGET_WINDOWS
CF_INLINE unsigned long __CFPageSize() {
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Parsing.subproj/CFPropertyList_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
*/

#import <CoreFoundation/CFPropertyList.h>
#include <CoreFoundation/CFPropertyList.h>

// this is only allowed the first 8 bits
typedef CF_OPTIONS(CFOptionFlags, CFPropertyListSupportedFormats) {
Expand Down
6 changes: 3 additions & 3 deletions CoreFoundation/RunLoop.subproj/CFMachPort_Lifetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
All of the functions in this file exist to orchestrate the exact time/circumstances we decrement the port references.
*/

#import "CFMachPort_Lifetime.h"
#import <mach/mach.h>
#import "CFInternal.h"
#include "CFMachPort_Lifetime.h"
#include <mach/mach.h>
#include "CFInternal.h"

// Records information relevant for cleaning up after a given mach port. Here's
// a summary of its life cycle:
Expand Down