diff options
| author | René Scharfe <l.s.r@web.de> | 2025-12-06 14:35:39 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-07 07:28:13 +0900 |
| commit | 10bba537c4c23e713af05be700748c6a3c25bf68 (patch) | |
| tree | 9e44219440812ba75fcf3510c31812ded3de7134 | |
| parent | 7bef658135944d26acf3e1ec9316ca11f4369cf8 (diff) | |
| download | git-10bba537c4c23e713af05be700748c6a3c25bf68.tar.xz | |
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>
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | compat/mkdtemp.c | 6 | ||||
| -rw-r--r-- | compat/posix.h | 3 | ||||
| -rw-r--r-- | contrib/buildsystems/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | meson.build | 2 |
5 files changed, 2 insertions, 14 deletions
@@ -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 index fcdd4e01e1..0000000000 --- a/compat/mkdtemp.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "../git-compat-util.h" - -char *gitmkdtemp(char *template) -{ - return git_mkdtemp(template); -} diff --git a/compat/posix.h b/compat/posix.h index 067a00f33b..245386fa4a 100644 --- a/compat/posix.h +++ b/compat/posix.h @@ -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 diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index edb0fc04ad..b84d8a7c76 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -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() diff --git a/meson.build b/meson.build index 1f95a06edb..4a42e783b1 100644 --- a/meson.build +++ b/meson.build @@ -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'], |
