summaryrefslogtreecommitdiff
path: root/src/git2/errors.h
blob: f4720bebec5dc85fe30a74f0931507b0d56f1346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef INCLUDE_git_errors_h__
#define INCLUDE_git_errors_h__

/**
 * @file git/errors.h
 * @brief Git error handling routines and variables
 * @ingroup Git
 * @{
 */
GIT_BEGIN_DECL

/** The git errno. */
#if defined(GIT_TLS)
GIT_EXTERN_TLS(int) git_errno;

#elif defined(GIT_HAS_PTHREAD)
# define git_errno (*git__errno_storage())
GIT_EXTERN(int *) git__errno_storage(void);

#endif

/**
 * strerror() for the Git library
 * @param num The error code to explain
 * @return a string explaining the error code
 */
GIT_EXTERN(const char *) git_strerror(int num);

/** @} */
GIT_END_DECL
#endif