[Dune] Dune on Windows MinGW
Dr. Olaf Ippisch
olaf.ippisch at iwr.uni-heidelberg.de
Wed May 4 15:28:08 CEST 2011
Hi Oliver and Others,
here is the patch. It uses the Posix function tmpnam, which generates
the name of a temporary file. The differences between tmpnam and the
non-Posix function mkstemp used in the original function
temporaryFileName() are:
- the form of the file name can not be influenced, when calling tmpnam.
It just generates some unique filename.
- mkstemp also makes sure that the file is directly opened such that it
can not happen that another process opens a file with the same name in
the time between the call to the name-generating function and the call
to fopen. However, as the file is afterwards closed again in
temporaryFileName() and just the name (and not the file pointer)
returned, this advantage is lost anyhow.
I hope that this is acceptable and think this should be a sufficient
replacement (which also reduces the amount of code).
Regards,
Olaf
--
Dr. Olaf Ippisch
Universität Heidelberg
Interdisziplinäres Zentrum für Wissenschaftliches Rechnen
Im Neuenheimer Feld 368, Raum 4.24
Tel: 06221/548252 Fax: 06221/548884
Mail: Im Neuenheimer Feld 368, 69120 Heidelberg
e-mail: <olaf.ippisch at iwr.uni-heidelberg.de>
In physics the truth is rarely perfectly clear, and that is certainly
universally the case in human affairs. Hence, what is not surrounded
by uncertainty cannot be the truth. (Richard Feynman)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tempfile_patch
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110504/ffe8b987/attachment.ksh>
More information about the Dune
mailing list