libtiff: * tools/fax2ps.c (main): Use tmpfile() rather than mkstemp() since

https://github.com/libsdl-org/libtiff/commit/25b9328e7466dfe8d1c80fbfa284c32f5ef327a6

From 25b9328e7466dfe8d1c80fbfa284c32f5ef327a6 Mon Sep 17 00:00:00 2001
From: Bob Friesenhahn <[EMAIL REDACTED]>
Date: Sat, 2 Apr 2011 19:18:11 +0000
Subject: [PATCH] * tools/fax2ps.c (main): Use tmpfile() rather than mkstemp()
 since it is much more portable.  Tmpfile is included in ISO/IEC 9899:1990 and
 the WIN32 CRT.

---
 ChangeLog      | 6 ++++++
 tools/fax2ps.c | 8 +++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1ac7deb3..bd1916f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-02  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
+
+	* tools/fax2ps.c (main): Use tmpfile() rather than mkstemp() since
+	it is much more portable.  Tmpfile is included in ISO/IEC
+	9899:1990 and the WIN32 CRT.
+
 2011-03-21  Frank Warmerdam  <warmerdam@pobox.com>
 
 	* libtiff/tiffiop.h: avoid declaring int64/uint64 on AIX with XLC
diff --git a/tools/fax2ps.c b/tools/fax2ps.c
index 21bbd853..27d9e9c0 100644
--- a/tools/fax2ps.c
+++ b/tools/fax2ps.c
@@ -1,4 +1,4 @@
-/* $Id: fax2ps.c,v 1.22.2.3 2010-12-14 03:17:22 faxguy Exp $" */
+/* $Id: fax2ps.c,v 1.22.2.4 2011-04-02 19:18:12 bfriesen Exp $" */
 
 /*
  * Copyright (c) 1991-1997 Sam Leffler
@@ -377,12 +377,10 @@ main(int argc, char** argv)
 	int n;
 	FILE* fd;
 	char buf[16*1024];
-	char temp[1024];
 
-	strcpy(temp, "/tmp/fax2psXXXXXX");
-	fd = fdopen(mkstemp(temp), "w+");
+	fd = tmpfile();
 	if (fd == NULL) {
-	    fprintf(stderr, "Could not create temp file \"%s\"\n", temp);
+	    fprintf(stderr, "Could not obtain temporary file.\n");
 	    exit(-2);
 	}
 #if defined(HAVE_SETMODE) && defined(O_BINARY)