Fixed memory leaks in test suite
[libgit2.git] / src / common.h
blobff87c872c7846c5725ec711b6d2005febab7d6be
1 #ifndef INCLUDE_common_h__
2 #define INCLUDE_common_h__
4 /** Force 64 bit off_t size on POSIX. */
5 #define _FILE_OFFSET_BITS 64
7 #if defined(_WIN32) && !defined(__CYGWIN__)
8 #define GIT_WIN32 1
9 #endif
11 #include "git/thread-utils.h"
12 #include "cc-compat.h"
14 #ifdef GIT_HAS_PTHREAD
15 # include <pthread.h>
16 #endif
17 #ifdef GIT_HAVE_INTTYPES_H
18 # include <inttypes.h>
19 #endif
20 #include <assert.h>
21 #include <errno.h>
22 #include <limits.h>
23 #include <stdlib.h>
24 #include <stdio.h>
25 #include <string.h>
27 #include <sys/types.h>
28 #include <sys/stat.h>
30 #ifdef GIT_WIN32
32 # include <io.h>
33 # include <direct.h>
34 # include <windows.h>
35 # include "msvc-compat.h"
36 # include "mingw-compat.h"
38 # define snprintf _snprintf
40 typedef SSIZE_T ssize_t;
42 #else
44 # include <unistd.h>
45 # include <arpa/inet.h>
47 #endif
49 #include "git/common.h"
50 #include "util.h"
51 #include "thread-utils.h"
52 #include "errors.h"
53 #include "bswap.h"
55 #define GIT_PATH_MAX 4096
57 #endif /* INCLUDE_common_h__ */