zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: 4.1.0: mkstemp
@ 2001-06-15 23:14 Peter Stephenson
  2001-06-15 23:56 ` Wayne Davison
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2001-06-15 23:14 UTC (permalink / raw)
  To: Zsh hackers list

gcc has taken to complaining about using mktemp() instead of mkstemp().

Index: zshconfig.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v
retrieving revision 1.5
diff -u -r1.5 zshconfig.ac
--- zshconfig.ac	2001/06/08 18:34:53	1.5
+++ zshconfig.ac	2001/06/15 22:10:13
@@ -915,7 +915,7 @@
 	       readlink faccessx fchdir ftruncate \
 	       fstat lstat lchown \
 	       fseeko ftello \
-	       mkfifo _mktemp \
+	       mkfifo _mktemp mkstemp \
 	       waitpid wait3 \
 	       sigaction sigblock sighold sigrelse sigsetmask sigprocmask \
 	       killpg setpgid setpgrp tcsetpgrp tcgetattr nice \
Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.33
diff -u -r1.33 utils.c
--- Src/utils.c	2001/06/09 18:06:32	1.33
+++ Src/utils.c	2001/06/15 22:10:21
@@ -1101,11 +1101,14 @@
     if (!(s = getsparam("TMPPREFIX")))
 	s = DEFAULT_TMPPREFIX;
  
+#ifdef HAVE_MKSTEMP
+    ret = ((char *) mkstemp(dyncat(unmeta(s), "XXXXXX")));
 #ifdef HAVE__MKTEMP
     /* Zsh uses mktemp() safely, so silence the warnings */
     ret = ((char *) _mktemp(dyncat(unmeta(s), "XXXXXX")));
 #else
     ret = ((char *) mktemp(dyncat(unmeta(s), "XXXXXX")));
+#endif
 #endif
     unqueue_signals();
 

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-06-16  6:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-15 23:14 PATCH: 4.1.0: mkstemp Peter Stephenson
2001-06-15 23:56 ` Wayne Davison
2001-06-16  3:07   ` Bart Schaefer
2001-06-16  6:24     ` Wayne Davison
2001-06-16  6:48   ` Geoff Wing

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).