This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
/
TDGNUstep.h
90 lines (57 loc) · 1.7 KB
/
TDGNUstep.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//
// TDGNUstep.h
// TouchDB
//
// Created by Jens Alfke on 2/27/12.
// Copyright (c) 2012 Couchbase, Inc. All rights reserved.
//
#ifdef GNUSTEP
/* Stuff that's in iOS / OS X but not GNUstep or Linux */
#define _GNU_SOURCE
#import <Foundation/Foundation.h>
#ifndef NS_BLOCKS_AVAILABLE
#define NS_BLOCKS_AVAILABLE 1
#endif
typedef int32_t SInt32;
typedef uint32_t UInt32;
typedef int64_t SInt64;
typedef uint64_t UInt64;
typedef int8_t SInt8;
typedef uint8_t UInt8;
// in BSD but not Linux:
int digittoint(int c);
typedef double CFAbsoluteTime;
CFAbsoluteTime CFAbsoluteTimeGetCurrent(void);
#define NSRunLoopCommonModes NSDefaultRunLoopMode
typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
@interface NSArray (GNUstep)
- (NSArray *)sortedArrayUsingComparator:(NSComparator)cmptr;
@end
@interface NSMutableArray (GNUstep)
- (void)sortUsingComparator:(NSComparator)cmptr;
@end
enum {
NSDataReadingMappedIfSafe = 1UL << 0,
NSDataReadingUncached = 1UL << 1,
};
typedef NSUInteger NSDataReadingOptions;
enum {
NSDataSearchBackwards = 1UL << 0,
NSDataSearchAnchored = 1UL << 1
};
typedef NSUInteger NSDataSearchOptions;
@interface NSData (GNUstep)
+ (id)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
- (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange;
@end
@interface NSOperationQueue (GNUstep)
- (void)addOperationWithBlock:(void (^)(void))block;
@end
@protocol NSURLConnectionDelegate <NSObject>
@end
@protocol NSStreamDelegate <NSObject>
@end
enum {
NSURLRequestReloadIgnoringLocalCacheData = NSURLRequestReloadIgnoringCacheData
};
#endif // GNUSTEP