]>
Commit | Line | Data |
---|---|---|
76a8c447 AE |
1 | #ifndef INCLUDE_common_h__ |
2 | #define INCLUDE_common_h__ | |
3 | ||
0657e46d | 4 | #include "git2/common.h" |
44908fe7 | 5 | #include "git2/thread-utils.h" |
8a086f87 | 6 | #include "cc-compat.h" |
b3039bee | 7 | |
8a086f87 RJ |
8 | #ifdef GIT_HAVE_INTTYPES_H |
9 | # include <inttypes.h> | |
10 | #endif | |
75d58430 | 11 | #include <assert.h> |
76a8c447 | 12 | #include <errno.h> |
028ef0de | 13 | #include <limits.h> |
76a8c447 | 14 | #include <stdlib.h> |
840fb8b7 | 15 | #include <stdio.h> |
76a8c447 AE |
16 | #include <string.h> |
17 | ||
840fb8b7 | 18 | #include <sys/types.h> |
90d4d2f0 | 19 | #include <sys/stat.h> |
840fb8b7 RJ |
20 | |
21 | #ifdef GIT_WIN32 | |
22 | ||
23 | # include <io.h> | |
502acd16 | 24 | # include <direct.h> |
79ca2edc | 25 | # include <windows.h> |
678e9e04 VM |
26 | # include "win32/msvc-compat.h" |
27 | # include "win32/mingw-compat.h" | |
bb3de0c4 VM |
28 | # ifdef GIT_THREADS |
29 | # include "win32/pthread.h" | |
30 | #endif | |
79ca2edc | 31 | |
8a086f87 | 32 | # define snprintf _snprintf |
840fb8b7 | 33 | |
04e88240 RJ |
34 | typedef SSIZE_T ssize_t; |
35 | ||
840fb8b7 | 36 | #else |
840fb8b7 | 37 | # include <unistd.h> |
840fb8b7 | 38 | |
bb3de0c4 VM |
39 | # ifdef GIT_THREADS |
40 | # include <pthread.h> | |
41 | # endif | |
840fb8b7 RJ |
42 | #endif |
43 | ||
e52e38d3 | 44 | #include "git2/types.h" |
6810bf28 | 45 | #include "git2/errors.h" |
028ef0de | 46 | #include "thread-utils.h" |
5dddf7c8 | 47 | #include "bswap.h" |
5ee2fe77 | 48 | |
d7f0abab KS |
49 | extern void git___throw(const char *, ...) GIT_FORMAT_PRINTF(1, 2); |
50 | #define git__throw(error, ...) \ | |
51 | (git___throw(__VA_ARGS__), error) | |
52 | ||
53 | extern void git___rethrow(const char *, ...) GIT_FORMAT_PRINTF(1, 2); | |
54 | #define git__rethrow(error, ...) \ | |
55 | (git___rethrow(__VA_ARGS__), error) | |
02f9e637 | 56 | |
3f53c971 VM |
57 | #include "util.h" |
58 | ||
76a8c447 | 59 | #endif /* INCLUDE_common_h__ */ |