Remove checks for strict POSIX mkdtemp()
We needed a mkdtemp() that accepted template paths that did not end in XXXXXX a long time ago for KRB4, but that code is long deprecated. We no longer need to replace mkdtemp() for strictly following POSIX. ok dtucker@
This commit is contained in:
parent
492d70e18b
commit
33267feaff
28
configure.ac
28
configure.ac
|
@ -2288,34 +2288,6 @@ if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "x
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl see whether mkstemp() requires XXXXXX
|
|
||||||
if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
|
|
||||||
AC_MSG_CHECKING([for (overly) strict mkstemp])
|
|
||||||
AC_RUN_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM([[
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
]], [[
|
|
||||||
char template[]="conftest.mkstemp-test";
|
|
||||||
if (mkstemp(template) == -1)
|
|
||||||
exit(1);
|
|
||||||
unlink(template);
|
|
||||||
exit(0);
|
|
||||||
]])],
|
|
||||||
[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
],
|
|
||||||
[
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE([HAVE_STRICT_MKSTEMP], [1], [Silly mkstemp()])
|
|
||||||
],
|
|
||||||
[
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE([HAVE_STRICT_MKSTEMP])
|
|
||||||
]
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl make sure that openpty does not reacquire controlling terminal
|
dnl make sure that openpty does not reacquire controlling terminal
|
||||||
if test ! -z "$check_for_openpty_ctty_bug"; then
|
if test ! -z "$check_for_openpty_ctty_bug"; then
|
||||||
AC_MSG_CHECKING([if openpty correctly handles controlling tty])
|
AC_MSG_CHECKING([if openpty correctly handles controlling tty])
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
|
#if !defined(HAVE_MKDTEMP)
|
||||||
|
|
||||||
#define MKTEMP_NAME 0
|
#define MKTEMP_NAME 0
|
||||||
#define MKTEMP_FILE 1
|
#define MKTEMP_FILE 1
|
||||||
|
@ -138,4 +138,4 @@ mkdtemp(char *path)
|
||||||
return(error ? NULL : path);
|
return(error ? NULL : path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
|
#endif /* !defined(HAVE_MKDTEMP) */
|
||||||
|
|
|
@ -122,7 +122,7 @@ void strmode(int mode, char *p);
|
||||||
char *strptime(const char *buf, const char *fmt, struct tm *tm);
|
char *strptime(const char *buf, const char *fmt, struct tm *tm);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
|
#if !defined(HAVE_MKDTEMP)
|
||||||
int mkstemps(char *path, int slen);
|
int mkstemps(char *path, int slen);
|
||||||
int mkstemp(char *path);
|
int mkstemp(char *path);
|
||||||
char *mkdtemp(char *path);
|
char *mkdtemp(char *path);
|
||||||
|
|
Loading…
Reference in New Issue