summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-12-20 15:31:47 +0000
committerJim Meyering <jim@meyering.net>2004-12-20 15:31:47 +0000
commit93e3e8be0b3137ccda267944d7549dc6eb721325 (patch)
tree88ab3f2aebb16df40ecebb3e84fe6a1cbbfabc52 /m4
parentd0df6ec17dd10d1ecd72f7b72bd26c54fa9e37ce (diff)
downloadcoreutils-93e3e8be0b3137ccda267944d7549dc6eb721325.tar.xz
Rather than using "conftestXXXXXX" as the mkstemp
template, use a temporary directory and an 8.3-friendly template to avoid trouble on systems like DJGPP.
Diffstat (limited to 'm4')
-rw-r--r--m4/mkstemp.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4
index 82e1ce585..320e52092 100644
--- a/m4/mkstemp.m4
+++ b/m4/mkstemp.m4
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
# silly limit that it can create no more than 26 files from a given template.
@@ -15,6 +15,8 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
AC_CACHE_CHECK([for mkstemp limitations],
gl_cv_func_mkstemp_limitations,
[
+ mkdir conftest.mkstemp
+ cd conftest.mkstemp
AC_TRY_RUN([
# include <stdlib.h>
int main ()
@@ -22,7 +24,7 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
int i;
for (i = 0; i < 70; i++)
{
- char template[] = "conftestXXXXXX";
+ char template[] = "coXXXXXX.tmp";
int fd = mkstemp (template);
if (fd == -1)
exit (1);