summaryrefslogtreecommitdiff
path: root/src/errors.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove git_errnoVicent Marti2010-12-231-24/+0
| | | | | | | | | It was not being used by any methods (only by malloc and calloc), and since it needs to be TLS, it cannot be exported on DLLs on Windows. Burn it with fire. The API always returns error codes! Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Change the library include fileVicent Marti2010-12-061-1/+1
| | | | | | | | | | | | 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>
* Cleanup our header inclusion order to ensure pthread.h is earlyShawn O. Pearce2008-12-311-1/+0
| | | | | | | | 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>
* Set GIT_EOSERR when the OS errno should be consultedShawn O. Pearce2008-12-301-0/+5
| | | | | | | | This error code indicates the OS error code has a better value describing the last error, as it is likely a network or local file IO problem identified by a C library function call. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Cleanup formatting in our head files to be more consistentShawn O. Pearce2008-12-301-0/+2
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Change usages of static inline to GIT_INLINEJulio Espinoza-Sokal2008-12-301-2/+2
| | | | | Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Remove config.h and make fileops an internal APIAndreas Ericsson2008-12-021-0/+1
| | | | | | | | | | | | | | Since it doesn't make sense to make the disk access stuff portable *AND* public (that's a job for each application imo), we can take a shortcut and just support unixy stuff for now and get away with coding most of it as macros. Since we go with an internal API for starters and only provide higher-level API's to the libgit users, we'll be ok with this approach. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add an embryo of a TLS-aware error handling systemAndreas Ericsson2008-11-221-0/+17
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>