mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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 <junkio@cox.net>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include "../cache.h"
|
||||
#include "../git-compat-util.h"
|
||||
|
||||
void *gitfakemmap(void *start, size_t length, int prot , int flags, int fd, off_t offset)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "../git-compat-util.h"
|
||||
|
||||
char *gitstrcasestr(const char *haystack, const char *needle)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user