mirror of
https://github.com/git/git.git
synced 2026-01-08 01:11:04 +00:00
compat: remove mingw_mktemp()
Remove the mktemp(3) compatibility function now that its last caller was removed by the previous commit. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
5ecd3590a3
commit
47bf14750e
@@ -241,9 +241,6 @@ int mingw_chdir(const char *dirname);
|
||||
int mingw_chmod(const char *filename, int mode);
|
||||
#define chmod mingw_chmod
|
||||
|
||||
char *mingw_mktemp(char *template);
|
||||
#define mktemp mingw_mktemp
|
||||
|
||||
char *mingw_getcwd(char *pointer, int len);
|
||||
#define getcwd mingw_getcwd
|
||||
|
||||
|
||||
@@ -1162,18 +1162,6 @@ unsigned int sleep (unsigned int seconds)
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *mingw_mktemp(char *template)
|
||||
{
|
||||
wchar_t wtemplate[MAX_PATH];
|
||||
if (xutftowcs_path(wtemplate, template) < 0)
|
||||
return NULL;
|
||||
if (!_wmktemp(wtemplate))
|
||||
return NULL;
|
||||
if (xwcstoutf(template, wtemplate, strlen(template) + 1) < 0)
|
||||
return NULL;
|
||||
return template;
|
||||
}
|
||||
|
||||
int mkstemp(char *template)
|
||||
{
|
||||
return git_mkstemp_mode(template, 0600);
|
||||
|
||||
Reference in New Issue
Block a user