compat: remove gitmkdtemp()

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>
This commit is contained in:
René Scharfe
2025-12-06 14:35:39 +01:00
committed by Junio C Hamano
parent 7bef658135
commit 10bba537c4
5 changed files with 2 additions and 14 deletions

View File

@@ -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

View File

@@ -1,6 +0,0 @@
#include "../git-compat-util.h"
char *gitmkdtemp(char *template)
{
return git_mkdtemp(template);
}

View 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

View 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()

View 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'],