Commit Graph

286 Commits

Author SHA1 Message Date
Carlos Martín Nieto
ba9bb664f3 tests: create a ctest target for cred_callback 2016-03-03 19:31:02 +01:00
Edward Thomson
6cc4bac894 Merge pull request #3577 from rossdylan/rossdylan/pooldebug
Add a new build flag to disable the pool allocator
2016-02-28 11:31:10 -05:00
Edward Thomson
3d6a42d1e1 nsec: support NDK's crazy nanoseconds
Android NDK does not have a `struct timespec` in its `struct stat`
for nanosecond support, instead it has a single nanosecond member inside
the struct stat itself.  We will use that and use a macro to expand to
the `st_mtim` / `st_mtimespec` definition on other systems (much like
the existing `st_mtime` backcompat definition).
2016-02-25 11:40:48 -05:00
Ross Delinger
ed0571f895 Add a new build flag to disable the pool allocator and pass all git_pool_malloc calls straight to git__malloc 2016-01-12 16:08:38 -05:00
Arthur Schreiber
8a0133c030 Add winhttp dependencies to pc file. 2016-01-09 02:43:03 +01:00
Sebastian Schuberth
0878ca9b7c CMakeLists: Compare CMAKE_SIZEOF_VOID_P as a number, not as a string 2015-12-02 14:50:25 +01:00
Jacques Germishuys
eb11fac629 Detect stat's structure 2015-11-20 21:05:38 +02:00
Carlos Martín Nieto
75a0ccf52f Merge pull request #3170 from CmdrMoozy/nsec_fix
git_index_entry__init_from_stat: set nsec fields in entry stats
2015-11-12 19:53:09 +01:00
Edward Thomson
7208ff4d7d cmake: split sources into original paths for Xcode and MSVC
The MSVC_SPLIT_SOURCES function is helpful for other IDEs, like Xcode,
and will split the source files up into their target directories,
instead of merely placing them all in a "Sources" directory.

Rename MSVC_SPLIT_SOURCES to IDE_SPLIT_SOURCES and enable it for Xcode.
2015-10-22 20:17:19 -05:00
Edward Thomson
ac7e50dd37 Merge pull request #3453 from libgit2/cmn/warn-python
CMake: be more explicit with python errors
2015-10-14 08:30:51 -07:00
Carlos Martín Nieto
e3f94c71c3 CMake: be more explicit with python errors
There's been a few reports of users not understanding what the python
error means, so spell out the options they have.
2015-10-06 13:35:45 +02:00
Axel Rasmussen
c7b17fb5cd Merge branch 'master' into nsec_fix_next 2015-10-01 18:01:32 -07:00
Carlos Martín Nieto
ba1a5553e4 Merge pull request #3446 from ethomson/portability
portability: use `CHECK_FUNCTION_EXISTS` for checking whether functions exist...
2015-09-30 17:44:10 +02:00
Edward Thomson
e683d15247 qsort_r/qsort_s: detect their support 2015-09-30 05:49:04 -04:00
Edward Thomson
8649dfd8df p_futimes: support using futimens when available 2015-09-30 05:37:20 -04:00
Axel Rasmussen
360dd4dafd win32: define our own POSIX struct stat, and support USE_NSEC 2015-09-18 23:33:56 -07:00
Axel Rasmussen
c963fe1d3d cmake: fix CMake code organization problem 2015-09-18 23:33:56 -07:00
Axel Rasmussen
e9e6df2c8f cmake: Only provide USE_NSEC if struct stat members are avilable.
This allows us to remove OS checks from source code, instead relying
on CMake to detect whether or not `struct stat` has the nanoseconds
members we rely on.
2015-09-18 23:33:56 -07:00
Axel Rasmussen
e7de893ef8 cmake: add USE_NSEC, and only check nanosec m/ctime if enabled 2015-09-18 23:33:55 -07:00
Dominique Leuenberger
5540d9db20 pkg-config: fix directory references in libgit2.pc
Before:
libdir=/usr//usr/lib64
includedir=/usr//usr/include

After:
libdir=/usr/lib64
includedir=/usr/include

(note the duplication of /usr in the before case)
2015-09-18 11:05:57 +02:00
Carlos Martín Nieto
01fe83741a Revert "Get rid of libssh2 embedding"
The embedding was removed as a libssh2 release with Windows crypto
support became available, but dependencies are still annoying so this
ahs been requested again.

This reverts commit 20dcb7315c.
2015-09-03 13:35:15 +02:00
Carlos Martín Nieto
b445940e2d CMake: fall back to OpenSSL on older OS X
Starting at OS X 10.8, the Security framework offers some functions
which are unified across OS X and iOS. These are the functions that we
use.

Older versions of OS X do not have these functions and we fail to
compile. In these situations, fall back to using OpenSSL for our TLS
stream instead.
2015-08-19 12:53:31 +02:00
Slava Karpenko
c27b4afcdd Forcing libssh2 lib location
OS X may have libssh2 in diff locations, so CHECK_LIBRARY_EXISTS may check the wrong lib; forcing it to use a found directory.
2015-08-06 11:06:17 +03:00
Ben Chatelain
2da64edb80 Add -Wdocumentation flag if supported 2015-07-27 18:28:29 -06:00
Edward Thomson
a522d8c1e7 Merge pull request #3292 from tkelman/patch-1
Increase required version of cmake to 2.8
2015-07-11 17:35:59 -05:00
Tony Kelman
37c84dc58f Increase required version of cmake to 2.8 2015-07-10 12:10:47 -07:00
Jeff Hostetler
93b4272895 Include stacktrace summary in memory leak output. 2015-06-29 16:39:11 -04:00
Carlos Martín Nieto
fd2d11a178 CMake: treat the ld flags as a list
These are treated as a list by CMake itself, which means that treating
them as a simple string can put semicolons in our ld command-line if we
have libraries which are not installed on the standard locations.

Treat the variable as a CMake list and replace it with the space-delimited
list just before writing it out to our pc file.
2015-06-28 13:57:06 +02:00
Carlos Martín Nieto
790cabf06a pc: Put libcurl and libssh2 in Libs.private
Pass on to whoever wants to link to libgit2 statically the flags that we
would have used for these libraries.

Putting them in Requires.private as we do now makes pkg-config put their
dependencies in the linker arguments as well, which is not what we want.
2015-06-26 13:51:41 +02:00
Arthur Schreiber
65f2d15561 List libcurl in the generated libgit2.pc 2015-06-25 21:49:48 +02:00
Carlos Martín Nieto
cf9d5f7602 curl: find and link with the library if it's available by default 2015-06-24 17:25:05 +02:00
Marius Ungureanu
e488bef42c Quote LIBSSH2_LIBRARIES call
Credits to @directhex

It is possible for PKG_CHECK_MODULES(LIBSSH2 libssh2) to LIBSSH2_LIBRARIES to a string with more than one library in it - e.g. if your libssh2 was built against libgcrypt, it will be "ssh2;gcrypt"

Quoting the string is needed, or CHECK_LIBRARY_EXISTS will fail.
2015-06-19 12:54:51 +03:00
Michał Górny
1679ec1204 cmake: Add CMake check for libssh2 memory credential passing support 2015-05-27 20:36:53 +02:00
Carlos Martín Nieto
20dcb7315c Get rid of libssh2 embedding
It was added as a workaround while the project had code to use WinCNG
but had not made a release with it. There is now a release of libssh2
with WinCNG support, so this option is redundant. Let's get rid of it
before people start liking it too much.
2015-05-12 11:33:45 +02:00
Carlos Martín Nieto
25f355cbed Merge pull request #3086 from yongthecoder/master
Android build doesn't need deps/regex
2015-05-06 18:39:39 +02:00
Arthur Schreiber
7a5c755989 Ensure frameworks are mentioned in libgit2.pc
When building on Mac OS X, the `CoreFoundation` and `Security` frameworks where missing from `Libs.private` in the generated `libgit2.pc` file.
2015-05-05 22:36:24 +02:00
Yong Li
57aa839caf Android build doesn't need deps/regex
deps/regex was included in Android build because Android NDK 4 has
a packaging bug and doesn't have the regular expression functions defined
in its libc.so. The bug has been fixed in subsequent Android NDK releases.

If it is still necessary to work around the bug in Android NDK 4, we
should consider to use an option like ANDROID_NDK_RELEASE or
ANDROID_NDK_RELEASE_NUM.
2015-05-04 09:41:34 -04:00
Carlos Martín Nieto
24e53d2fba Rename GIT_SSL to GIT_OPENSSL
This is what it's meant all along, but now we actually have multiple
implementations, it's clearer to use the name of the library.
2015-04-23 17:39:51 +02:00
Carlos Martín Nieto
6bb54cbff3 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.
2015-04-23 17:39:51 +02:00
Jeff Hostetler
d06c589f48 Add MSVC CRTDBG memory leak reporting. 2015-04-15 10:25:09 -04:00
Tony Kelman
b631e0d96d Use swprintf_s everywhere except mingw.org 2015-03-19 08:42:45 -07:00
Tony Kelman
547517d7f9 use a different .def file for 64 bit 2015-03-16 14:59:20 -07:00
Tony Kelman
d612e48ecc Fix out-of-tree build
link against crypt32 for CertFreeCertificateContext
2015-03-16 13:59:33 -07:00
Philip Kelley
8f426d7dd2 Win32: Enable WinHTTP for MinGW 2015-03-16 12:59:55 -07:00
Tony Kelman
063532825c Only run -ionline tests IF (WINHTTP OR OPENSSL_FOUND) 2015-03-05 15:48:08 -08:00
Jeff Hostetler
9a859ef55a Added cl_perf_timer. Updated global trace to include timers. 2015-03-02 09:21:55 -05:00
Jeff Hostetler
6b5c0886b6 Provide mechanism to let CLAR globally setup git_trace() 2015-03-02 08:20:27 -05:00
Leo Yang
2d2aa1ff6e Fix Mac build without OpenSSL
If OpenSSL is disabled on Mac the SHA1 implementation goes
to the CommonCrypto from the system. In this case we should
not include the generic hash impl. Otherwise there would be
duplicated impls which fail the build.
2015-02-17 12:03:25 -05:00
Carlos Martín Nieto
5a2a5771fe Merge pull request #2845 from rakuco/libssh2-detection-fix
Add libssh2's library and include directories.
2015-02-12 00:34:48 +01:00
Yury G. Kudryashov
e15a0849eb Tell user if libssh was not found
Fixes #2665
2015-02-04 00:29:09 +03:00