2
0
MasterPassword/MasterPassword/ObjC/Mac/MasterPassword-Prefix.pch

70 lines
3.4 KiB
Plaintext
Raw Normal View History

//
// Prefix header for all source files of the 'MasterPassword' target in the 'MasterPassword' project
//
#import <Availability.h>
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
#warning "This project uses features only available in Mac OS X 10.8 and later."
#endif
#import "Pearl-Prefix.pch"
2012-06-08 21:46:13 +00:00
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#ifdef CRASHLYTICS
#import <Crashlytics/Crashlytics.h>
#endif
#import "MPTypes.h"
#import "MPMacConfig.h"
#else
#import <libgen.h>
#import <CoreFoundation/CFString.h>
#import <objc/runtime.h>
#import <objc/message.h>
#define trc(format, ...) objc_msgSend( \
objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \
sel_getUid( "inFile:atLine:trc:" ), \
basename( (char *)__FILE__ ), __LINE__, \
CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \
##__VA_ARGS__)
#define dbg(format, ...) objc_msgSend( \
objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \
sel_getUid( "inFile:atLine:dbg:" ), \
basename( (char *)__FILE__ ), __LINE__, \
CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \
##__VA_ARGS__)
#define inf(format, ...) objc_msgSend( \
objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \
sel_getUid( "inFile:atLine:inf:" ), \
basename( (char *)__FILE__ ), __LINE__, \
CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \
##__VA_ARGS__)
#define wrn(format, ...) objc_msgSend( \
objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \
sel_getUid( "inFile:atLine:wrn:" ), \
basename( (char *)__FILE__ ), __LINE__, \
CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \
##__VA_ARGS__)
#define err(format, ...) objc_msgSend( \
objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \
sel_getUid( "inFile:atLine:err:" ), \
basename( (char *)__FILE__ ), __LINE__, \
CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \
##__VA_ARGS__)
#define ftl(format, ...) do{objc_msgSend( \
objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \
sel_getUid( "inFile:atLine:ftl:" ), \
basename( (char *)__FILE__ ), __LINE__, \
CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \
##__VA_ARGS__); abort(); } while (0)
#endif