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>
This commit is contained in:
David Aguilar
2009-05-31 01:35:50 -07:00
committed by Junio C Hamano
parent 33fd7169ed
commit 0620b39b3b
5 changed files with 102 additions and 0 deletions

View File

@ -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 *);