diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-04-24 19:06:54 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-04-24 19:06:54 +0100 |
commit | a635cdb2cc8079c72ffece4f5614244cf78b10a2 (patch) | |
tree | 515991c8e2634d624026c88e67c66e49415dc2f6 | |
parent | e4dbabfe548d2d0c3e4bd7b327e431d8c28300cc (diff) | |
download | gcc-a635cdb2cc8079c72ffece4f5614244cf78b10a2.zip gcc-a635cdb2cc8079c72ffece4f5614244cf78b10a2.tar.gz gcc-a635cdb2cc8079c72ffece4f5614244cf78b10a2.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/util/testsuite_fs.h | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 386e832..e50b9ad 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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 diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h index d2b3b18..f1e0bfc 100644 --- a/libstdc++-v3/testsuite/util/testsuite_fs.h +++ b/libstdc++-v3/testsuite/util/testsuite_fs.h @@ -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; |