[Dune] Dune on Windows MinGW

Christian Engwer christian.engwer at uni-muenster.de
Wed May 4 16:39:15 CEST 2011


On Wed, May 04, 2011 at 04:21:24PM +0200, Martin Nolte wrote:
> Hi Olaf,
> 
> thanks a lot for the patch. I just committed a slight variant (still having
> the method and including correct headers). We should notice that the man-pages
> decourage the use of this function though (maybe due to not opening the file).

The problem of not opening the file was present already in the
previous version, as the file was closed again and it might be
possible that an other process tries to create the file in the
meantime. So I don't think we have lost anything.

Christian

> Best,
> 
> Martin
> 
> On 05/04/2011 03:28 PM, Dr. Olaf Ippisch wrote:
> > 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
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Dune mailing list
> > Dune at dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune
> 
> -- 
> Martin Nolte <nolte at mathematik.uni-freiburg.de>
> 
> Universität Freiburg                                   phone: +49-761-203-5630
> Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
> Hermann-Herder-Straße 10
> 79104 Freiburg, Germany
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune




More information about the Dune mailing list