Stub/implement CFPreferencesAppValueIsForced and [NSError _setFileNameLocalizationEnabled:]

This commit is contained in:
Ariel Abreu 2020-08-27 22:10:24 -04:00
parent 5906c1c491
commit 54d606dd9a
No known key found for this signature in database
GPG Key ID: ECF8C2B9E8AD3E6B
3 changed files with 19 additions and 0 deletions

View File

@ -394,6 +394,13 @@ CFArrayRef CFPreferencesCopyKeyList(CFStringRef appName, CFStringRef user, CF
}
}
Boolean CFPreferencesAppValueIsForced(CFStringRef key, CFStringRef applicationID) {
// kind of a stub but not really
// Darling doesn't have "forced" preferences
// (those would be preferences enforced by an administrator)
return false;
};
/****************************/
/* CFPreferencesDomain */

View File

@ -6,6 +6,7 @@
//
#import <Foundation/NSError.h>
#import <Foundation/NSError_Private.h>
#import <Foundation/NSDictionary.h>
#import "ForFoundationOnly.h"
@ -159,6 +160,15 @@ static NSError *_outOfmemoryError = nil;
@end
@implementation NSError (NSErrorPrivateStuff)
+ (void)_setFileNameLocalizationEnabled:(BOOL)enabled
{
// silently ignore it
}
@end
@implementation __NSCFError
+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key

View File

@ -138,6 +138,8 @@ all arguments must be non-NULL */
CF_EXPORT
CFArrayRef CFPreferencesCopyKeyList(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);
CF_EXPORT
Boolean CFPreferencesAppValueIsForced(CFStringRef key, CFStringRef applicationID);
CF_EXTERN_C_END
CF_IMPLICIT_BRIDGING_DISABLED