[texinfo-pretest] [bug-gnulib] bug in gl_FUNC_MKSTEMP

Stepan Kasal kasal at ucw.cz
Mon Dec 20 04:41:26 EST 2004


Hello,
  the texinfo bug report cited below has inspired me to the following two
bug reports:

1) gl_FUNC_MKSTEMP in m4/mkstemp.m4 should clean up the temporary files.
Would the patch attached to this mail be OK?

2) Why does the template use the long prefix "conftest"?  Shouldn't we use
2-4 letter prefix, as suggested in the comment to the source to AS_TMPDIR
in autoconf/lib/m4sugar/m4sh.m4 ?

Yours,
	Stepan Kasal

----------
From: "Juan Manuel Guerrero" <st001906 at hrz1.hrz.tu-darmstadt.de>
To: texinfo-pretest at texinfo.org
Date: Fri, 17 Dec 2004 20:28:48 +0200
Subject: [texinfo-pretest] djgpp specific patch for 4.7.92

Here one more djgpp specific adjustment.

Regards,
Juan M. Guerrero

2004-12-17  Juan M. Guerrero  <st001906 at hrz1.hrz.tu-darmstadt.de>

	* djgpp/config.bat: remove files like coXXXXXX.tmp created
	in the top_srcdir by the gl_FUNC_MKSTEMP test.

diff -apruNU5 texinfo-4.7.92.orig/djgpp/config.bat texinfo-4.7.92/djgpp/config.bat
--- texinfo-4.7.92.orig/djgpp/config.bat	2002-09-26 22:01:10.000000000 +0000
+++ texinfo-4.7.92/djgpp/config.bat	2004-12-17 03:48:10.000000000 +0000
@@ -204,10 +204,13 @@ echo --disable-nls >> arguments
 :configure_package
 echo Running the ./configure script...
 sh ./configure @arguments
 if errorlevel 1 goto cfg_error
 rm arguments
+
+Rem Remove files created by the gl_FUNC_MKSTEMP test.
+rm co*.tmp
 echo Done.
 goto End
 
 :sed_error
 echo ./configure script editing failed!
----- End forwarded message -----
-------------- next part --------------
2004-12-20  Stepan Kasal  <kasal at ucw.cz>

	* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Change the template to
	  ``conftestXXXXXX.tmp'' and remove the files at the end.

Index: m4/mkstemp.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/mkstemp.m4,v
retrieving revision 1.11
diff -u -r1.11 mkstemp.m4
--- m4/mkstemp.m4	20 Apr 2004 09:05:49 -0000	1.11
+++ m4/mkstemp.m4	20 Dec 2004 09:33:15 -0000
@@ -22,7 +22,7 @@
 	    int i;
 	    for (i = 0; i < 70; i++)
 	      {
-		char template[] = "conftestXXXXXX";
+		char template[] = "conftestXXXXXX.tmp";
 		int fd = mkstemp (template);
 		if (fd == -1)
 		  exit (1);
@@ -35,6 +35,7 @@
 	gl_cv_func_mkstemp_limitations=yes,
 	gl_cv_func_mkstemp_limitations=yes
 	)
+	rm -f conftest*.tmp
       ]
     )
   fi


More information about the texinfo-pretest mailing list