bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug: Compaq C Compiler and later glibc pthreadtypes.h


From: Robert E. Parrott
Subject: bug: Compaq C Compiler and later glibc pthreadtypes.h
Date: Wed, 03 Sep 2003 19:56:10 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)


There is a naming conflict with newer versions of glibc and the Compaq C Compiler on alpha linux (and Tru64 too, I believe).

Essentially, for this compiler on linux and Tru64 (from which the linux version is ported), there is an "__align" keyword. However, for newer versions of the glibc, the include file /usr/include/bits/pthreadtypes.h defines a struct "pthread_cond_t" that has a field with name "__align" ( a reserved word for ccc):

----------------------------------------------------------------------------------------
/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */

#ifdef __GLIBC_HAVE_LONG_LONG
__extension__ typedef long long __pthread_cond_align_t;
#else
typedef long __pthread_cond_align_t;
#endif

typedef struct
{
 struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
 _pthread_descr __c_waiting;        /* Threads waiting on this condition */
 char __padding[48 - sizeof (struct _pthread_fastlock)
- sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
 __pthread_cond_align_t __align;
} pthread_cond_t;

------------------------------------------------------------------------------------------
By changing the name of this element manually, I can get fftw to compile with the ccc compiler.

This change, it appears, may be traced to Jakub Jelinek <address@hidden> in January 2003; a relevant posting is:

http://sources.redhat.com/ml/libc-hacker/2003-01/msg00006.html

By way of background, the compaq compilers are provided as rpms for older versions of RedHat for Alpha systems. The only up-to-date distribution for alpha seems to be Debian, which has this problem for Woody and newer (I'm using unstable at this point). Since the older Compaq compiler RPMS don't easily install for later version of Debian, the error may not be very common.


Can you suggest any workarounds besides editing the include file manually?

thanx,

rob









reply via email to

[Prev in Thread] Current Thread [Next in Thread]