Go to file
Shawn O. Pearce a1d34bc000 Support building on Mac OS X by using pthread_getspecific for TLS
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>
2008-12-30 21:56:11 -08:00
src Support building on Mac OS X by using pthread_getspecific for TLS 2008-12-30 21:56:11 -08:00
tests Support building on Mac OS X by using pthread_getspecific for TLS 2008-12-30 21:56:11 -08:00
.gitignore Add pkg-config support. 2008-12-30 07:31:03 -08:00
.HEADER Switch the license from BSD to GPL+libgcc exception 2008-11-01 15:55:47 -07:00
api.doxygen doxygen config: Update path to public headers 2008-12-02 08:45:03 -08:00
CONVENTIONS Move include files to include/git/, drop git_ prefix from file names 2008-11-01 15:42:23 -07:00
COPYING Switch the license from BSD to GPL+libgcc exception 2008-11-01 15:55:47 -07:00
git.git-authors Add Adam Simpkins to list of consenting authors 2008-12-09 08:36:10 -08:00
libgit2.pc.in Fix pkgconfig file wrt last added dependencies 2008-12-30 16:50:45 -08:00
Makefile Add some routines for SHA1 hash computation 2008-12-30 07:48:10 -08:00