wrapper.c: delete dead function git_mkstemps()

Its last call site was replaced by mks_tempfile_ts() in 284098f (diff: use tempfile module - 2015-08-12) and there's a good chance mks_tempfile_ts will continue to successfully handle this job. Delete it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Apr 22, 2016 at 19:25 UTC 659488326cf6a170cd474e66f1bed6f5bc322eab
2 files changed -19
cache.h
-2
@@ -926,8 +926,6 @@ static inline int is_empty_blob_sha1(const unsigned char *sha1)
926
927 int git_mkstemp(char *path, size_t n, const char *template);
928
929 -int git_mkstemps(char *path, size_t n, const char *template, int suffix_len);
930 -
929 /* set default permissions by passing mode arguments to open(2) */
930 int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
931 int git_mkstemp_mode(char *pattern, int mode);
wrapper.c
-17
@@ -446,23 +446,6 @@ int git_mkstemp(char *path, size_t len, const char *template)
446 return mkstemp(path);
447 }
448
449 -/* git_mkstemps() - create tmp file with suffix honoring TMPDIR variable. */
450 -int git_mkstemps(char *path, size_t len, const char *template, int suffix_len)
451 -{
452 - const char *tmp;
453 - size_t n;
454 -
455 - tmp = getenv("TMPDIR");
456 - if (!tmp)
457 - tmp = "/tmp";
458 - n = snprintf(path, len, "%s/%s", tmp, template);
459 - if (len <= n) {
460 - errno = ENAMETOOLONG;
461 - return -1;
462 - }
463 - return mkstemps(path, suffix_len);
464 -}
465 -
449 /* Adapted from libiberty's mkstemp.c. */
450
451 #undef TMP_MAX