]>
git.proxmox.com Git - libgit2.git/blob - src/common.h
2 * Copyright (C) 2009-2011 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_common_h__
8 #define INCLUDE_common_h__
10 #include "git2/common.h"
11 #include "git2/thread-utils.h"
12 #include "cc-compat.h"
14 #ifdef GIT_HAVE_INTTYPES_H
15 # include <inttypes.h>
24 #include <sys/types.h>
32 # include "win32/msvc-compat.h"
33 # include "win32/mingw-compat.h"
35 # include "win32/pthread.h"
38 # define snprintf _snprintf
40 #ifndef _SSIZE_T_DEFINED
41 typedef SSIZE_T ssize_t
;
52 #include "git2/types.h"
53 #include "git2/errors.h"
54 #include "thread-utils.h"
57 extern void git___throw(const char *, ...) GIT_FORMAT_PRINTF(1, 2);
58 #define git__throw(error, ...) \
59 (git___throw(__VA_ARGS__), error)
61 extern void git___rethrow(const char *, ...) GIT_FORMAT_PRINTF(1, 2);
62 #define git__rethrow(error, ...) \
63 (git___rethrow(__VA_ARGS__), error)
67 #endif /* INCLUDE_common_h__ */