mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 15:10:02 +00:00

If we are using threads we need to make sure pthread.h comes in before just about anything else. Some platforms enable macros that alter what other headers define. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
25 lines
348 B
C
25 lines
348 B
C
#ifndef INCLUDE_errors_h__
|
|
#define INCLUDE_errors_h__
|
|
|
|
#include "git/errors.h"
|
|
|
|
/* convenience functions */
|
|
GIT_INLINE(int) git_int_error(int code)
|
|
{
|
|
git_errno = code;
|
|
return code;
|
|
}
|
|
|
|
GIT_INLINE(int) git_os_error(void)
|
|
{
|
|
return git_int_error(GIT_EOSERR);
|
|
}
|
|
|
|
GIT_INLINE(void) *git_ptr_error(int code)
|
|
{
|
|
git_errno = code;
|
|
return NULL;
|
|
}
|
|
|
|
#endif
|