From b16f3de95c4e328e8194dac3e12fc25ec239455d Mon Sep 17 00:00:00 2001 From: Thomas A Date: Mon, 19 Jun 2023 11:36:44 -0700 Subject: [PATCH] Fix implicit-function-declaration --- CFRuntime.c | 1 + CFSortFunctions.h | 6 ++++++ CFSystemDirectories.c | 10 +++++++++- NSArray.m | 1 + NSDictionary.m | 1 + NSForwarding.m | 1 + NSOrderedSet.m | 3 +++ include/CoreFoundation/CFInternal.h | 1 + 8 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 CFSortFunctions.h diff --git a/CFRuntime.c b/CFRuntime.c index 23aa3b7..6b55812 100644 --- a/CFRuntime.c +++ b/CFRuntime.c @@ -31,6 +31,7 @@ #include #include "CFInternal.h" #include "CFBasicHash.h" +#include "FoundationExceptions.h" #include #include #include diff --git a/CFSortFunctions.h b/CFSortFunctions.h new file mode 100644 index 0000000..b6c02b0 --- /dev/null +++ b/CFSortFunctions.h @@ -0,0 +1,6 @@ +#ifndef CF_SORT_FUNCTIONS_H +#define CF_SORT_FUNCTIONS_H + +void CFSortIndexes(CFIndex *indexBuffer, CFIndex count, CFOptionFlags opts, CFComparisonResult (^cmp)(CFIndex, CFIndex)); + +#endif // CF_SORT_FUNCTIONS_H \ No newline at end of file diff --git a/CFSystemDirectories.c b/CFSystemDirectories.c index 90e62a8..e20f24a 100644 --- a/CFSystemDirectories.c +++ b/CFSystemDirectories.c @@ -44,7 +44,15 @@ #include #include #include -//#include +// Can't include due to type conflict with NSSearchPathDirectory +// #ifndef __NS_SYSTEM_DIRECTORIES_H__ +// #define __NS_SYSTEM_DIRECTORIES_H__ +typedef unsigned int NSSearchPathEnumerationState; +__OSX_AVAILABLE_STARTING(__MAC_10_0,__IPHONE_2_0) +extern NSSearchPathEnumerationState NSGetNextSearchPathEnumeration(NSSearchPathEnumerationState state, char *path); +__OSX_AVAILABLE_STARTING(__MAC_10_0,__IPHONE_2_0) +extern NSSearchPathEnumerationState NSStartSearchPathEnumeration(NSSearchPathDirectory dir, NSSearchPathDomainMask domainMask); +// #endif /* __NS_SYSTEM_DIRECTORIES_H__ */ CFSearchPathEnumerationState __CFStartSearchPathEnumeration(CFSearchPathDirectory dir, CFSearchPathDomainMask domainMask) { return NSStartSearchPathEnumeration(dir, domainMask); diff --git a/NSArray.m b/NSArray.m index caca0bd..30ac9df 100644 --- a/NSArray.m +++ b/NSArray.m @@ -18,6 +18,7 @@ #import "NSObjectInternal.h" #import "NSStringInternal.h" #import "CFInternal.h" +#import "CFSortFunctions.h" CF_EXPORT Boolean _CFArrayIsMutable(CFArrayRef array); CF_EXPORT NSUInteger _CFArrayFastEnumeration(CFArrayRef array, NSFastEnumerationState *state, id __unsafe_unretained stackbuffer[], NSUInteger count); diff --git a/NSDictionary.m b/NSDictionary.m index c558c6a..e8dfd30 100644 --- a/NSDictionary.m +++ b/NSDictionary.m @@ -15,6 +15,7 @@ #include #import "CFInternal.h" +#import "CFSortFunctions.h" #import "NSFastEnumerationEnumerator.h" #import #import "NSObjectInternal.h" diff --git a/NSForwarding.m b/NSForwarding.m index a448ca5..c46aee3 100644 --- a/NSForwarding.m +++ b/NSForwarding.m @@ -23,6 +23,7 @@ along with Darling. If not, see . // Copyright (c) 2014 Apportable. All rights reserved. // +#import #import #import diff --git a/NSOrderedSet.m b/NSOrderedSet.m index c20a401..dd4a60e 100644 --- a/NSOrderedSet.m +++ b/NSOrderedSet.m @@ -13,9 +13,12 @@ #import #import +#import + #import "CFBasicHash.h" #import "ForFoundationOnly.h" +#import "CFSortFunctions.h" #import "NSBasicHash.h" #import "NSFastEnumerationEnumerator.h" #import "NSObjectInternal.h" diff --git a/include/CoreFoundation/CFInternal.h b/include/CoreFoundation/CFInternal.h index 8e8b807..0b0b05e 100644 --- a/include/CoreFoundation/CFInternal.h +++ b/include/CoreFoundation/CFInternal.h @@ -844,6 +844,7 @@ CF_INLINE dispatch_queue_t __CFDispatchQueueGetGenericBackground(void) { #endif +CF_PRIVATE void __CFAttributedStringInitialize(void); CF_EXTERN_C_END