On 17/01/25 00:01 +0800, yxj-github-437 wrote:
I notice std::timespec and std::timespec_get are used in preprocessor
condition _GLIBCXX_HAVE_TIMESPEC_GET. So in module std, it should be
the same.
libstdc++-v3:
* src/c++23/std-clib.cc.in: move std::timespec in preprocessor
condition _GLIBCXX_HAVE_TIMESPEC_GET
Thanks for the patch, it looks correct so I'll push it.
This patch is also small enough that we don't need a copyright
assignment, and as with r15-7180-g3469d0f6eaa625 I will use
yxj-github-437 as the Git commit author.
For future patches to libstdc++, please CC the libstdc++ mailing list
as well as the gcc-patches list. Otherwise, I might not see the patch
to review it.
Thanks again.
---
libstdc++-v3/src/c++23/std-clib.cc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/src/c++23/std-clib.cc.in
b/libstdc++-v3/src/c++23/std-clib.cc.in
index 6809ad229d7..10fc03e7ce0 100644
--- a/libstdc++-v3/src/c++23/std-clib.cc.in
+++ b/libstdc++-v3/src/c++23/std-clib.cc.in
@@ -585,9 +585,9 @@ export C_LIB_NAMESPACE
using std::strftime;
using std::time;
using std::time_t;
- using std::timespec;
using std::tm;
#ifdef _GLIBCXX_HAVE_TIMESPEC_GET
+ using std::timespec;
using std::timespec_get;
#endif
}
--
2.43.0