Merge branch 'rs/compat-strdup' into maint

Code cleanup.

* rs/compat-strdup:
  compat: move strdup(3) replacement to its own file
This commit is contained in:
Junio C Hamano
2016-09-19 13:51:42 -07:00
4 changed files with 33 additions and 19 deletions

View File

@ -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