apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Hudson <ghud...@MIT.EDU>
Subject Re: apr_file_mktemp broken on windows
Date Sun, 09 May 2004 18:36:28 GMT
In case rbb's forward was too cryptic, I think the chief problem is
that file_io/unix/mktemp.c:gettemp() (which is not generally used on
Unix since APR uses mkstemp() there) does a direct comparison with
APR_EEXIST instead of using APR_STATUS_IS_EEXIST.  So on Windows, APR
winds up returning a "file already exists" error instead of catching

It is also perhaps impolite to reseed the libc random number
generator.  And using GetTempFileName() might be more efficient in

(All of this is from c.a.t.'s reports and my own deductions about the
code; I don't have a Windows development environment to test
hypotheses with.)

View raw message