]>
git.saurik.com Git - apple/security.git/blob - codesign_wrapper/MISBase.h
4 /* Define the decoration we use to indicate public functions */
6 #define MIS_EXPORT extern __attribute__((visibility ("default")))
11 /* Define ssize_t if needed */
12 #if defined(__WIN32__)
16 /* Maximum path length */
17 #if !defined(MAXPATHLEN)
18 #if defined(__WIN32__)
20 * On windows, we handle paths up to length MAX_PATH. However,
21 * we convert paths into UTF8 in a number of places and since
22 * each character in the path can map to up to 4 bytes in UTF8,
23 * we need to account for that.
25 #define MAXPATHLEN (MAX_PATH * 4)
27 #define MAXPATHLEN 1024
32 * The crazy CF situation on Windows requires this macro so we can build
33 * against either version
34 * The version of CF used by iTunes uses the system encoding as the file
35 * encoding. However we need paths to be UTF8 when we pass them into
36 * various file system APIs so we use CFStringGetCString instead. I'm
37 * told that the other CF does return UTF8 so if iTunes ever moves to
38 * that we can switch back to CFStringGetFileSystemRepresentation (5513199)
40 #if defined(__WIN32__)
41 #define CFStringGetFileSystemRepresentation(str, buf, len) CFStringGetCString(str, buf, len, kCFStringEncodingUTF8)