Commit a635cdb2 by Jonathan Wakely Committed by Jonathan Wakely

libstdc++/70762 fix fallback implementation of nonexistent_path

	PR libstdc++/70762
	* testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path): Use
	static counter to return a different path on every call.

From-SVN: r235395
parent e4dbabfe
2016-04-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70762
* testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path): Use
static counter to return a different path on every call.
2016-04-22 Tim Shen <timshen@google.com>
PR libstdc++/70745
......
......@@ -83,11 +83,13 @@ namespace __gnu_test
p = tmp;
#else
char buf[64];
static int counter;
#if _GLIBCXX_USE_C99_STDIO
std::snprintf(buf, 64, "filesystem-ts-test.%lu", (unsigned long)::getpid());
std::snprintf(buf, 64,
#else
std::sprintf(buf, "filesystem-ts-test.%lu", (unsigned long)::getpid());
std::sprintf(buf,
#endif
"filesystem-ts-test.%d.%lu", counter++, (unsigned long) ::getpid());
p = buf;
#endif
return p;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment