[PATCH 3/4] compat: remove mingw_mktemp()
- From
René Scharfe <l.s.r@web.de>
- Date
- Dec 3, 2025, 10:52 UTC
- Message-ID
- <fdf6e8f3-d547-4331-95c7-75b44ae6c01f@web.de>
- In-Reply-To
- <784f495a-4b1a-4acf-96cd-599243ef9e27@web.de>
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> --- compat/mingw-posix.h | 3 --- compat/mingw.c | 12 ------------ 2 files changed, 15 deletions(-)
diff --git a/compat/mingw-posix.h b/compat/mingw-posix.h index 631a208684..0939feff27 100644 --- a/compat/mingw-posix.h +++ b/compat/mingw-posix.h @@ -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 diff --git a/compat/mingw.c b/compat/mingw.c index 90ba5cea9d..939f938fe2 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1164,18 +1164,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);
-- 2.52.0