Fix inconsistent use of lower-case and upper-case names for macros
Use CHECK_C_COMPILER_FLAG to determine if the compiler supports a flag

This simplifies platform/compiler dependent checks where we optionally
enable features or disable warnings.
Only disable deprecation warnings on Apple for OpenSSL
Introduce AddCFlagIfSupported CMake macro
sysdir: free the path if we cannot find the file

Returning an error cleared the buf, but this operation does not free the
memory associated with it. Use git_buf_free() instead.
attrcache: fix use-after-free

Reported by coverity.
Merge pull request #2275 from jacquesg/apple-warning

Check for compiler flag support instead of checking for a platform
Introduce git_apply_patch

The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
Patch parsing from patch files