Make all fstream tests use tmpnam if creating files, rather than
hard-coded names.

llvm-svn: 135444
diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp
index 436344d..8860c9a 100644
--- a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp
+++ b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp
@@ -19,16 +19,18 @@
 
 int main()
 {
+    char temp[L_tmpnam];
+    tmpnam(temp);
     {
-        std::ofstream fs("test.dat");
+        std::ofstream fs(temp);
         std::filebuf* fb = fs.rdbuf();
         assert(fb->sputc('r') == 'r');
     }
-    remove("test.dat");
+    remove(temp);
     {
-        std::wofstream fs("test.dat");
+        std::wofstream fs(temp);
         std::wfilebuf* fb = fs.rdbuf();
         assert(fb->sputc(L'r') == L'r');
     }
-    remove("test.dat");
+    remove(temp);
 }