I assume that by 'race condition' you mean that any tests running in
parallel would both be using the same file (IIRC "test.dat").

If so, you could possibly revert your change and use the tmpnam()
function to set the filename to be used.

I don't know where the resulting file would be placed with GCC but on
Windows this will return a filename that is unique in the current
working directory, which would be likely to have the right access
permission.  However, the MS documentation simply says that

"tmpnam returns a name unique in the current working directory"

which suggests that this won't solve the race condition.

We could possibly maintain full c89 compatibility for GSL itself but
relax this requirement for these two tests and use mkstemp and the MSVC
equivalent (_mktemp or _mktemp_s) that seem to avoid the problem.

I cant test for these failures however as they don't occur for me as I
am running the build with admin privileges.

   best regards,

     Brian


Reply via email to