From e88856b485cd73dfc1f3ef8d4c5b52a2f557e8c8 Mon Sep 17 00:00:00 2001 From: Dennis Stosberg Date: Thu, 11 May 2006 19:35:31 +0200 Subject: [PATCH 1/4] Fix compilation on newer NetBSD systems NetBSD >=2.0 has iconv() in libc. A libiconv is not required and does not exist. See: http://netbsd.gw.com/cgi-bin/man-cgi?iconv+3+NetBSD-2.0 [jc: with a bit of simplification later discussed on the list.] Signed-off-by: Dennis Stosberg Signed-off-by: Junio C Hamano --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3972d10886..9f6425d200 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,9 @@ ifeq ($(uname_S),OpenBSD) ALL_LDFLAGS += -L/usr/local/lib endif ifeq ($(uname_S),NetBSD) - NEEDS_LIBICONV = YesPlease + ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) + NEEDS_LIBICONV = YesPlease + endif ALL_CFLAGS += -I/usr/pkg/include ALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib endif From f3dd5eae58cf3d0d944604af4c71a7043d5368fd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 14 May 2006 19:26:56 -0700 Subject: [PATCH 2/4] Install git-send-email by default After 567ffeb7722eefab3991cb894c96548b92b57cc2 and 4bc87a28be020a6bf7387161c65ea3d8e4a0228b, git-send-email no longer requires any non-standard Perl modules, so there's no reason to special-case it. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- Makefile | 7 ++----- git.spec.in | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9f6425d200..b808ecabbb 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,8 @@ SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ git-shortlog.perl git-fmt-merge-msg.perl git-rerere.perl \ git-annotate.perl git-cvsserver.perl \ - git-svnimport.perl git-mv.perl git-cvsexportcommit.perl + git-svnimport.perl git-mv.perl git-cvsexportcommit.perl \ + git-send-email.perl SCRIPT_PYTHON = \ git-merge-recursive.py @@ -317,10 +318,6 @@ else endif endif -ifdef WITH_SEND_EMAIL - SCRIPT_PERL += git-send-email.perl -endif - ifndef NO_CURL ifdef CURLDIR # This is still problematic -- gcc does not always want -R. diff --git a/git.spec.in b/git.spec.in index 96dfc1de55..8ccd2564e7 100644 --- a/git.spec.in +++ b/git.spec.in @@ -74,12 +74,12 @@ Git revision tree visualiser ('gitk') %setup -q %build -make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease WITH_SEND_EMAIL=1 \ +make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \ prefix=%{_prefix} all %{!?_without_docs: doc} %install rm -rf $RPM_BUILD_ROOT -make %{_smp_mflags} DESTDIR=$RPM_BUILD_ROOT WITH_OWN_SUBPROCESS_PY=YesPlease WITH_SEND_EMAIL=1 \ +make %{_smp_mflags} DESTDIR=$RPM_BUILD_ROOT WITH_OWN_SUBPROCESS_PY=YesPlease \ prefix=%{_prefix} mandir=%{_mandir} \ install %{!?_without_docs: install-doc} From 1b9bc5a7b7434d771726011613a00cb202bd9f44 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 15 May 2006 12:52:00 -0700 Subject: [PATCH 3/4] Fix pack-index issue on 64-bit platforms a bit more portably. Apparently is not enough for uint32_t on OpenBSD; use "unsigned int" -- hopefully that would stay 32-bit on every platform we care about, at least until we update the pack-index file format. Our sha1 routines optimized for architectures use uint32_t and expects '#include ' to be enough, so OpenBSD on arm or ppc might have similar issues down the road, I dunno. Signed-off-by: Junio C Hamano --- pack-objects.c | 3 +-- sha1_file.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pack-objects.c b/pack-objects.c index aa2c098617..614e87bc8c 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -10,7 +10,6 @@ #include "tree-walk.h" #include #include -#include static const char pack_usage[] = "git-pack-objects [-q] [--no-reuse-delta] [--non-empty] [--local] [--incremental] [--window=N] [--depth=N] {--stdout | base-name} < object-list"; @@ -157,7 +156,7 @@ static void prepare_pack_revindex(struct pack_revindex *rix) rix->revindex = xmalloc(sizeof(unsigned long) * (num_ent + 1)); for (i = 0; i < num_ent; i++) { - uint32_t hl = *((uint32_t *)(index + 24 * i)); + unsigned int hl = *((unsigned int *)(index + 24 * i)); rix->revindex[i] = ntohl(hl); } /* This knows the pack format -- the 20-byte trailer diff --git a/sha1_file.c b/sha1_file.c index 673c58d450..66db206d9b 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -13,7 +13,6 @@ #include "commit.h" #include "tag.h" #include "tree.h" -#include #ifndef O_NOATIME #if defined(__linux__) && (defined(__i386__) || defined(__PPC__)) @@ -1127,7 +1126,7 @@ int find_pack_entry_one(const unsigned char *sha1, int mi = (lo + hi) / 2; int cmp = memcmp(index + 24 * mi + 4, sha1, 20); if (!cmp) { - e->offset = ntohl(*((uint32_t *)(index + 24 * mi))); + e->offset = ntohl(*((unsigned int *)(index + 24 * mi))); memcpy(e->sha1, sha1, 20); e->p = p; return 1; From f66475199cbf50d9da9db617a280aac3196b2250 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 15 May 2006 17:54:01 -0700 Subject: [PATCH 4/4] Fix silly typo in new builtin grep The "-F" flag apparently got mis-translated due to some over-eager copy-paste work into a duplicate "-H" when using the external grep. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- builtin-grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-grep.c b/builtin-grep.c index 3d6e515f1f..66111de514 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -455,7 +455,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached) push_arg("grep"); push_arg("-H"); if (opt->fixed) - push_arg("-H"); + push_arg("-F"); if (opt->linenum) push_arg("-n"); if (opt->regflags & REG_EXTENDED)