Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 4.1.0: mkstemp
- X-seq: zsh-workers 14944
- From: mason@xxxxxxxxxxxxxxx (Geoff Wing)
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: 4.1.0: mkstemp
- Date: Sat, 16 Jun 2001 06:48:17 +0000 (UTC)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: PrimeNet Computer Consultants
- References: <20010615231436.CD4541428B@xxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.33L2.0106151654030.8874-100000@xxxxxxxxxxxxxxx>
- Reply-to: mason@xxxxxxxxxxxxxxx
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