From 4050c0df8ec7043315e2192695de432875239775 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 5 Dec 2005 11:54:29 -0800 Subject: Clean up compatibility definitions. This attempts to clean up the way various compatibility functions are defined and used. - A new header file, git-compat-util.h, is introduced. This looks at various NO_XXX and does necessary function name replacements, equivalent of -Dstrcasestr=gitstrcasestr in the Makefile. - Those function name replacements are removed from the Makefile. - Common features such as usage(), die(), xmalloc() are moved from cache.h to git-compat-util.h; cache.h includes git-compat-util.h itself. Signed-off-by: Junio C Hamano --- compat/mmap.c | 2 +- compat/strcasestr.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'compat') diff --git a/compat/mmap.c b/compat/mmap.c index a051c4767d..55cb120764 100644 --- a/compat/mmap.c +++ b/compat/mmap.c @@ -2,7 +2,7 @@ #include #include #include -#include "../cache.h" +#include "../git-compat-util.h" void *gitfakemmap(void *start, size_t length, int prot , int flags, int fd, off_t offset) { diff --git a/compat/strcasestr.c b/compat/strcasestr.c index b96414d36b..26896deca6 100644 --- a/compat/strcasestr.c +++ b/compat/strcasestr.c @@ -1,5 +1,4 @@ -#include -#include +#include "../git-compat-util.h" char *gitstrcasestr(const char *haystack, const char *needle) { -- cgit v1.2.3