From: redi Date: Sun, 24 Apr 2016 18:06:54 +0000 (+0000) Subject: libstdc++/70762 fix fallback implementation of nonexistent_path X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d082ff44c7d8448b8855c4931a2b74b8f8e285a6;p=thirdparty%2Fgcc.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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235395 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 386e83285285..e50b9ad26fc5 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 d2b3b1848ee9..f1e0bfcc252d 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;