-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompat.h
56 lines (46 loc) · 2.23 KB
/
compat.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
/**
* @headerfile compat.h
* FSEventStream flag compatibility shim
*
* In order to compile a binary against an older SDK yet still support the
* features present in later OS releases, we need to define any missing enum
* constants not present in the older SDK. This allows us to safely defer
* feature detection to runtime (and avoid recompilation).
*/
#ifndef fsevent_watch_compat_h
#define fsevent_watch_compat_h
#ifndef __CORESERVICES__
#include <CoreServices/CoreServices.h>
#endif // __CORESERVICES__
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
// ignoring events originating from the current process introduced in 10.6
extern FSEventStreamCreateFlags kFSEventStreamCreateFlagIgnoreSelf;
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
// file-level events introduced in 10.7
extern FSEventStreamCreateFlags kFSEventStreamCreateFlagFileEvents;
extern FSEventStreamEventFlags kFSEventStreamEventFlagItemCreated,
kFSEventStreamEventFlagItemRemoved,
kFSEventStreamEventFlagItemInodeMetaMod,
kFSEventStreamEventFlagItemRenamed,
kFSEventStreamEventFlagItemModified,
kFSEventStreamEventFlagItemFinderInfoMod,
kFSEventStreamEventFlagItemChangeOwner,
kFSEventStreamEventFlagItemXattrMod,
kFSEventStreamEventFlagItemIsFile,
kFSEventStreamEventFlagItemIsDir,
kFSEventStreamEventFlagItemIsSymlink;
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090
// marking, rather than ignoring, events originating from the current process introduced in 10.9
extern FSEventStreamCreateFlags kFSEventStreamCreateFlagMarkSelf;
extern FSEventStreamEventFlags kFSEventStreamEventFlagOwnEvent;
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1010
extern FSEventStreamEventFlags kFSEventStreamEventFlagItemIsHardlink,
kFSEventStreamEventFlagItemIsLastHardlink;
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1013
extern FSEventStreamEventFlags kFSEventStreamEventFlagItemCloned;
#endif
#endif // fsevent_watch_compat_h