On 02/07/19 12:56 +0100, Jonathan Wakely wrote:
On 02/07/19 11:54 +0200, Eric Botcazou wrote:
Yes there are definitely still references to C++0x elsewhere in
libstdc++, especially in the testsuite, but let's not add new ones.
It's libgcc though, not libstdc++. And it's a bit inconvenient to have c++0x
on the one hand (gthr.h) and c++11 on the other hand (gthr-win32-thread.c); in
other words, consistency matters too.
Then I think we go with the attached patch to rename everything. This
could break out-of-tree ports that define __GTHREADS_CXX0X, if there
are any. We could consider making gthr.h do this after including
gthr-default.h:
#if defined __GTHREADS_CXX0X && ! defined __GTHREADS_CXX11
# warning "Define __GTHREADS_CXX11 instead of __GTHREADS_CXX0X"
# define __GTHREADS_CXX11 1
#endif
And with the patch this time ...
diff --git a/libgcc/config/gthr-rtems.h b/libgcc/config/gthr-rtems.h
index 912a0a5c08c..d0cac869c96 100644
--- a/libgcc/config/gthr-rtems.h
+++ b/libgcc/config/gthr-rtems.h
@@ -36,7 +36,7 @@ extern "C" {
#endif
#define __GTHREADS 1
-#define __GTHREADS_CXX0X 1
+#define __GTHREADS_CXX11 1
#define __GTHREAD_HAS_COND 1
typedef pthread_t __gthread_t;
diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h
index 88cbc23937e..e489724a3a4 100644
--- a/libgcc/gthr-posix.h
+++ b/libgcc/gthr-posix.h
@@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
Easy, since the interface is just one-to-one mapping. */
#define __GTHREADS 1
-#define __GTHREADS_CXX0X 1
+#define __GTHREADS_CXX11 1
#include <pthread.h>
diff --git a/libgcc/gthr.h b/libgcc/gthr.h
index 67826419882..d98f76ab3df 100644
--- a/libgcc/gthr.h
+++ b/libgcc/gthr.h
@@ -104,8 +104,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
number. If the operation is not supported, -1 is returned.
If the following are also defined, you should
- #define __GTHREADS_CXX0X 1
- to enable the c++0x thread library.
+ #define __GTHREADS_CXX11 1
+ to enable the c++11 thread library.
Types:
__gthread_t