summaryrefslogtreecommitdiff
path: root/src/errors.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2010-12-23 09:22:15 +0100
committernulltoken <emeric.fermas@gmail.com>2010-12-23 09:22:15 +0100
commit98e3b298955557ae10d6682ea33eb8ba8a5447a5 (patch)
tree930944b565777406a48c9243e544b2110fcc3c80 /src/errors.c
parent2c08c3f0742d812bd3790c2541af87634fbb3ab4 (diff)
parent51035184ddcc7f5a4437f57e04474b4bb98d8a49 (diff)
downloadlibgit2-98e3b298955557ae10d6682ea33eb8ba8a5447a5.tar.gz
Merge branch 'master' into repo-init
Diffstat (limited to 'src/errors.c')
-rw-r--r--src/errors.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/errors.c b/src/errors.c
index ac73402ee..df8b82200 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -1,34 +1,6 @@
#include "common.h"
#include "thread-utils.h" /* for GIT_TLS */
-#if defined(GIT_TLS)
-/* compile-time constant initialization required */
-GIT_TLS int git_errno = 0;
-
-#elif defined(GIT_HAS_PTHREAD)
-
-static pthread_key_t errno_key;
-
-static void init_errno(void) __attribute__((constructor));
-static void init_errno(void)
-{
- pthread_key_create(&errno_key, free);
-}
-
-int *git__errno_storage(void)
-{
- int *e = pthread_getspecific(errno_key);
- if (!e) {
-#undef calloc
- e = calloc(1, sizeof(*e));
-#define calloc(a,b) GIT__FORBID_MALLOC
- pthread_setspecific(errno_key, e);
- }
- return e;
-}
-
-#endif
-
static struct {
int num;
const char *str;