Index: dgfparser/parser.hh
===================================================================
--- dgfparser/parser.hh	(Revision 7622)
+++ dgfparser/parser.hh	(Arbeitskopie)
@@ -117,8 +117,6 @@
 
     std::vector< double > & getVtxParam ( int i, std::vector< double > & coord );
 
-    static std::string temporaryFileName ();
-
     // dimension of world and problem: set through the readDuneGrid() method
     int dimw, dimgrid;
 
Index: dgfparser/dgfparser.cc
===================================================================
--- dgfparser/dgfparser.cc	(Revision 7622)
+++ dgfparser/dgfparser.cc	(Arbeitskopie)
@@ -615,7 +615,10 @@
   if( para.hasfile() ) // a triangle/tetgen file is provided
     name = para.filename();
   else if( tempFile ) // we have no dump file name and no triangle/tetgen file -> use temporary file
-    name = temporaryFileName();
+  {
+    char namebuffer[L_tmpnam]; // supply buffer to make it thread safe
+    name = tmpnam(namebuffer);
+  }
 
   std::string suffix;
   std::string params;
@@ -1075,31 +1078,4 @@
     return vtxParams[i];
   }
 
-  inline std::string
-  DuneGridFormatParser::temporaryFileName ()
-  {
-    const std::string tempname( "TMPDGFParser.XXXXXX" );
-
-#ifdef P_tmpdir
-    const std::string fulltempname = std::string( P_tmpdir ) + "/" + tempname;
-#else
-    const std::string fulltempname = std::string( "./" ) + tempname;
-#endif
-
-    char filetemp[ FILENAME_MAX ];
-    std::strncpy( filetemp, fulltempname.c_str(), FILENAME_MAX );
-    const int fd = mkstemp( filetemp );
-    if( fd < 0 )
-    {
-      std::strncpy( filetemp, fulltempname.c_str(), FILENAME_MAX );
-      const int fd = mkstemp( filetemp );
-      if ( fd < 0 )
-        DUNE_THROW( IOError, "Unable to create temporary file: " +
-                    std::string( filetemp ) );
-    }
-    close( fd );
-    remove( filetemp ); 
-    return std::string( filetemp );
-  }
-
 } // end namespace Dune
