Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Work around problem of pthread_attr_t definition with old compilers
  • Loading branch information
Ulrich Drepper committed Feb 26, 2012
1 parent 4efeffc commit 4a3dded
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 14 deletions.
8 changes: 6 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions sysdeps/unix/sysv/linux/bits/siginfo.h
Expand Up @@ -270,7 +270,10 @@ enum
# endif

/* Forward declaration. */
# ifndef __have_pthread_attr_t
typedef union __pthread_attr pthread_attr_t;
# define __have_pthread_attr_t 1
# endif

typedef struct sigevent
{
Expand Down
8 changes: 7 additions & 1 deletion sysdeps/unix/sysv/linux/s390/bits/siginfo.h
Expand Up @@ -271,6 +271,12 @@ enum
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
# endif

/* Forward declaration. */
# ifndef __have_pthread_attr_t
typedef union __pthread_attr pthread_attr_t;
# define __have_pthread_attr_t 1
# endif

typedef struct sigevent
{
sigval_t sigev_value;
Expand All @@ -288,7 +294,7 @@ typedef struct sigevent
struct
{
void (*_function) (sigval_t); /* Function to start. */
void *_attribute; /* Really pthread_attr_t. */
pthread_attr_t *_attribute; /* Thread attributes. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
Expand Down
8 changes: 7 additions & 1 deletion sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
Expand Up @@ -278,6 +278,12 @@ enum
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
# endif

/* Forward declaration. */
# ifndef __have_pthread_attr_t
typedef union __pthread_attr pthread_attr_t;
# define __have_pthread_attr_t 1
# endif

typedef struct sigevent
{
sigval_t sigev_value;
Expand All @@ -295,7 +301,7 @@ typedef struct sigevent
struct
{
void (*_function) (sigval_t); /* Function to start. */
void *_attribute; /* Really pthread_attr_t. */
pthread_attr_t *_attribute; /* Thread attributes. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
Expand Down

0 comments on commit 4a3dded

Please sign in to comment.