1. 17 Jan, 2019 2 commits
  2. 17 Jul, 2018 1 commit
  3. 13 Jul, 2018 3 commits
    • cmake: enforce C90 standard · e1a4a8eb
      While the aim of libgit2 was to conform to C90 code, we never instructed
      the compiler to enforce C90 compliance. Thus, quite a few violations
      were able to get into our code base, which have been removed with the
      previous commits. As we are now able to build libgit2 with C90 enforced,
      we can set the C_STANDARD property for our own build targets.
      
      Note that we explicitly avoid setting the C standard for our third-party
      dependencies. At least the zlib target does not build with C90 enforced,
      and we do not want to fix them by deviating from upstream. Thus we
      simply enforce no standard for them.
      Patrick Steinhardt committed
    • cmake: distinguish internal and system include directories · c13e56f9
      While we want to enforce strict C90 mode, this may cause issues with
      system provided header files which are themselves not strictly
      conforming. E.g. if a system header has C++ style comments, a compiler
      in strict C90 mode would produce an error and abort the build. As the
      user most likely doesn't want to change the system header, this would
      completely break the build on such systems. One example of this is
      mbedtls, which provides such header files.
      
      The problem can be worked around by distinguishing between
      system-provided and project-provided include directories. When adding
      include directories via "-isystem" instead of "-I", the compiler will
      skip certain checks and print out less warnings. To use system includes,
      we can simply add the "SYSTEM" flag to CMake's `INCLUDE_DIRECTORIES` and
      `TARGET_INCLUDE_DIRECTORIES` functions. Note that we have to split the
      include directories into two variables because of this, as we definitely
      still want to check for all warnings produced by our own header files.
      Patrick Steinhardt committed
    • treewide: remove use of C++ style comments · 9994cd3f
      C++ style comment ("//") are not specified by the ISO C90 standard and
      thus do not conform to it. While libgit2 aims to conform to C90, we did
      not enforce it until now, which is why quite a lot of these
      non-conforming comments have snuck into our codebase. Do a tree-wide
      conversion of all C++ style comments to the supported C style comments
      to allow us enforcing strict C90 compliance in a later commit.
      Patrick Steinhardt committed
  4. 07 Jul, 2018 3 commits
  5. 22 Jun, 2018 1 commit
  6. 10 Jun, 2018 1 commit
  7. 09 May, 2018 1 commit
    • cmake: remove now-useless LIBGIT2_LIBDIRS handling · 8ab470f5
      With the recent change of always resolving pkg-config libraries to their
      full path, we do not have to manage the LIBGIT2_LIBDIRS variable
      anymore. The only other remaining user of LIBGIT2_LIBDIRS is winhttp,
      which is a CMake-style library target and can thus be resolved by CMake
      automatically.
      
      Remove the variable to simplify our build system a bit.
      Patrick Steinhardt committed
  8. 02 May, 2018 1 commit
  9. 27 Mar, 2018 12 commits
  10. 25 Jan, 2018 10 commits
  11. 06 Nov, 2017 1 commit
    • examples: network: fix Win32 linking errors due to getline · bf15dbf6
      The getline(3) function call is not part of ISO C and, most importantly,
      it is not implemented on Microsoft Windows platforms. As our networking
      example code makes use of getline, this breaks builds on MSVC and MinGW.
      As this code wasn't built prior to the previous commit, this was never
      noticed.
      
      Fix the error by instead implementing a `readline` function, which
      simply reads the password from stdin until it reads a newline
      character.
      Patrick Steinhardt committed
  12. 20 Oct, 2017 1 commit
    • examples: remove Makefile · 9b12eb6f
      Back in the days when libgit2 was still young, libgit2 was using plain
      Makefiles as build infrastructure. We later changed that to instead use
      the CMake build system to make cross-platform development easier. In the
      process, we forgot to remove the Makefile from our examples directory,
      which is fixed by this commit here. Furthermore, remove the accompanying
      .gitignore file, which ignores build outputs. As we do out-of-tree
      builds only nowadays, no output is generated in that directory anymore.
      Patrick Steinhardt committed
  13. 13 Oct, 2017 1 commit
  14. 12 Oct, 2017 1 commit
  15. 07 Oct, 2017 1 commit