|
e9102def
|
2019-06-27T11:38:04
|
|
Merge pull request #4438 from pks-t/pks/hash-algorithm
Multiple hash algorithms
|
|
fda20622
|
2019-06-14T14:22:19
|
|
hash: move SHA1 implementations into 'sha1/' folder
As we will include additional hash algorithms in the future due
to upstream git discussing a move away from SHA1, we should
accomodate for that and prepare for the move. As a first step,
move all SHA1 implementations into a common subdirectory.
Also, create a SHA1-specific header file that lives inside the
hash folder. This header will contain the SHA1-specific header
includes, function declarations and the SHA1 context structure.
|
|
cc9e47c9
|
2019-06-15T18:51:40
|
|
win32: support upgrading warnings to errors (/WX)
For MSVC, support warnings as errors by providing the /WX compiler
flags. (/WX is the moral equivalent of -Werror.)
Disable warnings as errors ass part of xdiff, since it contains
warnings. But as a component of git itself, we want to avoid skew and
keep our implementation as similar as possible to theirs. We'll work
with upstream to fix these issues, but in the meantime, simply let those
continue to warn.
|
|
bd48bf3f
|
2019-06-14T14:21:32
|
|
hash: introduce source files to break include circles
The hash source files have circular include dependencies right
now, which shows by our broken generic hash implementation. The
"hash.h" header declares two functions and the `git_hash_ctx`
typedef before actually including the hash backend header and can
only declare the remaining hash functions after the include due
to possibly static function declarations inside of the
implementation includes.
Let's break this cycle and help maintainability by creating a
real implementation file for each of the hash implementations.
Instead of relying on the exact include order, we now especially
avoid the use of `GIT_INLINE` for function declarations.
|
|
94fc83b6
|
2019-06-13T16:48:35
|
|
cmake: Modulize our TLS & hash detection
The interactions between `USE_HTTPS` and `SHA1_BACKEND` have been
streamlined. Previously we would have accepted not quite working
configurations (like, `-DUSE_HTTPS=OFF -DSHA1_BACKEND=OpenSSL`) and, as
the OpenSSL detection only ran with `USE_HTTPS`, the link would fail.
The detection was moved to a new `USE_SHA1`, modeled after `USE_HTTPS`,
which takes the values "CollisionDetection/Backend/Generic", to better
match how the "hashing backend" is selected, the default (ON) being
"CollisionDetection".
Note that, as `SHA1_BACKEND` is still used internally, you might need to
check what customization you're using it for.
|
|
ce6d624a
|
2019-05-19T10:30:04
|
|
regex: optionally use PCRE2
Use PCRE2 and its POSIX compatibility layer if requested by the user.
Although PCRE2 is adequate for our needs, the PCRE2 POSIX layer as
installed on Debian and Ubuntu systems is broken, so we do not opt-in to
it by default to avoid breaking users on those platforms.
|
|
69ecdad5
|
2019-05-19T10:09:55
|
|
regex: use system PCRE if available
Attempt to locate a system-installed version of PCRE and use its POSIX
compatibility layer, if possible.
|
|
67562b23
|
2019-04-07T16:45:45
|
|
fix typo
|
|
6af6170b
|
2019-01-05T20:50:42
|
|
Make ENABLE_WERROR actually work
This change explicitly adds -Werror to the CFLAGS.
Due to the way that the ADD_C_FLAG_IF_SUPPORTED() macro was mangling the
flag name to convert it into a define name, any warning that had a dash
in its name was not being correctly enabled. Additionally, any flag that
is enabled implicitly by the compiler (like -Wunused-result and
-Wdeprecated-declarations) would not cause an error unless they were
explicitly enabled with the ENABLE_WARNINGS() macro.
|
|
1a9cc182
|
2018-08-17T15:56:30
|
|
util: make the qsort_r check work on macOS
This performs a compile-check by using CMake support, to differentiate the GNU
version from the BSD version of qsort_r.
Module taken from 4f252abea5f1d17c60f6ff115c9c44cc0b6f1df6, which I've checked
against CMake 2.8.11.
|
|
2e2d8c64
|
2018-08-24T09:53:39
|
|
cmake: detect and use libc-provided iconv
While most systems provide a separate iconv library against which
applications can link, musl based systems do not provide such a library.
Instead, iconv functions are directly included in the C library. As our
current CMake module to locate the iconv library only checks whether a
library exists somewhere in the typical library directories, we will
never build libgit2 with libiconv support on such systems.
Extend the iconv module to also search whether libc provides iconv
functions, which we do by checking whether the `iconv_open` function
exists inside of libc. If this is the case, we will default to use the
libc provided one instead of trying to use a separate libiconv. While
this changes which iconv we use on systems where both libc and an
external libiconv exist, to the best of my knowledge common systems only
provide either one or the other.
Note that libiconv support in musl is held kind of basic. To quote musl
libc's page on functional differences from glibc [1]:
The iconv implementation musl is very small and oriented towards
being unobtrusive to static link. Its character set/encoding
coverage is very strong for its size, but not comprehensive like
glibc’s.
As we assume iconv to be a lot more capable than what musl provides,
some of our tests will fail if using iconv on musl-based platforms.
[1]: https://wiki.musl-libc.org/functional-differences-from-glibc.html
|
|
186a7ba5
|
2018-07-19T15:13:40
|
|
cmake: error out if required C flags are not supported
We do want to notify users compiling our source code early on if they
try to use C flags which aren't supported. Add a new macro `AddCFlag`,
which results in a fatal error in case the flag is not supported, and
use it for our fuzzing flags.
|
|
0f62e4c7
|
2018-04-27T10:38:49
|
|
cmake: resolve libraries found by pkg-config
Libraries found by CMake modules are usually handled with their full
path. This makes linking against those libraries a lot more robust when
it comes to libraries in non-standard locations, as otherwise we might
mix up libraries from different locations when link directories are
given.
One excemption are libraries found by PKG_CHECK_MODULES. Instead of
returning libraries with their complete path, it will return the
variable names as well as a set of link directories. In case where
multiple sets of the same library are installed in different locations,
this can lead the compiler to link against the wrong libraries in the
end, when link directories of other dependencies are added.
To fix this shortcoming, we need to manually resolve library paths
returned by CMake against their respective library directories. This is
an easy task to do with `FIND_LIBRARY`.
|
|
ca3b2234
|
2018-03-29T22:13:56
|
|
mbedtls: initial support
|
|
f8a2dda8
|
2018-02-05T15:21:37
|
|
cmake: move ENABLE_WARNINGS to a module
|
|
fc6e38c2
|
2018-02-02T18:03:38
|
|
cmake: Move IDE source munging to a module
Move the odd code that provides a hierarchical display for projects
within the IDEs to its own module.
|
|
ed298c8e
|
2018-02-02T18:01:51
|
|
cmake: move nanosecond detection to a module
Move the nanosecond detection in time structures to its own module.
|
|
99d6ebb3
|
2017-09-06T22:01:50
|
|
cmake: make our macOS helpers more CMake-y
|
|
152f3766
|
2017-09-06T21:53:58
|
|
cmake: fix indentation before enhancing
|
|
b7df2e8b
|
2015-05-01T22:48:33
|
|
Don't search iconv in /opt/local
Since OpenSSL isn't used any more on OS X, there is no dependency
on any MacPorts library under /opt/local and there is no danger of
conflicts between MacPorts and system iconv. For this reason the
system iconv can always be used now.
|
|
6bb54cbf
|
2014-11-02T13:23:32
|
|
Add a SecureTransport TLS channel
As an alternative to OpenSSL when we're on OS X. This one can actually
take advantage of stacking the streams.
|
|
4f91bfa3
|
2014-12-05T10:32:59
|
|
Find libssh2 via pkg-config
We don't really need our own module to find libssh2. Using pkg-config
lets the standard tool do the work for us and let us fit more naturally
in the workflow as we respect the pkg-config search paths.
|
|
315cb38e
|
2014-07-31T18:43:20
|
|
Add GSSAPI support for SPNEGO/Kerberos auth over HTTP
|
|
5c8d5eac
|
2014-04-19T23:07:50
|
|
Introduce AddCFlagIfSupported CMake macro
|
|
4bc94eb5
|
2014-01-30T03:01:46
|
|
We never search for libiconv via pkg-config
So we actually also never know that we can set a dependency on it in
pkg-config. Instead always give it the -L and -l options.
|
|
6e0ff093
|
2014-01-30T02:30:55
|
|
Find and use a MacPorts version of libiconv. Fixes #2017.
- Add correct -I, -L and -l flags
- Search for libiconv in /opt/local/[include|lib] before in the
system path. See #2017 for details.
- Give splitted -L and -l arguments to pkg-config
|
|
39949f06
|
2014-01-30T02:28:53
|
|
Cleanup FindIconv.cmake
Doesn't change anything. Just removes stuff that was probably missed
to remove when this was imported.
|
|
726b75d1
|
2013-12-02T11:32:37
|
|
Improve iconv finding for cmake
* add FindIconv helper for CMake iconv detection
* only default using iconv to ON for MacOS
* update pkg-config generation to include iconv dependency better
|
|
7a6e0281
|
2013-05-02T14:07:22
|
|
Build with the system's http-parser installation if available
|
|
a6b79b9b
|
2013-05-15T12:49:15
|
|
Changed case of FindLibSSH2.cmake to FindLIBSSH2.cmake
|
|
6cbbd739
|
2013-05-15T12:48:43
|
|
Renamed FindLibSSH2.cmake
|
|
7369b3c3
|
2013-05-07T14:26:33
|
|
Added libssh2 cmake module
|