| Index: ports/git/nacl.patch
|
| diff --git a/ports/git/nacl.patch b/ports/git/nacl.patch
|
| index c5d8449e0f9cd94dd831f69a3f26a844c1cbb558..c83fa9b6e03db89134ba17429562b8dd14c6e148 100644
|
| --- a/ports/git/nacl.patch
|
| +++ b/ports/git/nacl.patch
|
| @@ -128,21 +128,6 @@ diff --git a/Makefile b/Makefile
|
| ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
|
| cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \
|
| done && \
|
| -diff --git a/base85.c b/base85.c
|
| ---- a/base85.c
|
| -+++ b/base85.c
|
| -@@ -102,7 +102,11 @@ void encode_85(char *buf, const unsigned char *data, int bytes)
|
| - }
|
| -
|
| - #ifdef DEBUG_85
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int ac, char *av[])
|
| -+#else
|
| - int main(int ac, char **av)
|
| -+#endif
|
| - {
|
| - char buf[1024];
|
| -
|
| diff --git a/builtin/log.c b/builtin/log.c
|
| --- a/builtin/log.c
|
| +++ b/builtin/log.c
|
| @@ -197,20 +182,6 @@ diff --git a/builtin/log.c b/builtin/log.c
|
| }
|
|
|
| static void finish_early_output(struct rev_info *rev)
|
| -diff --git a/check-racy.c b/check-racy.c
|
| ---- a/check-racy.c
|
| -+++ b/check-racy.c
|
| -@@ -1,6 +1,10 @@
|
| - #include "cache.h"
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int ac, char *av[])
|
| -+#else
|
| - int main(int ac, char **av)
|
| -+#endif
|
| - {
|
| - int i;
|
| - int dirty, clean, racy;
|
| diff --git a/compat/nacl.c b/compat/nacl.c
|
| new file mode 100644
|
| --- /dev/null
|
| @@ -341,48 +312,6 @@ diff --git a/configure.ac b/configure.ac
|
| ])
|
| if test $ac_cv_snprintf_returns_bogus = yes; then
|
| SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes
|
| -diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
|
| ---- a/credential-cache--daemon.c
|
| -+++ b/credential-cache--daemon.c
|
| -@@ -255,6 +255,10 @@ static void check_socket_directory(const char *path)
|
| - free(path_copy);
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, const char **argv)
|
| - {
|
| - static const char *usage[] = {
|
| -diff --git a/credential-cache.c b/credential-cache.c
|
| ---- a/credential-cache.c
|
| -+++ b/credential-cache.c
|
| -@@ -82,6 +82,10 @@ static void do_cache(const char *socket, const char *action, int timeout,
|
| - strbuf_release(&buf);
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, const char **argv)
|
| - {
|
| - char *socket_path = NULL;
|
| -diff --git a/credential-store.c b/credential-store.c
|
| ---- a/credential-store.c
|
| -+++ b/credential-store.c
|
| -@@ -115,6 +115,10 @@ static int lookup_credential(const char *fn, struct credential *c)
|
| - return c->username && c->password;
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - const char * const usage[] = {
|
| diff --git a/daemon.c b/daemon.c
|
| --- a/daemon.c
|
| +++ b/daemon.c
|
| @@ -396,18 +325,6 @@ diff --git a/daemon.c b/daemon.c
|
| } else {
|
| /*
|
| * Since stderr is set to buffered mode, the
|
| -@@ -1096,7 +1098,11 @@ static int serve(struct string_list *listen_addr, int listen_port,
|
| - return service_loop(&socklist);
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - int listen_port = 0;
|
| - struct string_list listen_addr = STRING_LIST_INIT_NODUP;
|
| @@ -1247,7 +1253,9 @@ int main(int argc, char **argv)
|
| }
|
|
|
| @@ -438,17 +355,6 @@ diff --git a/fast-import.c b/fast-import.c
|
| }
|
|
|
| #endif
|
| -@@ -3350,6 +3353,10 @@ static void parse_argv(void)
|
| - read_marks();
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - unsigned int i;
|
| diff --git a/fetch-pack.c b/fetch-pack.c
|
| --- a/fetch-pack.c
|
| +++ b/fetch-pack.c
|
| @@ -527,79 +433,6 @@ diff --git a/git-compat-util.h b/git-compat-util.h
|
| +#endif
|
| +
|
| #endif
|
| -diff --git a/git.c b/git.c
|
| ---- a/git.c
|
| -+++ b/git.c
|
| -@@ -614,6 +614,10 @@ static void restore_sigpipe_to_default(void)
|
| - signal(SIGPIPE, SIG_DFL);
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **av)
|
| - {
|
| - const char **argv = (const char **) av;
|
| -diff --git a/http-backend.c b/http-backend.c
|
| ---- a/http-backend.c
|
| -+++ b/http-backend.c
|
| -@@ -557,7 +557,11 @@ static struct service_cmd {
|
| - {"POST", "/git-receive-pack$", service_rpc}
|
| - };
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - char *method = getenv("REQUEST_METHOD");
|
| - char *dir;
|
| -diff --git a/http-fetch.c b/http-fetch.c
|
| ---- a/http-fetch.c
|
| -+++ b/http-fetch.c
|
| -@@ -6,6 +6,10 @@
|
| - static const char http_fetch_usage[] = "git http-fetch "
|
| - "[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url";
|
| -
|
| -+#if defined(__native_client__)
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, const char **argv)
|
| - {
|
| - struct walker *walker;
|
| -diff --git a/http-push.c b/http-push.c
|
| ---- a/http-push.c
|
| -+++ b/http-push.c
|
| -@@ -1713,7 +1713,11 @@ static void run_request_queue(void)
|
| - #endif
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - struct transfer_request *request;
|
| - struct transfer_request *next_request;
|
| -diff --git a/imap-send.c b/imap-send.c
|
| ---- a/imap-send.c
|
| -+++ b/imap-send.c
|
| -@@ -1484,7 +1484,11 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
|
| - }
|
| - #endif
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - struct strbuf all_msgs = STRBUF_INIT;
|
| - int total;
|
| diff --git a/progress.c b/progress.c
|
| --- a/progress.c
|
| +++ b/progress.c
|
| @@ -631,35 +464,6 @@ diff --git a/progress.c b/progress.c
|
| }
|
|
|
| static int display(struct progress *progress, unsigned n, const char *done)
|
| -diff --git a/remote-curl.c b/remote-curl.c
|
| ---- a/remote-curl.c
|
| -+++ b/remote-curl.c
|
| -@@ -957,7 +957,11 @@ static void parse_push(struct strbuf *buf)
|
| - free(specs);
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, const char **argv)
|
| -+#endif
|
| - {
|
| - struct strbuf buf = STRBUF_INIT;
|
| - int nongit;
|
| -diff --git a/remote-testsvn.c b/remote-testsvn.c
|
| ---- a/remote-testsvn.c
|
| -+++ b/remote-testsvn.c
|
| -@@ -283,6 +283,10 @@ static int do_command(struct strbuf *line)
|
| - return 0;
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - struct strbuf buf = STRBUF_INIT, url_sb = STRBUF_INIT,
|
| diff --git a/run-command.c b/run-command.c
|
| --- a/run-command.c
|
| +++ b/run-command.c
|
| @@ -818,22 +622,6 @@ diff --git a/run-command.c b/run-command.c
|
| if (proc_in >= 0)
|
| set_cloexec(proc_in);
|
| if (proc_out >= 0)
|
| -diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c
|
| ---- a/sh-i18n--envsubst.c
|
| -+++ b/sh-i18n--envsubst.c
|
| -@@ -63,8 +63,12 @@ static void print_variables (const char *string);
|
| - static void note_variables (const char *string);
|
| - static void subst_from_stdin (void);
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int
|
| - main (int argc, char *argv[])
|
| -+#endif
|
| - {
|
| - /* Default values for command line options. */
|
| - /* unsigned short int show_variables = 0; */
|
| diff --git a/sha1_file.c b/sha1_file.c
|
| --- a/sha1_file.c
|
| +++ b/sha1_file.c
|
| @@ -847,481 +635,3 @@ diff --git a/sha1_file.c b/sha1_file.c
|
| #ifdef RLIMIT_NOFILE
|
| {
|
| struct rlimit lim;
|
| -diff --git a/shell.c b/shell.c
|
| ---- a/shell.c
|
| -+++ b/shell.c
|
| -@@ -138,7 +138,11 @@ static struct commands {
|
| - { NULL },
|
| - };
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - char *prog;
|
| - const char **user_argv;
|
| -diff --git a/show-index.c b/show-index.c
|
| ---- a/show-index.c
|
| -+++ b/show-index.c
|
| -@@ -4,7 +4,11 @@
|
| - static const char show_index_usage[] =
|
| - "git show-index < <packed archive index>";
|
| -
|
| --int main(int argc, char **argv)
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| -+int main(int argc, const char **argv)
|
| -+#endif
|
| - {
|
| - int i;
|
| - unsigned nr;
|
| -diff --git a/test-chmtime.c b/test-chmtime.c
|
| ---- a/test-chmtime.c
|
| -+++ b/test-chmtime.c
|
| -@@ -56,6 +56,10 @@ static int timespec_arg(const char *arg, long int *set_time, int *set_eq)
|
| - return 1;
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char *argv[])
|
| - {
|
| - static int verbose;
|
| -diff --git a/test-config.c b/test-config.c
|
| ---- a/test-config.c
|
| -+++ b/test-config.c
|
| -@@ -32,6 +32,9 @@
|
| - *
|
| - */
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -
|
| - int main(int argc, char **argv)
|
| - {
|
| -diff --git a/test-ctype.c b/test-ctype.c
|
| ---- a/test-ctype.c
|
| -+++ b/test-ctype.c
|
| -@@ -28,7 +28,11 @@ static int is_in(const char *s, int ch)
|
| - #define LOWER "abcdefghijklmnopqrstuvwxyz"
|
| - #define UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - TEST_CLASS(isdigit, DIGIT);
|
| - TEST_CLASS(isspace, " \n\r\t");
|
| -diff --git a/test-date.c b/test-date.c
|
| ---- a/test-date.c
|
| -+++ b/test-date.c
|
| -@@ -45,7 +45,11 @@ static void parse_approxidate(char **argv, struct timeval *now)
|
| - }
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - struct timeval now;
|
| - const char *x;
|
| -diff --git a/test-delta.c b/test-delta.c
|
| ---- a/test-delta.c
|
| -+++ b/test-delta.c
|
| -@@ -15,7 +15,11 @@
|
| - static const char usage_str[] =
|
| - "test-delta (-d|-p) <from_file> <data_file> <out_file>";
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char *argv[])
|
| -+#endif
|
| - {
|
| - int fd;
|
| - struct stat st;
|
| -diff --git a/test-dump-cache-tree.c b/test-dump-cache-tree.c
|
| ---- a/test-dump-cache-tree.c
|
| -+++ b/test-dump-cache-tree.c
|
| -@@ -54,7 +54,11 @@ static int dump_cache_tree(struct cache_tree *it,
|
| - return errs;
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int ac, char *av[])
|
| -+#else
|
| - int main(int ac, char **av)
|
| -+#endif
|
| - {
|
| - struct index_state istate;
|
| - struct cache_tree *another = cache_tree();
|
| -diff --git a/test-dump-split-index.c b/test-dump-split-index.c
|
| ---- a/test-dump-split-index.c
|
| -+++ b/test-dump-split-index.c
|
| -@@ -7,6 +7,10 @@ static void show_bit(size_t pos, void *data)
|
| - printf(" %d", (int)pos);
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int ac, char **av)
|
| - {
|
| - struct split_index *si;
|
| -diff --git a/test-genrandom.c b/test-genrandom.c
|
| ---- a/test-genrandom.c
|
| -+++ b/test-genrandom.c
|
| -@@ -6,7 +6,11 @@
|
| -
|
| - #include "git-compat-util.h"
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char *argv[])
|
| -+#endif
|
| - {
|
| - unsigned long count, next = 0;
|
| - unsigned char *c;
|
| -diff --git a/test-hashmap.c b/test-hashmap.c
|
| ---- a/test-hashmap.c
|
| -+++ b/test-hashmap.c
|
| -@@ -126,6 +126,10 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
|
| -
|
| - #define DELIM " \t\r\n"
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - /*
|
| - * Read stdin line by line and print result of commands to stdout:
|
| - *
|
| -diff --git a/test-index-version.c b/test-index-version.c
|
| ---- a/test-index-version.c
|
| -+++ b/test-index-version.c
|
| -@@ -1,5 +1,9 @@
|
| - #include "cache.h"
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - struct cache_header hdr;
|
| -diff --git a/test-line-buffer.c b/test-line-buffer.c
|
| ---- a/test-line-buffer.c
|
| -+++ b/test-line-buffer.c
|
| -@@ -50,7 +50,11 @@ static void handle_line(const char *line, struct line_buffer *stdin_buf)
|
| - handle_command(line, arg + 1, stdin_buf);
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char *argv[])
|
| -+#endif
|
| - {
|
| - struct line_buffer stdin_buf = LINE_BUFFER_INIT;
|
| - struct line_buffer file_buf = LINE_BUFFER_INIT;
|
| -diff --git a/test-match-trees.c b/test-match-trees.c
|
| ---- a/test-match-trees.c
|
| -+++ b/test-match-trees.c
|
| -@@ -1,7 +1,11 @@
|
| - #include "cache.h"
|
| - #include "tree.h"
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int ac, char *av[])
|
| -+#else
|
| - int main(int ac, char **av)
|
| -+#endif
|
| - {
|
| - unsigned char hash1[20], hash2[20], shifted[20];
|
| - struct tree *one, *two;
|
| -diff --git a/test-mergesort.c b/test-mergesort.c
|
| ---- a/test-mergesort.c
|
| -+++ b/test-mergesort.c
|
| -@@ -22,6 +22,10 @@ static int compare_strings(const void *a, const void *b)
|
| - return strcmp(x->text, y->text);
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - struct line *line, *p = NULL, *lines = NULL;
|
| -diff --git a/test-mktemp.c b/test-mktemp.c
|
| ---- a/test-mktemp.c
|
| -+++ b/test-mktemp.c
|
| -@@ -3,7 +3,11 @@
|
| - */
|
| - #include "git-compat-util.h"
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char *argv[])
|
| -+#endif
|
| - {
|
| - if (argc != 2)
|
| - usage("Expected 1 parameter defining the temporary file template");
|
| -diff --git a/test-parse-options.c b/test-parse-options.c
|
| ---- a/test-parse-options.c
|
| -+++ b/test-parse-options.c
|
| -@@ -29,6 +29,10 @@ static int number_callback(const struct option *opt, const char *arg, int unset)
|
| - return 0;
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - const char *prefix = "prefix/";
|
| -diff --git a/test-path-utils.c b/test-path-utils.c
|
| ---- a/test-path-utils.c
|
| -+++ b/test-path-utils.c
|
| -@@ -41,7 +41,11 @@ static void normalize_argv_string(const char **var, const char *input)
|
| - die("Bad value: %s\n", input);
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - if (argc == 3 && !strcmp(argv[1], "normalize_path_copy")) {
|
| - char *buf = xmalloc(PATH_MAX + 1);
|
| -diff --git a/test-prio-queue.c b/test-prio-queue.c
|
| ---- a/test-prio-queue.c
|
| -+++ b/test-prio-queue.c
|
| -@@ -16,6 +16,10 @@ static void show(int *v)
|
| - free(v);
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - struct prio_queue pq = { intcmp };
|
| -diff --git a/test-read-cache.c b/test-read-cache.c
|
| ---- a/test-read-cache.c
|
| -+++ b/test-read-cache.c
|
| -@@ -1,5 +1,9 @@
|
| - #include "cache.h"
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main (int argc, char **argv)
|
| - {
|
| - int i, cnt = 1;
|
| -diff --git a/test-regex.c b/test-regex.c
|
| ---- a/test-regex.c
|
| -+++ b/test-regex.c
|
| -@@ -1,6 +1,10 @@
|
| - #include "git-compat-util.h"
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - char *pat = "[^={} \t]+";
|
| - char *str = "={}\nfred";
|
| -diff --git a/test-revision-walking.c b/test-revision-walking.c
|
| ---- a/test-revision-walking.c
|
| -+++ b/test-revision-walking.c
|
| -@@ -45,7 +45,11 @@ static int run_revision_walk(void)
|
| - return got_revision;
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - if (argc < 2)
|
| - return 1;
|
| -diff --git a/test-run-command.c b/test-run-command.c
|
| ---- a/test-run-command.c
|
| -+++ b/test-run-command.c
|
| -@@ -13,7 +13,11 @@
|
| - #include <string.h>
|
| - #include <errno.h>
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - struct child_process proc = CHILD_PROCESS_INIT;
|
| -
|
| -diff --git a/test-scrap-cache-tree.c b/test-scrap-cache-tree.c
|
| ---- a/test-scrap-cache-tree.c
|
| -+++ b/test-scrap-cache-tree.c
|
| -@@ -5,7 +5,11 @@
|
| -
|
| - static struct lock_file index_lock;
|
| -
|
| --int main(int ac, char **av)
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| -+int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - hold_locked_index(&index_lock, 1);
|
| - if (read_cache() < 0)
|
| -diff --git a/test-sha1-array.c b/test-sha1-array.c
|
| ---- a/test-sha1-array.c
|
| -+++ b/test-sha1-array.c
|
| -@@ -6,6 +6,10 @@ static void print_sha1(const unsigned char sha1[20], void *data)
|
| - puts(sha1_to_hex(sha1));
|
| - }
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - struct sha1_array array = SHA1_ARRAY_INIT;
|
| -diff --git a/test-sha1.c b/test-sha1.c
|
| ---- a/test-sha1.c
|
| -+++ b/test-sha1.c
|
| -@@ -1,6 +1,10 @@
|
| - #include "cache.h"
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int ac, char *av[])
|
| -+#else
|
| - int main(int ac, char **av)
|
| -+#endif
|
| - {
|
| - git_SHA_CTX ctx;
|
| - unsigned char sha1[20];
|
| -diff --git a/test-sigchain.c b/test-sigchain.c
|
| ---- a/test-sigchain.c
|
| -+++ b/test-sigchain.c
|
| -@@ -13,7 +13,11 @@ X(two)
|
| - X(three)
|
| - #undef X
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[]) {
|
| -+#else
|
| - int main(int argc, char **argv) {
|
| -+#endif
|
| - sigchain_push(SIGTERM, one);
|
| - sigchain_push(SIGTERM, two);
|
| - sigchain_push(SIGTERM, three);
|
| -diff --git a/test-string-list.c b/test-string-list.c
|
| ---- a/test-string-list.c
|
| -+++ b/test-string-list.c
|
| -@@ -41,7 +41,11 @@ static int prefix_cb(struct string_list_item *item, void *cb_data)
|
| - return starts_with(item->string, prefix);
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - if (argc == 5 && !strcmp(argv[1], "split")) {
|
| - struct string_list list = STRING_LIST_INIT_DUP;
|
| -diff --git a/test-subprocess.c b/test-subprocess.c
|
| ---- a/test-subprocess.c
|
| -+++ b/test-subprocess.c
|
| -@@ -1,6 +1,10 @@
|
| - #include "cache.h"
|
| - #include "run-command.h"
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - struct child_process cp = CHILD_PROCESS_INIT;
|
| -diff --git a/test-svn-fe.c b/test-svn-fe.c
|
| ---- a/test-svn-fe.c
|
| -+++ b/test-svn-fe.c
|
| -@@ -35,7 +35,11 @@ static int apply_delta(int argc, char *argv[])
|
| - return 0;
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char *argv[])
|
| -+#endif
|
| - {
|
| - if (argc == 2) {
|
| - if (svndump_init(argv[1]))
|
| -diff --git a/test-urlmatch-normalization.c b/test-urlmatch-normalization.c
|
| ---- a/test-urlmatch-normalization.c
|
| -+++ b/test-urlmatch-normalization.c
|
| -@@ -1,6 +1,10 @@
|
| - #include "git-compat-util.h"
|
| - #include "urlmatch.h"
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - const char usage[] = "test-urlmatch-normalization [-p | -l] <url1> | <url1> <url2>";
|
| -diff --git a/test-wildmatch.c b/test-wildmatch.c
|
| ---- a/test-wildmatch.c
|
| -+++ b/test-wildmatch.c
|
| -@@ -1,5 +1,9 @@
|
| - #include "cache.h"
|
| -
|
| -+#ifdef __native_client__
|
| -+#define main nacl_main
|
| -+#endif
|
| -+
|
| - int main(int argc, char **argv)
|
| - {
|
| - int i;
|
| -diff --git a/upload-pack.c b/upload-pack.c
|
| ---- a/upload-pack.c
|
| -+++ b/upload-pack.c
|
| -@@ -793,7 +793,11 @@ static int upload_pack_config(const char *var, const char *value, void *unused)
|
| - return parse_hide_refs_config(var, value, "uploadpack");
|
| - }
|
| -
|
| -+#if defined(__native_client__)
|
| -+int nacl_main(int argc, char *argv[])
|
| -+#else
|
| - int main(int argc, char **argv)
|
| -+#endif
|
| - {
|
| - char *dir;
|
| - int i;
|
|
|