From: "René Scharfe" <l.s.r@web•de>
To: Git List <git@vger•kernel.org>
Subject: [PATCH 3/4] compat: remove mingw_mktemp()
Date: Wed, 3 Dec 2025 11:52:53 +0100 [thread overview]
Message-ID: <fdf6e8f3-d547-4331-95c7-75b44ae6c01f@web.de> (raw)
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
next prev parent reply other threads:[~2025-12-03 10:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 10:45 [PATCH 0/4] ban mktemp(3) René Scharfe
2025-12-03 10:51 ` [PATCH 1/4] wrapper: add git_mkdtemp() René Scharfe
2025-12-04 11:51 ` Chris Torek
2025-12-05 23:05 ` Junio C Hamano
2025-12-03 10:52 ` [PATCH 2/4] compat: use git_mkdtemp() René Scharfe
2025-12-03 16:11 ` Jeff King
2025-12-05 12:11 ` René Scharfe
2025-12-06 2:11 ` Jeff King
2025-12-05 23:05 ` Junio C Hamano
2025-12-03 10:52 ` René Scharfe [this message]
2025-12-03 10:53 ` [PATCH 4/4] banned.h: ban mktemp(3) René Scharfe
2025-12-03 16:12 ` Jeff King
2025-12-06 13:21 ` [PATCH v2 0/5] " René Scharfe
2025-12-06 13:27 ` [PATCH v2 1/5] wrapper: add git_mkdtemp() René Scharfe
2025-12-06 13:27 ` [PATCH v2 2/5] compat: use git_mkdtemp() René Scharfe
2025-12-06 13:28 ` [PATCH v2 3/5] compat: remove mingw_mktemp() René Scharfe
2025-12-06 13:29 ` [PATCH v2 4/5] banned.h: ban mktemp(3) René Scharfe
2025-12-06 13:35 ` [PATCH v2 5/5] compat: remove gitmkdtemp() René Scharfe
2025-12-08 20:33 ` [PATCH v2 0/5] ban mktemp(3) Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fdf6e8f3-d547-4331-95c7-75b44ae6c01f@web.de \
--to=l.s.r@web$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox