]> git.feebdaed.xyz Git - 0xmirror/git.git/commitdiff
compat: remove mingw_mktemp()
authorRené Scharfe <l.s.r@web.de>
Sat, 6 Dec 2025 13:28:26 +0000 (14:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 Dec 2025 22:28:12 +0000 (07:28 +0900)
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>
compat/mingw-posix.h
compat/mingw.c

index 631a20868489bef8a21e65ca3a9e53b4f68fada0..0939feff27ffec7ea4f65774c4820494696f0b78 100644 (file)
@@ -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
 
index 736a07a028ab4d6976a0f11ded3ec4000e6c883d..abdc9684214dac6975b3de57bd5ec9d0c79de17d 100644 (file)
@@ -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);