Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 4.1.0: mkstemp



Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx> typed:
: On Sat, 16 Jun 2001, Peter Stephenson wrote:
:> gcc has taken to complaining about using mktemp() instead of mkstemp().
: Since mkstemp() returns a file handle, not a file name, I reverted the
: code in util.c back to how it was.

Of course, given it's just about certain to be immediately clobbered by
the following lines . . . .
Peter did that around 10pm on a Friday night; he must have just come
back from the pub.  Oops :-)

....
+#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();
....

Regards,
-- 
Geoff Wing : <gcw@xxxxxxxxx>
Rxvt Stuff : <gcw@xxxxxxxx>
Zsh Stuff  : <gcw@xxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author