[packages]: update git to 1.8.4

Signed-off-by: Peter Wagner <tripolar@gmx.at>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@37949 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
tripolar 2013-09-11 17:11:24 +00:00
parent 5386702dbf
commit 5410d5db8e
3 changed files with 153 additions and 17 deletions

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=git PKG_NAME:=git
PKG_VERSION:=1.8.3.4 PKG_VERSION:=1.8.4
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://git-core.googlecode.com/files/ PKG_SOURCE_URL:=http://git-core.googlecode.com/files/
PKG_MD5SUM:=80eec3201a5d012913d287b85adaee8e PKG_MD5SUM:=355768a1c70d0cb4fedf4b598ac1375b
PKG_INSTALL:=1 PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1

View File

@ -0,0 +1,136 @@
From 49d6cfa5c2874d78360dc4b16558bb45b5f8e003 Mon Sep 17 00:00:00 2001
From: Jeff King <peff@peff.net>
Date: Mon, 26 Aug 2013 17:57:18 -0400
Subject: [PATCH] config: do not use C function names as struct members
According to C99, section 7.1.4:
Any function declared in a header may be additionally
implemented as a function-like macro defined in the
header.
Therefore calling our struct member function pointer "fgetc"
may run afoul of unwanted macro expansion when we call:
char c = cf->fgetc(cf);
This turned out to be a problem on uclibc, which defines
fgetc as a macro and causes compilation failure.
The standard suggests fixing this in a few ways:
1. Using extra parentheses to inhibit the function-like
macro expansion. E.g., "(cf->fgetc)(cf)". This is
undesirable as it's ugly, and each call site needs to
remember to use it (and on systems without the macro,
forgetting will compile just fine).
2. Using #undef (because a conforming implementation must
also be providing fgetc as a function). This is
undesirable because presumably the implementation was
using the macro for a performance benefit, and we are
dropping that optimization.
Instead, we can simply use non-colliding names.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
config.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/config.c b/config.c
index 680dd6d..95f9a44 100644
--- a/config.c
+++ b/config.c
@@ -27,9 +27,9 @@ struct config_source {
struct strbuf value;
struct strbuf var;
- int (*fgetc)(struct config_source *c);
- int (*ungetc)(int c, struct config_source *conf);
- long (*ftell)(struct config_source *c);
+ int (*do_fgetc)(struct config_source *c);
+ int (*do_ungetc)(int c, struct config_source *conf);
+ long (*do_ftell)(struct config_source *c);
};
static struct config_source *cf;
@@ -217,13 +217,13 @@ int git_config_from_parameters(config_fn_t fn, void *data)
static int get_next_char(void)
{
- int c = cf->fgetc(cf);
+ int c = cf->do_fgetc(cf);
if (c == '\r') {
/* DOS like systems */
- c = cf->fgetc(cf);
+ c = cf->do_fgetc(cf);
if (c != '\n') {
- cf->ungetc(c, cf);
+ cf->do_ungetc(c, cf);
c = '\r';
}
}
@@ -982,9 +982,9 @@ int git_config_from_file(config_fn_t fn, const char *filename, void *data)
top.u.file = f;
top.name = filename;
top.die_on_error = 1;
- top.fgetc = config_file_fgetc;
- top.ungetc = config_file_ungetc;
- top.ftell = config_file_ftell;
+ top.do_fgetc = config_file_fgetc;
+ top.do_ungetc = config_file_ungetc;
+ top.do_ftell = config_file_ftell;
ret = do_config_from(&top, fn, data);
@@ -1003,9 +1003,9 @@ int git_config_from_buf(config_fn_t fn, const char *name, const char *buf,
top.u.buf.pos = 0;
top.name = name;
top.die_on_error = 0;
- top.fgetc = config_buf_fgetc;
- top.ungetc = config_buf_ungetc;
- top.ftell = config_buf_ftell;
+ top.do_fgetc = config_buf_fgetc;
+ top.do_ungetc = config_buf_ungetc;
+ top.do_ftell = config_buf_ftell;
return do_config_from(&top, fn, data);
}
@@ -1186,7 +1186,7 @@ static int store_aux(const char *key, const char *value, void *cb)
return 1;
}
- store.offset[store.seen] = cf->ftell(cf);
+ store.offset[store.seen] = cf->do_ftell(cf);
store.seen++;
}
break;
@@ -1213,19 +1213,19 @@ static int store_aux(const char *key, const char *value, void *cb)
* Do not increment matches: this is no match, but we
* just made sure we are in the desired section.
*/
- store.offset[store.seen] = cf->ftell(cf);
+ store.offset[store.seen] = cf->do_ftell(cf);
/* fallthru */
case SECTION_END_SEEN:
case START:
if (matches(key, value)) {
- store.offset[store.seen] = cf->ftell(cf);
+ store.offset[store.seen] = cf->do_ftell(cf);
store.state = KEY_SEEN;
store.seen++;
} else {
if (strrchr(key, '.') - key == store.baselen &&
!strncmp(key, store.key, store.baselen)) {
store.state = SECTION_SEEN;
- store.offset[store.seen] = cf->ftell(cf);
+ store.offset[store.seen] = cf->do_ftell(cf);
}
}
}
--
1.8.3.2

View File

@ -1,6 +1,6 @@
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -536,16 +536,7 @@ EXTRA_PROGRAMS = @@ -540,16 +540,7 @@ EXTRA_PROGRAMS =
# ... and all the rest that could be moved out of bindir to gitexecdir # ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS += $(EXTRA_PROGRAMS) PROGRAMS += $(EXTRA_PROGRAMS)
@ -18,7 +18,7 @@
# Binary suffix, set to .exe for Windows builds # Binary suffix, set to .exe for Windows builds
X = X =
@@ -985,6 +976,12 @@ BUILTIN_OBJS += builtin/var.o @@ -996,6 +987,12 @@ BUILTIN_OBJS += builtin/var.o
BUILTIN_OBJS += builtin/verify-pack.o BUILTIN_OBJS += builtin/verify-pack.o
BUILTIN_OBJS += builtin/verify-tag.o BUILTIN_OBJS += builtin/verify-tag.o
BUILTIN_OBJS += builtin/write-tree.o BUILTIN_OBJS += builtin/write-tree.o
@ -31,7 +31,7 @@
GITLIBS = $(LIB_FILE) $(XDIFF_LIB) GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS = EXTLIBS =
@@ -1148,7 +1145,7 @@ endif @@ -1159,7 +1156,7 @@ endif
EXTLIBS += -lz EXTLIBS += -lz
ifndef NO_OPENSSL ifndef NO_OPENSSL
@ -40,7 +40,7 @@
ifdef OPENSSLDIR ifdef OPENSSLDIR
BASIC_CFLAGS += -I$(OPENSSLDIR)/include BASIC_CFLAGS += -I$(OPENSSLDIR)/include
OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib) OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
@@ -2033,10 +2030,6 @@ endif @@ -2048,10 +2045,6 @@ endif
git-%$X: %.o GIT-LDFLAGS $(GITLIBS) git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
@ -51,7 +51,7 @@
git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS) git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL) $(LIBS) $(CURL_LIBCURL)
@@ -2344,24 +2337,22 @@ endif @@ -2363,24 +2356,22 @@ endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
{ test "$$bindir/" = "$$execdir/" || \ { test "$$bindir/" = "$$execdir/" || \
@ -80,12 +80,12 @@
done && \ done && \
--- a/builtin.h --- a/builtin.h
+++ b/builtin.h +++ b/builtin.h
@@ -146,5 +146,11 @@ extern int cmd_verify_pack(int argc, con @@ -134,5 +134,11 @@ extern int cmd_verify_pack(int argc, con
extern int cmd_show_ref(int argc, const char **argv, const char *prefix); extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
extern int cmd_pack_refs(int argc, const char **argv, const char *prefix); extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
extern int cmd_replace(int argc, const char **argv, const char *prefix); extern int cmd_replace(int argc, const char **argv, const char *prefix);
+extern int cmd_daemon(int argc, char **argv, const char *prefix); +extern int cmd_daemon(int argc, char **argv, const char *prefix);
+extern int cmd_fast_import(int argc, const char **argv, const char *prefix); +extern int cmd_fast_import(int argc, char **argv, const char *prefix);
+extern int cmd_http_backend(int argc, char **argv, const char *prefix); +extern int cmd_http_backend(int argc, char **argv, const char *prefix);
+extern int cmd_imap_send(int argc, char **argv, const char *prefix); +extern int cmd_imap_send(int argc, char **argv, const char *prefix);
+extern int cmd_shell(int argc, char **argv, const char *prefix); +extern int cmd_shell(int argc, char **argv, const char *prefix);
@ -118,7 +118,7 @@
+#include "../upload-pack.c" +#include "../upload-pack.c"
--- a/daemon.c --- a/daemon.c
+++ b/daemon.c +++ b/daemon.c
@@ -1160,7 +1160,7 @@ static int serve(struct string_list *lis @@ -1148,7 +1148,7 @@ static int serve(struct string_list *lis
return service_loop(&socklist); return service_loop(&socklist);
} }
@ -133,8 +133,8 @@
read_marks(); read_marks();
} }
-int main(int argc, const char **argv) -int main(int argc, char **argv)
+int cmd_fast_import(int argc, const char **argv, const char *prefix) +int cmd_fast_import(int argc, char **argv, const char *prefix)
{ {
unsigned int i; unsigned int i;
@ -163,7 +163,7 @@
{ {
const char *cmd = argv[0]; const char *cmd = argv[0];
static struct cmd_struct commands[] = { static struct cmd_struct commands[] = {
@@ -337,6 +337,7 @@ static void handle_internal_command(int @@ -338,6 +338,7 @@ static void handle_internal_command(int
{ "commit-tree", cmd_commit_tree, RUN_SETUP }, { "commit-tree", cmd_commit_tree, RUN_SETUP },
{ "config", cmd_config, RUN_SETUP_GENTLY }, { "config", cmd_config, RUN_SETUP_GENTLY },
{ "count-objects", cmd_count_objects, RUN_SETUP }, { "count-objects", cmd_count_objects, RUN_SETUP },
@ -171,7 +171,7 @@
{ "credential", cmd_credential, RUN_SETUP_GENTLY }, { "credential", cmd_credential, RUN_SETUP_GENTLY },
{ "describe", cmd_describe, RUN_SETUP }, { "describe", cmd_describe, RUN_SETUP },
{ "diff", cmd_diff }, { "diff", cmd_diff },
@@ -344,6 +345,7 @@ static void handle_internal_command(int @@ -345,6 +346,7 @@ static void handle_internal_command(int
{ "diff-index", cmd_diff_index, RUN_SETUP }, { "diff-index", cmd_diff_index, RUN_SETUP },
{ "diff-tree", cmd_diff_tree, RUN_SETUP }, { "diff-tree", cmd_diff_tree, RUN_SETUP },
{ "fast-export", cmd_fast_export, RUN_SETUP }, { "fast-export", cmd_fast_export, RUN_SETUP },
@ -179,7 +179,7 @@
{ "fetch", cmd_fetch, RUN_SETUP }, { "fetch", cmd_fetch, RUN_SETUP },
{ "fetch-pack", cmd_fetch_pack, RUN_SETUP }, { "fetch-pack", cmd_fetch_pack, RUN_SETUP },
{ "fmt-merge-msg", cmd_fmt_merge_msg, RUN_SETUP }, { "fmt-merge-msg", cmd_fmt_merge_msg, RUN_SETUP },
@@ -356,6 +358,8 @@ static void handle_internal_command(int @@ -357,6 +359,8 @@ static void handle_internal_command(int
{ "grep", cmd_grep, RUN_SETUP_GENTLY }, { "grep", cmd_grep, RUN_SETUP_GENTLY },
{ "hash-object", cmd_hash_object }, { "hash-object", cmd_hash_object },
{ "help", cmd_help }, { "help", cmd_help },
@ -188,7 +188,7 @@
{ "index-pack", cmd_index_pack, RUN_SETUP_GENTLY }, { "index-pack", cmd_index_pack, RUN_SETUP_GENTLY },
{ "init", cmd_init_db }, { "init", cmd_init_db },
{ "init-db", cmd_init_db }, { "init-db", cmd_init_db },
@@ -404,6 +408,7 @@ static void handle_internal_command(int @@ -405,6 +409,7 @@ static void handle_internal_command(int
{ "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE }, { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE },
{ "rm", cmd_rm, RUN_SETUP }, { "rm", cmd_rm, RUN_SETUP },
{ "send-pack", cmd_send_pack, RUN_SETUP }, { "send-pack", cmd_send_pack, RUN_SETUP },
@ -196,7 +196,7 @@
{ "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER }, { "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },
{ "show", cmd_show, RUN_SETUP }, { "show", cmd_show, RUN_SETUP },
{ "show-branch", cmd_show_branch, RUN_SETUP }, { "show-branch", cmd_show_branch, RUN_SETUP },
@@ -421,6 +426,7 @@ static void handle_internal_command(int @@ -422,6 +427,7 @@ static void handle_internal_command(int
{ "update-server-info", cmd_update_server_info, RUN_SETUP }, { "update-server-info", cmd_update_server_info, RUN_SETUP },
{ "upload-archive", cmd_upload_archive }, { "upload-archive", cmd_upload_archive },
{ "upload-archive--writer", cmd_upload_archive_writer }, { "upload-archive--writer", cmd_upload_archive_writer },