This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: bits/siginfo.h, bits/pthreadtypes.h updates
I've applied further ARM and MIPS changes corresponding to libc fixes for
further issues discovered with the pthread_attr_t changes. The union tag
needs to be pthread_attr_t to avoid breaking C++ name mangling (note that
as per <http://sourceware.org/ml/libc-alpha/2012-02/msg00659.html> the
libc copies of pthreadtypes.h have yet to have this issue fixed) and the
typedef must be conditional to avoid duplicate typedefs with older
compilers (or non-GCC compilers with the installed headers). Ports will
all need updating for these issues along with the previous fixes. (m68k
has been fixed for the union tag issue, but not yet for avoiding duplicate
typedefs.)
There are still further libc build problems with the latest changes being
discussed on #glibc, in addition to the union tag issue.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 7d23c11..982699c 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2012-02-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
+ (pthread_attr_t): Change union tag to pthread_attr_t. Only define
+ typedef if not already defined.
+
2012-02-26 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Name
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 9442105..3198ace 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,12 @@
+2012-02-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (pthread_attr_t):
+ Change union tag to pthread_attr_t. Only define typedef if not
+ already defined.
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+ (pthread_attr_t): Change union tag to pthread_attr_t. Only define
+ typedef if not already defined.
+
2012-02-26 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Don't name
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
index c75a506..bb186ae 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
@@ -38,11 +38,15 @@
typedef unsigned long int pthread_t;
-typedef union __pthread_attr
+union pthread_attr_t
{
char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align;
-} pthread_attr_t;
+};
+#ifndef __have_pthread_attr_t
+typedef union pthread_attr_t pthread_attr_t;
+# define __have_pthread_attr_t 1
+#endif
typedef struct __pthread_internal_slist
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 3d776e2..19975fb 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -274,7 +274,10 @@ enum
# endif
/* Forward declaration. */
-typedef union __pthread_attr pthread_attr_t;
+# ifndef __have_pthread_attr_t
+typedef union pthread_attr_t pthread_attr_t;
+# define __have_pthread_attr_t 1
+# endif
typedef struct sigevent
{
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
index 87a25da..a479f2d 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
@@ -50,11 +50,15 @@
typedef unsigned long int pthread_t;
-typedef union __pthread_attr
+union pthread_attr_t
{
char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align;
-} pthread_attr_t;
+};
+#ifndef __have_pthread_attr_t
+typedef union pthread_attr_t pthread_attr_t;
+# define __have_pthread_attr_t 1
+#endif
#if _MIPS_SIM == _ABI64
--
Joseph S. Myers
joseph@codesourcery.com