summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-04-03 12:28:41 -0700
committerJunio C Hamano <gitster@pobox.com>2010-04-03 12:28:41 -0700
commit16b8a3e4b94dc7f6e05b624eae3cf1eed7b358a5 (patch)
treed45db6fedb240fa977582ec8d76f1b340be44850 /git-compat-util.h
parent40a56f45bcfeb5443bbd3b7f9e9f7ffd570d5398 (diff)
parent7ca56aa07619b0345b643e52ae8e616cbaafc187 (diff)
downloadgit-16b8a3e4b94dc7f6e05b624eae3cf1eed7b358a5.tar.gz
Merge branch 'jn/merge-diff3-label'
* jn/merge-diff3-label: merge-recursive: add a label for ancestor cherry-pick, revert: add a label for ancestor revert: clarify label on conflict hunks compat: add mempcpy() checkout -m --conflict=diff3: add a label for ancestor merge_trees(): add ancestor label parameter for diff3-style output merge_file(): add comment explaining behavior wrt conflict style checkout --conflict=diff3: add a label for ancestor ll_merge(): add ancestor label parameter for diff3-style output merge-file --diff3: add a label for ancestor xdl_merge(): move file1 and file2 labels to xmparam structure xdl_merge(): add optional ancestor label to diff3-style output tests: document cherry-pick behavior in face of conflicts tests: document format of conflicts from checkout -m Conflicts: builtin/revert.c
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index e292926fec..7e62b55270 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -332,6 +332,7 @@ extern int git_vsnprintf(char *str, size_t maxsize,
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 1)
#define HAVE_STRCHRNUL
+#define HAVE_MEMPCPY
#endif
#endif
@@ -345,6 +346,14 @@ static inline char *gitstrchrnul(const char *s, int c)
}
#endif
+#ifndef HAVE_MEMPCPY
+#define mempcpy gitmempcpy
+static inline void *gitmempcpy(void *dest, const void *src, size_t n)
+{
+ return (char *)memcpy(dest, src, n) + n;
+}
+#endif
+
extern void release_pack_memory(size_t, int);
extern char *xstrdup(const char *str);