diff options
author | Ulrich Drepper <drepper@gmail.com> | 2012-02-26 17:41:17 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2012-02-26 17:41:17 -0500 |
commit | 4a3dded52708e6d9be190a968f0f09ca57539e13 (patch) | |
tree | f67735395e2b1e129760e57e090c5246acb766bc /nptl | |
parent | 4efeffc1d583597e4f52985b9747269e47b754e2 (diff) | |
download | glibc-4a3dded52708e6d9be190a968f0f09ca57539e13.zip glibc-4a3dded52708e6d9be190a968f0f09ca57539e13.tar.gz glibc-4a3dded52708e6d9be190a968f0f09ca57539e13.tar.bz2 |
Work around problem of pthread_attr_t definition with old compilers
Diffstat (limited to 'nptl')
6 files changed, 36 insertions, 12 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h index 437ef1f..1ce0bd0 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h @@ -35,11 +35,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union __pthread_attr pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif typedef struct __pthread_internal_slist diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h index 69bd97b..1761bf0 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -49,11 +49,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union __pthread_attr pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif #if __WORDSIZE == 64 diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h index d87a635..c64b14f 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h @@ -48,11 +48,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union __pthread_attr pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif #if __WORDSIZE == 64 diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h index 34b0792..a1ef92b 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h @@ -37,11 +37,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union __pthread_attr pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif typedef struct __pthread_internal_slist diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h index 2cfaadb..60f5d4d 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h @@ -49,11 +49,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union __pthread_attr pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif #if __WORDSIZE == 64 diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h index 7cbb200..0b0f939 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h @@ -48,11 +48,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union __pthread_attr { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union __pthread_attr pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif #if __WORDSIZE == 64 |