hg: build mpatch and sha1detectcoll on Windows

Reviewed By: quark-zju

Differential Revision: D6979094

fbshipit-source-id: 8d617ae9d961e2203504b8eadbbf8d3e85f6befb
This commit is contained in:
Kostia Balytskyi 2018-02-13 12:53:30 -08:00 committed by Saurabh Singh
parent 62ecc73818
commit efd44d683d
3 changed files with 14 additions and 19 deletions

View File

@ -25,7 +25,6 @@
#include <string.h>
#include "hgext/extlib/cstore/bitmanipulation.h"
#include "hgext/extlib/cstore/compat.h"
static struct mpatch_flist *lalloc(ssize_t size)
{

View File

@ -5,6 +5,7 @@
#define MPATCH_ERR_CANNOT_BE_DECODED -2
#define MPATCH_ERR_INVALID_PATCH -1
#include "hgext/extlib/cstore/compat.h"
#include "lib/clib/portability/unistd.h"
struct mpatch_frag {

View File

@ -1087,25 +1087,20 @@ libraries = [
"extra_args" : filter(None,
[STDC99, WALL, WSTRICTPROTOTYPES] + cflags),
}),
("sha1detectcoll", {
"sources" : [
"lib/third-party/sha1dc/sha1.c",
"lib/third-party/sha1dc/ubc_check.c",
],
"include_dirs" : ["lib/third-party"] + include_dirs,
"extra_args" : filter(None,
[STDC99, WALL, WSTRICTPROTOTYPES] + cflags),
}),
('mpatch', {
"sources": ["hgext/extlib/cstore/mpatch.c"],
"include_dirs" : ["."] + include_dirs,
}),
]
if iswindows:
libraries += []
else:
libraries += [
('mpatch', {
"sources": ["hgext/extlib/cstore/mpatch.c"],
"include_dirs" : ["."] + include_dirs,
}),
("sha1detectcoll", {
"sources" : [
"lib/third-party/sha1dc/sha1.c",
"lib/third-party/sha1dc/ubc_check.c",
],
"include_dirs" : ["lib/third-party"] + include_dirs,
"extra_args" : filter(None,
[STDC99, WALL, WSTRICTPROTOTYPES] + cflags),
}),
]
sys.path.insert(0, 'contrib/python-zstandard')
import setup_zstd