mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +01:00
Improve management of zlib dependency
Summary: - Add zlib functions to extension functions. - Provide a better error if the extension is actually missing. Test Plan: Eyeballed it. Reviewers: vrana, btrahan Reviewed By: btrahan CC: Korvin, aran Differential Revision: https://secure.phabricator.com/D3321
This commit is contained in:
parent
1779abef6f
commit
29ba92c0c2
3 changed files with 28 additions and 1 deletions
|
@ -37,7 +37,7 @@ final class PhutilLibraryMapBuilder {
|
||||||
const LIBRARY_MAP_VERSION = 2;
|
const LIBRARY_MAP_VERSION = 2;
|
||||||
|
|
||||||
const SYMBOL_CACHE_VERSION_KEY = '__symbol_cache_version__';
|
const SYMBOL_CACHE_VERSION_KEY = '__symbol_cache_version__';
|
||||||
const SYMBOL_CACHE_VERSION = 7;
|
const SYMBOL_CACHE_VERSION = 8;
|
||||||
|
|
||||||
|
|
||||||
/* -( Mapping libphutil Libraries )---------------------------------------- */
|
/* -( Mapping libphutil Libraries )---------------------------------------- */
|
||||||
|
|
|
@ -51,6 +51,26 @@ curl_share_init
|
||||||
curl_share_setopt
|
curl_share_setopt
|
||||||
curl_unescape
|
curl_unescape
|
||||||
curl_version
|
curl_version
|
||||||
|
gzrewind
|
||||||
|
gzclose
|
||||||
|
gzeof
|
||||||
|
gzgetc
|
||||||
|
gzgets
|
||||||
|
gzgetss
|
||||||
|
gzread
|
||||||
|
gzopen
|
||||||
|
gzpassthru
|
||||||
|
gzseek
|
||||||
|
gztell
|
||||||
|
gzwrite
|
||||||
|
gzputs
|
||||||
|
gzfile
|
||||||
|
gzcompress
|
||||||
|
gzuncompress
|
||||||
|
gzdeflate
|
||||||
|
gzinflate
|
||||||
|
gzencode
|
||||||
|
gzdecode
|
||||||
image2wbmp
|
image2wbmp
|
||||||
image_type_to_extension
|
image_type_to_extension
|
||||||
image_type_to_mime_type
|
image_type_to_mime_type
|
||||||
|
|
|
@ -655,6 +655,13 @@ final class ArcanistBundle {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function emitBinaryDiffBody($data) {
|
private function emitBinaryDiffBody($data) {
|
||||||
|
if (!function_exists('gzcompress')) {
|
||||||
|
throw new Exception(
|
||||||
|
"This patch has binary data. The PHP zlib extension is required to ".
|
||||||
|
"apply patches with binary data to git. Install the PHP zlib ".
|
||||||
|
"extension to continue.");
|
||||||
|
}
|
||||||
|
|
||||||
// See emit_binary_diff_body() in diff.c for git's implementation.
|
// See emit_binary_diff_body() in diff.c for git's implementation.
|
||||||
|
|
||||||
$buf = '';
|
$buf = '';
|
||||||
|
|
Loading…
Reference in a new issue