On Wed, Mar 16, 2011 at 23:50, FX <fxcoud...@gmail.com> wrote:
>> If M$ mktemp when already 26 files exist with the same prefix at least
>> properly fails, then it would be better to just retry with a changed prefix
>> if it fails.
>
>
> Done exactly that. Manually tested on i586-pc-mingw32, regtested on 
> x86_64-linux by editing config.h to fake the absence of mkstemp(). OK for 
> trunk?

Some minor nits:

- Use the type size_t for tempdirlen as that is the return type of
strlen() and argument type for get_mem().

- You can use a const size_t variable for the length of the string
"slash" rather than calling strlen() in the do-while loop.

- Don't set errno as we anyway loop until we successfully open a file
with O_CREAT|O_EXCL.

With these changes, Ok for trunk (4.7, that is).

-- 
Janne Blomqvist

Reply via email to