]>
Commit | Line | Data |
---|---|---|
ae234862 AE |
1 | #ifndef INCLUDE_git_errors_h__ |
2 | #define INCLUDE_git_errors_h__ | |
b3039bee | 3 | |
ae234862 AE |
4 | /** |
5 | * @file git/errors.h | |
6 | * @brief Git error handling routines and variables | |
7 | * @ingroup Git | |
8 | * @{ | |
9 | */ | |
ae234862 AE |
10 | GIT_BEGIN_DECL |
11 | ||
12 | /** The git errno. */ | |
a1d34bc0 | 13 | #if defined(GIT_TLS) |
e3fe32b6 | 14 | GIT_EXTERN_TLS(int) git_errno; |
ae234862 | 15 | |
a1d34bc0 SP |
16 | #elif defined(GIT_HAS_PTHREAD) |
17 | # define git_errno (*git__errno_storage()) | |
18 | GIT_EXTERN(int *) git__errno_storage(void); | |
19 | ||
20 | #endif | |
21 | ||
ae234862 AE |
22 | /** |
23 | * strerror() for the Git library | |
24 | * @param num The error code to explain | |
25 | * @return a string explaining the error code | |
26 | */ | |
27 | GIT_EXTERN(const char *) git_strerror(int num); | |
b3039bee | 28 | |
ae234862 AE |
29 | /** @} */ |
30 | GIT_END_DECL | |
31 | #endif |