summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache.h3
-rw-r--r--wrapper.c17
2 files changed, 0 insertions, 20 deletions
diff --git a/cache.h b/cache.h
index 61fc86e6d7..a575684a98 100644
--- a/cache.h
+++ b/cache.h
@@ -1045,9 +1045,6 @@ static inline int is_empty_tree_oid(const struct object_id *oid)
return !hashcmp(oid->hash, EMPTY_TREE_SHA1_BIN);
}
-
-int git_mkstemp(char *path, size_t n, const char *template);
-
/* set default permissions by passing mode arguments to open(2) */
int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
int git_mkstemp_mode(char *pattern, int mode);
diff --git a/wrapper.c b/wrapper.c
index e7f1979968..1a140639f2 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -440,23 +440,6 @@ int xmkstemp(char *template)
return fd;
}
-/* git_mkstemp() - create tmp file honoring TMPDIR variable */
-int git_mkstemp(char *path, size_t len, const char *template)
-{
- const char *tmp;
- size_t n;
-
- tmp = getenv("TMPDIR");
- if (!tmp)
- tmp = "/tmp";
- n = snprintf(path, len, "%s/%s", tmp, template);
- if (len <= n) {
- errno = ENAMETOOLONG;
- return -1;
- }
- return mkstemp(path);
-}
-
/* Adapted from libiberty's mkstemp.c. */
#undef TMP_MAX