Re: [GnomeMeeting-devel-list] pwlib cvs has gcc-4.1 problem



sean wrote:
> I'm trying to build yesterday's pwlib-cvs on fedora 5 test 1, which uses
> gcc-4.1.
> 
> g++ -D_REENTRANT -Wall  -O2 -fPIC -funswitch-loops
> -fvisibility-inlines-hidden -ftree-vectorize  -march=k8 -pipe
> -mfpmath=sse -DP_64BIT -fPIC -DPIC
> -I/usr/src/redhat/BUILD/pwlib-2006.01.05/include -O2 -fPIC
> -funswitch-loops   -march=k8   -pipe -mfpmath=sse -felide-constructors
> -x c++ -c svcproc.cxx -o
> /usr/src/redhat/BUILD/pwlib-2006.01.05/lib/obj_linux_x86_64_r/svcproc.o
> svcproc.cxx:349: error: invalid conversion from 'void*' to
> '__pthread_mutex_u*'
> svcproc.cxx:349: error: invalid conversion from 'void*' to
> '__pthread_mutex_u*'
> 
> 
> I assume this is some gcc language lawyer enforcing an obscure c++ rule,
> but I couldn't figure it out.
> 
> sean
> 

--- libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h.jj	2004-09-30 00:50:04.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h	2005-12-27 12:16:36.000000000 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub redhat com>, 2003.
 
@@ -45,7 +45,7 @@ typedef union
 
 /* Data structures for mutex handling.  The structure of the attribute
    type is not exposed on purpose.  */
-typedef union
+typedef union __pthread_mutex_u <------------
 {
   struct
   {
@@ -57,6 +57,9 @@ typedef union
        binary compatibility.  */
     int __kind;
     int __spins;
+    union __pthread_mutex_u *__next;
+    union __pthread_mutex_u *__prev;
+#define __PTHREAD_MUTEX_HAVE_PREV	1
   } __data;
   char __size[__SIZEOF_PTHREAD_MUTEX_T];
   long int __align;

...
#endif
#ifdef P_PTHREADS

static pthread_mutex_t logMutex = PTHREAD_MUTEX_INITIALIZER; X

#endif

...
not obscure.

explicit cast required (C-Style, but better in C++ <> Style) since the above change.

y
tom






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