summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt116
-rw-r--r--README.md163
-rw-r--r--msvc/libgit2_shared.vcxproj134
-rw-r--r--msvc/libgit2_shared.vcxproj.filters168
-rw-r--r--msvc/libgit2_shared_2010.sln20
-rw-r--r--tests/test_main.c4
6 files changed, 158 insertions, 447 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..2ef6bfbec
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,116 @@
+# CMake build script for the libgit2 project
+#
+# Building (out of source build):
+# > mkdir build && cd build
+# > cmake .. [-DSETTINGS=VALUE]
+# > cmake --build .
+#
+# Testing:
+# > ctest -V
+#
+# Install:
+# > cmake --build . --target install
+
+PROJECT(libgit2 C)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+# Find required dependencies
+FIND_PACKAGE(ZLIB REQUIRED)
+INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR} src)
+
+# Try finding openssl
+FIND_PACKAGE(OpenSSL)
+IF (OPENSSL_CRYPTO_LIBRARIES)
+ SET(SHA1_TYPE "openssl" CACHE STRING "Which SHA1 implementation to use: builtin, ppc, openssl")
+ELSEIF ()
+ SET(SHA1_TYPE "builtin" CACHE STRING "Which SHA1 implementation to use: builtin, ppc")
+ENDIF ()
+
+# Installation paths
+SET(INSTALL_BIN bin CACHE PATH "Where to install binaries to.")
+SET(INSTALL_LIB lib CACHE PATH "Where to install libraries to.")
+SET(INSTALL_INC include CACHE PATH "Where to install headers to.")
+
+# Build options
+OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
+OPTION (BUILD_TESTS "Build Tests" ON)
+OPTION (BACKTRACE "Use GCC backtrace in tests (Not available on Cygwin/MinGW)" OFF)
+
+# Build Release by default
+IF (NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
+ENDIF ()
+
+# Collect sourcefiles
+FILE(GLOB SRC src/*.c)
+FILE(GLOB SRC_SHA1 src/block-sha1/*.c)
+FILE(GLOB SRC_PLAT src/unix/*.c)
+FILE(GLOB SRC_H src/git/*.h)
+
+# On Windows use specific platform sources
+IF (WIN32 AND NOT CYGWIN)
+ ADD_DEFINITIONS(-DWIN32 -D_DEBUG -D_LIB -DZLIB_WINAPI)
+ FILE(GLOB SRC_PLAT src/win32/*.c)
+ IF (MINGW)
+ SET(PTHREAD_LIBRARY pthread)
+ ENDIF ()
+ENDIF ()
+
+# When desired build with backtrace
+IF (BACKTRACE)
+ ADD_DEFINITIONS(-DBACKTRACE)
+ENDIF ()
+
+# Specify sha1 implementation
+IF (SHA1_TYPE STREQUAL "ppc")
+ ADD_DEFINITIONS(-DPPC_SHA1)
+ FILE(GLOB SRC_SHA1 src/ppc/*.c)
+ELSEIF (SHA1_TYPE STREQUAL "openssl")
+ ADD_DEFINITIONS(-DOPENSSL_SHA1)
+ SET (SRC_SHA1)
+ INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
+ SET (LIB_SHA1 ${OPENSSL_CRYPTO_LIBRARIES})
+ENDIF ()
+
+# Compile and link libgit2
+ADD_LIBRARY(git2 ${SRC} ${SRC_PLAT} ${SRC_SHA1})
+TARGET_LINK_LIBRARIES(git2 ${ZLIB_LIBRARY} ${LIB_SHA1} ${PTHREAD_LIBRARY})
+
+# Install
+INSTALL(TARGETS git2
+ RUNTIME DESTINATION ${INSTALL_BIN}
+ LIBRARY DESTINATION ${INSTALL_LIB}
+ ARCHIVE DESTINATION ${INSTALL_LIB}
+)
+INSTALL(DIRECTORY src/git2 DESTINATION ${INSTALL_INC} )
+INSTALL(FILES src/git2.h DESTINATION ${INSTALL_INC} )
+
+# Tests
+IF (BUILD_TESTS)
+ SET(TEST_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources" CACHE PATH "Path to test resources.")
+ ADD_DEFINITIONS(-DTEST_RESOURCES=\"${TEST_RESOURCES}\")
+
+ ENABLE_TESTING()
+ # Find and build all tests
+ INCLUDE_DIRECTORIES(tests)
+ FILE (GLOB TESTS tests/t????-*.c)
+
+ FOREACH (TEST_SRC ${TESTS})
+ # Match the source to get test name
+ STRING(REGEX MATCH "(t....-.*).c$" TEST_NAME ${TEST_SRC})
+ SET(TEST_NAME ${CMAKE_MATCH_1}) # This is the actual matched variable, got to love CMake macro language
+
+ # Generate TOC by finding BEGIN_TEST entries in test source.
+ FILE(READ ${TEST_SRC} TEST_CODE)
+ STRING(REGEX MATCHALL "BEGIN_TEST\\([^\\)]*\\)\n" TEST_TOC ${TEST_CODE})
+ FILE(WRITE tests/${TEST_NAME}.toc ${TEST_TOC}) # If desired this might be moved to the build dir
+
+ # Compile
+ ADD_EXECUTABLE(${TEST_NAME} tests/test_main.c tests/test_lib.c tests/test_helpers.c ${TEST_SRC})
+ TARGET_LINK_LIBRARIES(${TEST_NAME} git2)
+ SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES COMPILE_DEFINITIONS TEST_TOC=\"${TEST_NAME}.toc\")
+
+ # Add CTest
+ ADD_TEST(${TEST_NAME} ${TEST_NAME})
+ ENDFOREACH ()
+ENDIF ()
diff --git a/README.md b/README.md
index 0ce9066d1..5ead27ce8 100644
--- a/README.md
+++ b/README.md
@@ -5,22 +5,9 @@ libgit2 is a portable, pure C implementation of the Git core methods provided as
re-entrant linkable library with a solid API, allowing you to write native
speed custom Git applications in any language with bindings.
-Why Do We Need It
-=======================
-
-In the current Git project, though a libgit.a file is produced it is
-not re-entrant (it will call <code>die()</code> on basically any error)
-and it has no stable or well-designed public API. As there is no good
-way to link to this effectively, a new library was needed that fulfilled
-these requirements. Thus libgit2.
-
-Though it would be nice to use the same library that Git itself uses,
-Git actually has a pretty simple storage format and just having native
-access to that is pretty useful. Eventually we would like to have most
-of the functionality of the core Git tools or even get the library
-integrated into Git itself, but in the meantime having a cleanly designed
-and maintained linkable Git library with a public API will likely be helpful
-to lots of people.
+* Website: <http://libgit2.github.com>
+* API documentation: <http://libgit2.github.com/libgit2/modules.html>
+* Usage guide: <http://libgit2.github.com/api.html>
What It Can Do
==================================
@@ -35,114 +22,43 @@ libgit2 is already very usable.
* tree traversal
* basic index file (staging area) operations
-Building libgit2 - Unix systems
-==================================
-
-In Unix-like systems, like Linux, xBSD and Mac OS X, libgit2 has
-the following dependencies:
+Building libgit2 - External dependencies
+========================================
-* Python 2.5-3.1 <http://www.python.org>
-
-Used to run the build system; no extra libraries required.
-Should probably ship installed with your OS.
+The following libraries are required to manually build the libgit2 library:
* zlib 1.2+ <http://www.zlib.net/>
-* LibSSL <http://www.openssl.org/>
-
-Only needed if you want to re-use OpenSSL's SHA1 routines; libgit2 compiles its own routines by default.
-
-To build it, first configure the build system by running:
-
- $ ./waf configure
-
-Then build the library, either in its shared (libgit2.so) or static form (libgit2.a)
-
- $ ./waf build-static
- $ ./waf build-shared
-
-You can then test the library with:
-
- $ ./waf test
-
-And finally you can install it with (you may need to sudo):
-
- $ ./waf install
-
-Building libgit2 - Windows MSVC++
-==================================
-
-When building under Windows using the MSVC compiler, libgit2 has
-the following dependencies:
-
-* Python 2.5-3.1 <http://www.python.org>
-
-Used to run the build system; no extra libraries required.
-
-* zlib 1.2+ (Windows API Version) <http://www.zlib.net/>
-
-Make sure you compile the ZLib library using the MSVC solution that ships in its source distribution.
+When building in Windows using MSVC, make sure you compile ZLib using the MSVC solution that ships in its source distribution.
Alternatively, you may download precompiled binaries from: <http://www.winimage.com/zLibDll/>
-* LibSSL <http://www.openssl.org/>
-
-Only needed if you want to re-use OpenSSL's SHA1 routines; libgit2 compiles its own routines by default.
-
-To build it, first configure the build system by running:
-
- $ ./waf configure
-
-Then build the library, either in its shared (libgit2.dll) or static form (libgit2.lib)
-
- $ ./waf build-static
- $ ./waf build-shared
-
-You can then test the library with:
-
- $ ./waf test
-
-Lastly, you can manually install the generated *.lib and *.dll files, depending on your preferences.
-
-Building libgit2 - Windows MinGW
-==================================
-
-When building under Windows using the GCC compiler that ships with MinGW, libgit2 has the following dependencies:
-
-* Python 2.5-3.1 <http://www.python.org>
+* LibSSL **(optional)** <http://www.openssl.org/>
-Used to run the build system; no extra libraries required.
+libgit2 can be built using the SHA1 implementation of LibSSL-Crypto, instead of the built-in custom implementations. Performance wise, they are quite similar.
-* zlib 1.2+ <http://www.zlib.net/>
-
-* pthreads-w32 <http://sourceware.org/pthreads-win32/>
+* pthreads-w32 **(required on MinGW)** <http://sourceware.org/pthreads-win32/>
-Or an equivalent pthreads implementation for non-POSIX systems
-
-* LibSSL <http://www.openssl.org/>
+Building libgit2 - Using waf
+======================
-Only needed if you want to re-use OpenSSL's SHA1 routines; libgit2 compiles its own routines by default.
+Waf is a minimalist build system which only requires a Python 2.5+ interpreter to run. This is the default build system for libgit2.
-To build it, first configure the build system and force GCC as the compiler,
-instead of the default MSVC:
+To build libgit2 using waf, first configure the build system by running:
- $ ./waf configure --check-c-compiler=gcc
+ $ ./waf configure
-Then build the library, either in its shared (libgit2.so) or static form (libgit2.a)
+Then build the library, either in its shared (libgit2.so) or static form (libgit2.a):
$ ./waf build-static
$ ./waf build-shared
-You can then test the library with:
+You can then run the full test suite with:
$ ./waf test
-And finally you can install it with:
-
- $ ./waf install
+And finally you can install the library with (you may need to sudo):
-
-Configuration settings
-==================================
+ $ sudo ./waf install
The waf build system for libgit2 accepts the following flags:
@@ -165,36 +81,37 @@ The waf build system for libgit2 accepts the following flags:
You can run `./waf --help` to see a full list of install options and
targets.
-Language Bindings
-==================================
-So you want to use Git from your favorite programming language. Here are
-the bindings to libgit2 that are currently available:
+Building libgit2 - Using CMake
+==============================
-Ruby
---------------------
+The libgit2 library can also be built using CMake 2.6+ (<http://www.cmake.org>) on all platforms.
-Rugged is the reference library used to make sure the
-libgit2 API is sane. This should be mostly up to date.
+On most systems you can build the library using the following commands
-<https://github.com/libgit2/rugged>
+ $ mkdir build && cd build
+ $ cmake ..
+ $ cmake --build .
+Alternatively you can point the CMake GUI tool to the CMakeLists.txt file and generate platform specific build project or IDE workspace.
-Python
---------------------
+To install the library you can specify the install prefix by setting:
-Pygit2 is a Python binding to libgit2.
+ $ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix
+ $ cmake --build . --target install
-<https://github.com/libgit2/pygit2>
+For more advanced use or questions about CMake please read <http://www.cmake.org/Wiki/CMake_FAQ>.
-Erlang
---------------------
-Geef is an example of an Erlang NIF binding to libgit2. A bit out of
-date, but basically works. Best as a proof of concept of what you could
-do with Erlang and NIFs with libgit2.
+Language Bindings
+==================================
+
+Here are the bindings to libgit2 that are currently available:
-<https://github.com/schacon/geef>
+* Rugged (Ruby bindings) <https://github.com/libgit2/rugged>
+* pygit2 (Python bindings) <https://github.com/libgit2/pygit2>
+* libgit2sharp (.NET bindings) <https://github.com/nulltoken/libgit2sharp>
+* Geef (Erlang bindings) <https://github.com/schacon/geef>
If you start another language binding to libgit2, please let us know so
we can add it to the list.
@@ -213,7 +130,7 @@ libgit2@librelist.com
License
==================================
-libgit2 is under GPL2 with linking exemption, which basically means you
+libgit2 is under GPL2 **with linking exemption**. This means you
can link to the library with any program, commercial, open source or
other. However, you cannot modify libgit2 and distribute it without
supplying the source.
diff --git a/msvc/libgit2_shared.vcxproj b/msvc/libgit2_shared.vcxproj
deleted file mode 100644
index e284bc184..000000000
--- a/msvc/libgit2_shared.vcxproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\src\blob.c" />
- <ClCompile Include="..\src\block-sha1\sha1.c" />
- <ClCompile Include="..\src\commit.c" />
- <ClCompile Include="..\src\delta-apply.c" />
- <ClCompile Include="..\src\errors.c" />
- <ClCompile Include="..\src\filelock.c" />
- <ClCompile Include="..\src\fileops.c" />
- <ClCompile Include="..\src\hash.c" />
- <ClCompile Include="..\src\hashtable.c" />
- <ClCompile Include="..\src\index.c" />
- <ClCompile Include="..\src\odb.c" />
- <ClCompile Include="..\src\oid.c" />
- <ClCompile Include="..\src\person.c" />
- <ClCompile Include="..\src\repository.c" />
- <ClCompile Include="..\src\revwalk.c" />
- <ClCompile Include="..\src\tag.c" />
- <ClCompile Include="..\src\thread-utils.c" />
- <ClCompile Include="..\src\tree.c" />
- <ClCompile Include="..\src\util.c" />
- <ClCompile Include="..\src\vector.c" />
- <ClCompile Include="..\src\win32\dir.c" />
- <ClCompile Include="..\src\win32\fileops.c">
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)\fileops_w32</ObjectFileName>
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)\fileops_w32</ObjectFileName>
- </ClCompile>
- <ClCompile Include="..\src\win32\map.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\src\blob.h" />
- <ClInclude Include="..\src\block-sha1\sha1.h" />
- <ClInclude Include="..\src\bswap.h" />
- <ClInclude Include="..\src\cc-compat.h" />
- <ClInclude Include="..\src\commit.h" />
- <ClInclude Include="..\src\common.h" />
- <ClInclude Include="..\src\delta-apply.h" />
- <ClInclude Include="..\src\dir.h" />
- <ClInclude Include="..\src\errors.h" />
- <ClInclude Include="..\src\filelock.h" />
- <ClInclude Include="..\src\fileops.h" />
- <ClInclude Include="..\src\hash.h" />
- <ClInclude Include="..\src\hashtable.h" />
- <ClInclude Include="..\src\index.h" />
- <ClInclude Include="..\src\map.h" />
- <ClInclude Include="..\src\mingw-compat.h" />
- <ClInclude Include="..\src\msvc-compat.h" />
- <ClInclude Include="..\src\odb.h" />
- <ClInclude Include="..\src\person.h" />
- <ClInclude Include="..\src\repository.h" />
- <ClInclude Include="..\src\revwalk.h" />
- <ClInclude Include="..\src\tag.h" />
- <ClInclude Include="..\src\thread-utils.h" />
- <ClInclude Include="..\src\tree.h" />
- <ClInclude Include="..\src\util.h" />
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <IncludePath>..\src;$(IncludePath)</IncludePath>
- <TargetName>libgit2</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <TargetName>libgit2</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGIT2_EXPORTS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <TargetMachine>MachineX86</TargetMachine>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <AdditionalDependencies>zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGIT2_EXPORTS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <TargetMachine>MachineX86</TargetMachine>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/msvc/libgit2_shared.vcxproj.filters b/msvc/libgit2_shared.vcxproj.filters
deleted file mode 100644
index db07b75d9..000000000
--- a/msvc/libgit2_shared.vcxproj.filters
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
- </Filter>
- <Filter Include="Source Files\win32">
- <UniqueIdentifier>{ed3143d9-b893-48a3-8615-fe090c1cbf25}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\src\blob.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\block-sha1\sha1.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\commit.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\delta-apply.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\errors.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\filelock.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\fileops.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\hash.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\hashtable.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\index.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\odb.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\oid.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\person.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\repository.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\revwalk.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\tag.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\thread-utils.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\tree.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\util.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\vector.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\win32\dir.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\win32\fileops.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\src\win32\map.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\src\blob.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\block-sha1\sha1.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\bswap.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\cc-compat.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\commit.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\common.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\delta-apply.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\dir.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\errors.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\filelock.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\fileops.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\hash.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\hashtable.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\index.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\map.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\mingw-compat.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\msvc-compat.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\odb.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\person.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\repository.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\revwalk.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\tag.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\thread-utils.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\tree.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\src\util.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/msvc/libgit2_shared_2010.sln b/msvc/libgit2_shared_2010.sln
deleted file mode 100644
index 3ad970313..000000000
--- a/msvc/libgit2_shared_2010.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgit2_shared", "libgit2_shared.vcxproj", "{628B5A30-A7D1-B216-C57D-F8F9D5BA019C}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {628B5A30-A7D1-B216-C57D-F8F9D5BA019C}.Debug|Win32.ActiveCfg = Debug|Win32
- {628B5A30-A7D1-B216-C57D-F8F9D5BA019C}.Debug|Win32.Build.0 = Debug|Win32
- {628B5A30-A7D1-B216-C57D-F8F9D5BA019C}.Release|Win32.ActiveCfg = Release|Win32
- {628B5A30-A7D1-B216-C57D-F8F9D5BA019C}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/tests/test_main.c b/tests/test_main.c
index 35bcdd76c..a3672c70d 100644
--- a/tests/test_main.c
+++ b/tests/test_main.c
@@ -31,7 +31,7 @@
* print backtrace when a test fails;
* GCC only
*/
-#ifdef __GNUC__
+#ifdef BACKTRACE
#include <stdio.h>
#include <execinfo.h>
#include <signal.h>
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
{
struct test_def *t;
-#ifdef __GNUC__
+#ifdef BACKTRACE
signal(SIGSEGV, crash_handler);
#endif