summaryrefslogtreecommitdiff
path: root/src/git/errors.h
Commit message (Collapse)AuthorAgeFilesLines
* Change the library include fileVicent Marti2010-12-061-31/+0
| | | | | | | | | | | | Libgit2 is now officially include as #include "<git2.h>" or indidividual files may be included as #include <git2/index.h> Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Change include structure for the projectVicent Marti2010-12-061-2/+0
| | | | | | | | | | | The maze with include dependencies has been fixed. There is now a global include: #include <git.h> The git_odb_backend API has been exposed. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix "'__thread' not at start of declaration" warnings (-Wextra)Ramsay Jones2010-01-201-2/+1
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Support building on Mac OS X by using pthread_getspecific for TLSShawn O. Pearce2008-12-301-0/+7
| | | | | | | | | | | | | | | | | | The Mach-O format does not permit gcc to implement the __thread TLS specification, so we must instead emulate it using a single int cell allocated from memory and stored inside of the thread specific data associated with the current pthread. What makes this tricky is git_errno must be a valid lvalue, so we really need to return a pointer to the caller and deference it as part of the git_errno macro. The GCC-specific __attribute__((constructor)) extension is used to ensure the pthread_key_t is allocated before any Git functions are executed in the library, as this is necessary to access our thread specific storage. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Cleanup formatting in our head files to be more consistentShawn O. Pearce2008-12-301-3/+5
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add an embryo of a TLS-aware error handling systemAndreas Ericsson2008-11-221-0/+25
This adds the per-thread global variable git_errno to the system, which callers can examine to get information about an error. Two helper functions are added to reduce LoC-count for the library code itself. Also, some exceptions are made for running sparse on GIT_TLS definitions, since it doesn't grok thread-local variables at all. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>