public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: cast getpid result
@ 2022-07-05 5:51 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2022-07-05 5:51 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:85049bb3b10529d7a5bae3e50a919299949ab4ea
commit 85049bb3b10529d7a5bae3e50a919299949ab4ea
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Jul 5 02:49:39 2022 -0300
libstdc++: testsuite: cast getpid result
On vxworks, in kernel mode, getpid's return type is a pointer type, so
std::to_string on it fails overload resolution. Restore the type cast
from the original patch that suggested adding the pid.
for libstdc++/ChangeLog
* testsuite/util/testsuite_fs.h (nonexistent_path): Convert
the getpid result to an integral type.
Diff:
---
libstdc++-v3/testsuite/util/testsuite_fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h
index 908fcdbcaee..25f8f734dc7 100644
--- a/libstdc++-v3/testsuite/util/testsuite_fs.h
+++ b/libstdc++-v3/testsuite/util/testsuite_fs.h
@@ -163,7 +163,7 @@ namespace __gnu_test
file.resize(64);
// The combination of random counter and PID should be unique for a given
// run of the testsuite.
- file += std::to_string(::getpid());
+ file += std::to_string((unsigned long) ::getpid());
p = std::move(file);
if (test_fs::exists(p))
throw test_fs::filesystem_error("Failed to generate unique pathname", p,
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: cast getpid result
@ 2022-07-05 6:07 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2022-07-05 6:07 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:dc52f32eb010e2eede0e022836ae00898ccce3fb
commit dc52f32eb010e2eede0e022836ae00898ccce3fb
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Jul 5 03:05:01 2022 -0300
libstdc++: testsuite: cast getpid result
On vxworks, in kernel mode, getpid's return type is a pointer type, so
std::to_string on it fails overload resolution. Restore the type cast
from the original patch that suggested adding the pid.
for libstdc++/ChangeLog
* testsuite/util/testsuite_fs.h (nonexistent_path): Convert
the getpid result to an integral type.
Diff:
---
libstdc++-v3/testsuite/util/testsuite_fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h
index 908fcdbcaee..25f8f734dc7 100644
--- a/libstdc++-v3/testsuite/util/testsuite_fs.h
+++ b/libstdc++-v3/testsuite/util/testsuite_fs.h
@@ -163,7 +163,7 @@ namespace __gnu_test
file.resize(64);
// The combination of random counter and PID should be unique for a given
// run of the testsuite.
- file += std::to_string(::getpid());
+ file += std::to_string((unsigned long) ::getpid());
p = std::move(file);
if (test_fs::exists(p))
throw test_fs::filesystem_error("Failed to generate unique pathname", p,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-05 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 5:51 [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: cast getpid result Alexandre Oliva
2022-07-05 6:07 Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).