]> git.ipfire.org Git - thirdparty/git.git/commitdiff
compat: remove gitmkdtemp()
authorRené Scharfe <l.s.r@web.de>
Sat, 6 Dec 2025 13:35:39 +0000 (14:35 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 Dec 2025 22:28:13 +0000 (07:28 +0900)
gitmkdtemp() has become a trivial wrapper around git_mkdtemp().  Remove
this now unnecessary layer of indirection.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
compat/mkdtemp.c [deleted file]
compat/posix.h
contrib/buildsystems/CMakeLists.txt
meson.build

index 7e0f77e2988e3b101dbf008a11b35cd0780d1aef..8f74b25fe7f9e97eb55312a8b1766a15f8391164 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1917,7 +1917,6 @@ ifdef NO_SETENV
 endif
 ifdef NO_MKDTEMP
        COMPAT_CFLAGS += -DNO_MKDTEMP
-       COMPAT_OBJS += compat/mkdtemp.o
 endif
 ifdef MKDIR_WO_TRAILING_SLASH
        COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH
diff --git a/compat/mkdtemp.c b/compat/mkdtemp.c
deleted file mode 100644 (file)
index fcdd4e0..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "../git-compat-util.h"
-
-char *gitmkdtemp(char *template)
-{
-       return git_mkdtemp(template);
-}
index 067a00f33b83f31ffabff5045c9bda1a9059dda2..245386fa4a9f4edd54402604583b25178bf6ea20 100644 (file)
@@ -329,8 +329,7 @@ int gitsetenv(const char *, const char *, int);
 #endif
 
 #ifdef NO_MKDTEMP
-#define mkdtemp gitmkdtemp
-char *gitmkdtemp(char *);
+#define mkdtemp git_mkdtemp
 #endif
 
 #ifdef NO_UNSETENV
index edb0fc04ad76494d8f2ab76f8b5359e54742c90c..b84d8a7c762f066751148ee0f33ac3627f5ea83f 100644 (file)
@@ -411,10 +411,6 @@ if(NOT HAVE_SETENV)
        list(APPEND compat_SOURCES compat/setenv.c)
 endif()
 
-if(NOT HAVE_MKDTEMP)
-       list(APPEND compat_SOURCES compat/mkdtemp.c)
-endif()
-
 if(NOT HAVE_PREAD)
        list(APPEND compat_SOURCES compat/pread.c)
 endif()
index 1f95a06edb78297bee870b181e2878320c153dd4..4a42e783b1bb77806fa7ed0ac1424bb585eefc86 100644 (file)
@@ -1401,7 +1401,7 @@ checkfuncs = {
   'strlcpy' : ['strlcpy.c'],
   'strtoull' : [],
   'setenv' : ['setenv.c'],
-  'mkdtemp' : ['mkdtemp.c'],
+  'mkdtemp' : [],
   'initgroups' : [],
   'strtoumax' : ['strtoumax.c', 'strtoimax.c'],
   'pread' : ['pread.c'],