From: Jonathan Wakely Date: Sun, 24 Apr 2016 18:06:54 +0000 (+0100) Subject: libstdc++/70762 fix fallback implementation of nonexistent_path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a635cdb2cc8079c72ffece4f5614244cf78b10a2;p=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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 386e8328528..e50b9ad26fc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2016-04-24 Jonathan Wakely + + 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 PR libstdc++/70745 diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h index d2b3b1848ee..f1e0bfcc252 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;