diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-09-19 13:51:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-19 13:51:42 -0700 |
commit | 815a73f7143214510fae6e8a2f2077b2e8694509 (patch) | |
tree | 1485e912318ae3f088a54190d448babb52b925c4 /git-compat-util.h | |
parent | 3d54b93f405c6881ac477c5bfec10802ea53f73d (diff) | |
parent | ca2baa3f7532dfe1816b623f39489ed10f3c9a49 (diff) | |
download | git-815a73f7143214510fae6e8a2f2077b2e8694509.tar.gz |
Merge branch 'rs/compat-strdup' into maint
Code cleanup.
* rs/compat-strdup:
compat: move strdup(3) replacement to its own file
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 2ad45b3f75..68615b1a6a 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -664,6 +664,14 @@ void *gitmemmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen); #endif +#ifdef OVERRIDE_STRDUP +#ifdef strdup +#undef strdup +#endif +#define strdup gitstrdup +char *gitstrdup(const char *s); +#endif + #ifdef NO_GETPAGESIZE #define getpagesize() sysconf(_SC_PAGESIZE) #endif |