]>
Commit | Line | Data |
---|---|---|
a15c550d | 1 | /* |
359fc2d2 | 2 | * Copyright (C) the libgit2 contributors. All rights reserved. |
a15c550d VM |
3 | * |
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. | |
6 | */ | |
7 | #ifndef INCLUDE_global_h__ | |
8 | #define INCLUDE_global_h__ | |
9 | ||
3b2cb2c9 | 10 | #include "common.h" |
eae0bfdc | 11 | |
a15c550d | 12 | #include "mwindow.h" |
d6fb0924 | 13 | #include "hash.h" |
a15c550d VM |
14 | |
15 | typedef struct { | |
1a481123 VM |
16 | git_error *last_error; |
17 | git_error error_t; | |
f85fc367 | 18 | git_buf error_buf; |
3b2cb2c9 | 19 | char oid_fmt[GIT_OID_HEXSZ+1]; |
82f15896 ET |
20 | |
21 | /* On Windows, this is the current child thread that was started by | |
22 | * `git_thread_create`. This is used to set the thread's exit code | |
23 | * when terminated by `git_thread_exit`. It is unused on POSIX. | |
24 | */ | |
25 | git_thread *current_thread; | |
a15c550d VM |
26 | } git_global_st; |
27 | ||
28 | git_global_st *git__global_state(void); | |
29 | ||
8cef828d CMN |
30 | extern git_mutex git__mwindow_mutex; |
31 | ||
a15c550d VM |
32 | #define GIT_GLOBAL (git__global_state()) |
33 | ||
a3aa5f4d RB |
34 | typedef void (*git_global_shutdown_fn)(void); |
35 | ||
36 | extern void git__on_shutdown(git_global_shutdown_fn callback); | |
37 | ||
de870533 | 38 | extern const char *git_libgit2__user_agent(void); |
fa72d6da | 39 | extern const char *git_libgit2__ssl_ciphers(void); |
de870533 | 40 | |
a15c550d | 41 | #endif |