wrapper.c: remove unused gitmkstemps() function
The last call to the mkstemps() function was removed in commit 659488326 ("wrapper.c: delete dead function git_mkstemps()", 22-04-2016). In order to support platforms without mkstemps(), this functionality was provided, along with a Makefile build variable (NO_MKSTEMPS), by the gitmkstemps() function. Remove the dead code, along with the defunct build machinery. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones committed
Feb 28, 2017 at 01:26 UTC
b2d593a7797f4f9452e46f722e181604a5582897
5 files changed
-40
Makefile
-5
@@ -102,8 +102,6 @@ all::
102
#
103
# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
104
#
105
-# Define NO_MKSTEMPS if you don't have mkstemps in the C library.
106
-#
105
# Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd
106
# in the C library.
107
#
@@ -1280,9 +1278,6 @@ ifdef MKDIR_WO_TRAILING_SLASH
1278
COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH
1279
COMPAT_OBJS += compat/mkdir.o
1280
endif
1283
-ifdef NO_MKSTEMPS
1284
- COMPAT_CFLAGS += -DNO_MKSTEMPS
1285
-endif
1281
ifdef NO_UNSETENV
1282
COMPAT_CFLAGS += -DNO_UNSETENV
1283
COMPAT_OBJS += compat/unsetenv.o
config.mak.uname
-17
@@ -27,7 +27,6 @@ endif
27
ifeq ($(uname_S),Linux)
28
HAVE_ALLOCA_H = YesPlease
29
NO_STRLCPY = YesPlease
30
- NO_MKSTEMPS = YesPlease
30
HAVE_PATHS_H = YesPlease
31
LIBC_CONTAINS_LIBINTL = YesPlease
32
HAVE_DEV_TTY = YesPlease
@@ -41,7 +40,6 @@ endif
40
ifeq ($(uname_S),GNU/kFreeBSD)
41
HAVE_ALLOCA_H = YesPlease
42
NO_STRLCPY = YesPlease
44
- NO_MKSTEMPS = YesPlease
43
HAVE_PATHS_H = YesPlease
44
DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
45
LIBC_CONTAINS_LIBINTL = YesPlease
@@ -55,7 +53,6 @@ ifeq ($(uname_S),UnixWare)
53
SHELL_PATH = /usr/local/bin/bash
54
NO_IPV6 = YesPlease
55
NO_HSTRERROR = YesPlease
58
- NO_MKSTEMPS = YesPlease
56
BASIC_CFLAGS += -Kthread
57
BASIC_CFLAGS += -I/usr/local/include
58
BASIC_LDFLAGS += -L/usr/local/lib
@@ -79,7 +76,6 @@ ifeq ($(uname_S),SCO_SV)
76
SHELL_PATH = /usr/bin/bash
77
NO_IPV6 = YesPlease
78
NO_HSTRERROR = YesPlease
82
- NO_MKSTEMPS = YesPlease
79
BASIC_CFLAGS += -I/usr/local/include
80
BASIC_LDFLAGS += -L/usr/local/lib
81
NO_STRCASESTR = YesPlease
@@ -122,7 +118,6 @@ ifeq ($(uname_S),SunOS)
118
NO_STRCASESTR = YesPlease
119
NO_MEMMEM = YesPlease
120
NO_MKDTEMP = YesPlease
125
- NO_MKSTEMPS = YesPlease
121
NO_REGEX = YesPlease
122
NO_MSGFMT_EXTENDED_OPTIONS = YesPlease
123
HAVE_DEV_TTY = YesPlease
@@ -168,7 +163,6 @@ ifeq ($(uname_O),Cygwin)
163
NO_D_TYPE_IN_DIRENT = YesPlease
164
NO_STRCASESTR = YesPlease
165
NO_MEMMEM = YesPlease
171
- NO_MKSTEMPS = YesPlease
166
NO_SYMLINK_HEAD = YesPlease
167
NO_IPV6 = YesPlease
168
OLD_ICONV = UnfortunatelyYes
@@ -233,7 +227,6 @@ ifeq ($(uname_S),NetBSD)
227
BASIC_CFLAGS += -I/usr/pkg/include
228
BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
229
USE_ST_TIMESPEC = YesPlease
236
- NO_MKSTEMPS = YesPlease
230
HAVE_PATHS_H = YesPlease
231
HAVE_BSD_SYSCTL = YesPlease
232
endif
@@ -242,7 +235,6 @@ ifeq ($(uname_S),AIX)
235
NO_STRCASESTR = YesPlease
236
NO_MEMMEM = YesPlease
237
NO_MKDTEMP = YesPlease
245
- NO_MKSTEMPS = YesPlease
238
NO_STRLCPY = YesPlease
239
NO_NSEC = YesPlease
240
FREAD_READS_DIRECTORIES = UnfortunatelyYes
@@ -263,7 +255,6 @@ ifeq ($(uname_S),GNU)
255
# GNU/Hurd
256
HAVE_ALLOCA_H = YesPlease
257
NO_STRLCPY = YesPlease
266
- NO_MKSTEMPS = YesPlease
258
HAVE_PATHS_H = YesPlease
259
LIBC_CONTAINS_LIBINTL = YesPlease
260
endif
@@ -272,7 +263,6 @@ ifeq ($(uname_S),IRIX)
263
NO_UNSETENV = YesPlease
264
NO_STRCASESTR = YesPlease
265
NO_MEMMEM = YesPlease
275
- NO_MKSTEMPS = YesPlease
266
NO_MKDTEMP = YesPlease
267
# When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
268
# (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
@@ -291,7 +281,6 @@ ifeq ($(uname_S),IRIX64)
281
NO_UNSETENV = YesPlease
282
NO_STRCASESTR = YesPlease
283
NO_MEMMEM = YesPlease
294
- NO_MKSTEMPS = YesPlease
284
NO_MKDTEMP = YesPlease
285
# When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
286
# (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
@@ -311,7 +300,6 @@ ifeq ($(uname_S),HP-UX)
300
NO_SETENV = YesPlease
301
NO_STRCASESTR = YesPlease
302
NO_MEMMEM = YesPlease
314
- NO_MKSTEMPS = YesPlease
303
NO_STRLCPY = YesPlease
304
NO_MKDTEMP = YesPlease
305
NO_UNSETENV = YesPlease
@@ -352,7 +340,6 @@ ifeq ($(uname_S),Windows)
340
NO_ICONV = YesPlease
341
NO_STRTOUMAX = YesPlease
342
NO_MKDTEMP = YesPlease
355
- NO_MKSTEMPS = YesPlease
343
SNPRINTF_RETURNS_BOGUS = YesPlease
344
NO_SVN_TESTS = YesPlease
345
RUNTIME_PREFIX = YesPlease
@@ -402,7 +389,6 @@ ifeq ($(uname_S),Interix)
389
NO_MKDTEMP = YesPlease
390
NO_STRTOUMAX = YesPlease
391
NO_NSEC = YesPlease
405
- NO_MKSTEMPS = YesPlease
392
ifeq ($(uname_R),3.5)
393
NO_INET_NTOP = YesPlease
394
NO_INET_PTON = YesPlease
@@ -461,7 +447,6 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
447
NO_SETENV = YesPlease
448
NO_UNSETENV = YesPlease
449
NO_MKDTEMP = YesPlease
464
- NO_MKSTEMPS = YesPlease
450
# Currently libiconv-1.9.1.
451
OLD_ICONV = UnfortunatelyYes
452
NO_REGEX = YesPlease
@@ -503,7 +488,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))
488
NEEDS_LIBICONV = YesPlease
489
NO_STRTOUMAX = YesPlease
490
NO_MKDTEMP = YesPlease
506
- NO_MKSTEMPS = YesPlease
491
NO_SVN_TESTS = YesPlease
492
NO_PERL_MAKEMAKER = YesPlease
493
RUNTIME_PREFIX = YesPlease
@@ -584,7 +568,6 @@ ifeq ($(uname_S),QNX)
568
NO_ICONV = YesPlease
569
NO_MEMMEM = YesPlease
570
NO_MKDTEMP = YesPlease
587
- NO_MKSTEMPS = YesPlease
571
NO_NSEC = YesPlease
572
NO_PTHREADS = YesPlease
573
NO_R_TO_GCC_LINKER = YesPlease
configure.ac
-6
@@ -1050,12 +1050,6 @@ GIT_CHECK_FUNC(mkdtemp,
1050
[NO_MKDTEMP=YesPlease])
1051
GIT_CONF_SUBST([NO_MKDTEMP])
1052
#
1053
-# Define NO_MKSTEMPS if you don't have mkstemps in the C library.
1054
-GIT_CHECK_FUNC(mkstemps,
1055
-[NO_MKSTEMPS=],
1056
-[NO_MKSTEMPS=YesPlease])
1057
-GIT_CONF_SUBST([NO_MKSTEMPS])
1058
-#
1053
# Define NO_INITGROUPS if you don't have initgroups in the C library.
1054
GIT_CHECK_FUNC(initgroups,
1055
[NO_INITGROUPS=],
git-compat-util.h
-5
@@ -639,11 +639,6 @@ extern int gitsetenv(const char *, const char *, int);
639
extern char *gitmkdtemp(char *);
640
#endif
641
642
-#ifdef NO_MKSTEMPS
643
-#define mkstemps gitmkstemps
644
-extern int gitmkstemps(char *, int);
645
-#endif
646
-
642
#ifdef NO_UNSETENV
643
#define unsetenv gitunsetenv
644
extern void gitunsetenv(const char *);
wrapper.c
-7
@@ -514,13 +514,6 @@ int git_mkstemp_mode(char *pattern, int mode)
514
return git_mkstemps_mode(pattern, 0, mode);
515
}
516
517
-#ifdef NO_MKSTEMPS
518
-int gitmkstemps(char *pattern, int suffix_len)
519
-{
520
- return git_mkstemps_mode(pattern, suffix_len, 0600);
521
-}
522
-#endif
523
-
517
int xmkstemp_mode(char *template, int mode)
518
{
519
int fd;