summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2009-05-31 01:35:50 -0700
committerJunio C Hamano <gitster@pobox.com>2009-05-31 17:56:44 -0700
commit0620b39b3b7b1f27bf863d9591fd8146a9a8931d (patch)
tree17d7859c1c9719c84db24d18c71a61d5aa485784 /git-compat-util.h
parent33fd7169ed6658e898b414a66aefaad16b404ec5 (diff)
downloadgit-0620b39b3b7b1f27bf863d9591fd8146a9a8931d.tar.gz
compat: add a mkstemps() compatibility function
mkstemps() is a BSD extension so provide an implementation for cross-platform use. Signed-off-by: David Aguilar <davvid@gmail.com> Tested-by: Johannes Sixt <j6t@kdbg.org> (Windows) Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index c7cf2d5d9c..f7217ad430 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -232,6 +232,11 @@ extern int gitsetenv(const char *, const char *, int);
extern char *gitmkdtemp(char *);
#endif
+#ifdef NO_MKSTEMPS
+#define mkstemps gitmkstemps
+extern int gitmkstemps(char *, int);
+#endif
+
#ifdef NO_UNSETENV
#define unsetenv gitunsetenv
extern void gitunsetenv(const char *);