[m-dev.] diff: delete unused autoconf test for tempnam()

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 21 00:37:33 AEDT 2000


Estimated hours taken: 0.25

configure.in:
runtime/mercury_conf.h.in:
	Delete the test for tempnam(), since we don't use it.
	(It's not part of the ANSI or POSIX standards, and
	the Linux man page says "Never use this function.",
	so we're unlikely to want it in the future either.)

Workspace: /home/pgrad/fjh/fs/hg/ws-hg4/mercury
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.232
diff -u -d -r1.232 configure.in
--- configure.in	2000/11/20 13:13:31	1.232
+++ configure.in	2000/11/20 13:24:14
@@ -1332,27 +1332,6 @@
 	AC_MSG_WARN(Unable to interpret return values from system)
 fi
 #-----------------------------------------------------------------------------#
-AC_MSG_CHECKING(for tempnam)
-AC_CACHE_VAL(mercury_cv_has_tempnam,
-	AC_TRY_RUN([
-	#include <stdio.h>
-	int main() {
-		char	*name;
-
-		name = tempnam("/tmp", "foobie");
-
-		exit(name == NULL);
-	}],
-	[mercury_cv_has_tempnam=yes],
-	[mercury_cv_has_tempnam=no],
-	[mercury_cv_has_tempnam=no])
-)
-AC_MSG_RESULT($mercury_cv_has_tempnam)
-if test "$mercury_cv_has_tempnam" = yes; then
-	AC_DEFINE(IO_HAVE_TEMPNAM)
-fi
-AC_SUBST(IO_HAVE_TEMPNAM)
-#-----------------------------------------------------------------------------#
 AC_MSG_CHECKING(to see if we can handle contexts blocking on IO)
 AC_CACHE_VAL(mercury_cv_can_do_pending_io,
 	AC_TRY_RUN([
Index: runtime/mercury_conf.h.in
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_conf.h.in,v
retrieving revision 1.32
diff -u -d -r1.32 mercury_conf.h.in
--- runtime/mercury_conf.h.in	2000/08/17 09:58:06	1.32
+++ runtime/mercury_conf.h.in	2000/11/20 13:24:02
@@ -280,13 +280,6 @@
 #undef	MR_LITTLE_ENDIAN
 
 /*
-** The following macro specifies whether the non-ANSI, non-POSIX,
-** but usually available standard library function `tempnam' is
-** available.
-*/
-#undef	IO_HAVE_TEMPNAM
-
-/*
 ** Which version of Mercury is this?  (Taken from the file ../VERSION.)
 */
 #define MR_VERSION "unknown"

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list