mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
e4dbabfe54
commit
a635cdb2cc
|
|
@ -1,3 +1,9 @@
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue