]> git.proxmox.com Git - libgit2.git/blob - src/common.h
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
[libgit2.git] / src / common.h
1 #ifndef INCLUDE_common_h__
2 #define INCLUDE_common_h__
3
4 #include "git2/common.h"
5
6 /** Force 64 bit off_t size on POSIX. */
7 #define _FILE_OFFSET_BITS 64
8
9 #include "git2/thread-utils.h"
10 #include "cc-compat.h"
11
12 #ifdef GIT_HAVE_INTTYPES_H
13 # include <inttypes.h>
14 #endif
15 #include <assert.h>
16 #include <errno.h>
17 #include <limits.h>
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include <string.h>
21
22 #include <sys/types.h>
23 #include <sys/stat.h>
24
25 #ifdef GIT_WIN32
26
27 # include <io.h>
28 # include <direct.h>
29 # include <windows.h>
30 # include "msvc-compat.h"
31 # include "mingw-compat.h"
32 # ifdef GIT_THREADS
33 # include "win32/pthread.h"
34 #endif
35
36 # define snprintf _snprintf
37
38 typedef SSIZE_T ssize_t;
39
40 #else
41 # include <unistd.h>
42 # include <arpa/inet.h>
43
44 # ifdef GIT_THREADS
45 # include <pthread.h>
46 # endif
47 #endif
48
49 #include "git2/types.h"
50 #include "git2/errors.h"
51 #include "thread-utils.h"
52 #include "bswap.h"
53
54 extern int git__throw(int error, const char *, ...) GIT_FORMAT_PRINTF(2, 3);
55 extern int git__rethrow(int error, const char *, ...) GIT_FORMAT_PRINTF(2, 3);
56
57 #include "util.h"
58
59 #endif /* INCLUDE_common_h__ */