bug-mailutils
[Top][All Lists]
Advanced

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

Re: Compile failure


From: Alain Magloire
Subject: Re: Compile failure
Date: Wed, 13 Dec 2000 12:32:58 -0500 (EST)

> 
> On Wed, Dec 13, 2000 at 10:49:11AM -0500, Alain Magloire wrote:
> > > 
> > > I'm getting the following, and have no idea where to start debugging it:
> > 
> > do a cvs update to get a new mailbox/include/misc.h
> > and in your config.h make sure that HAVE_PTHREAD_H is undef.
> > and WITH_PTHREAD is als not define.
> 
> cvs update didn't help.

8-)
You are right, it will clash everywhere I do a
#ifdef HAVE_PTHREAD_H
#  define __USE_UNIX98
#  include <pthread.h>
#endif

> #undef HAVE_PTHREAD_H did the job, though.

Yes,

> I added a flag to configure to handle this.  It seems to send some other 
> things funny though, so I'll look at that later.  (./configure 
> --disable-pthread)

Ok, I see what you're doing.  Actually the default should rather
be to not compile with Threading support but to allow it when passing
--with-pthread.  IMO it should be the opposite, but many OSes seem not
to have a good POSIX threading package.

I'm suggesting this:
./configure --with-pthread
provide an stub implementation of read_write locks base
of minimal pthread semantics(condvar and mutex) in mailutils/lib/rwlock.c

--with-pthread will check for -lpthread, <pthread.h>, etc ... and set
AC_DEFINE(HAVE_PTHREAD_H)
AC_DEFINE(WITH_PTHREAD)
AC_DEFINE(HAVE_PTHREAD_RWLOCK_INIT)
etc ...

I see if I can clear this out tonight.


> > To get those definitions I had to set
> > #define __USE_UNIX98
> > before every 
> > #include <pthread.h>
> > 
....
> > What box are you using ?
> 
> Debian Unstable - Glibc "2.2-5".  It's a cvs snapshot after 2.2 was released.
> 
> > > /usr/include/pthread.h:435: parse error before `*'
> 
> These errors in the pthread.h start right after:
> 
> #ifdef __USE_UNIX98
> /* Functions for handling read-write locks.  */


This looks like a bug in the include files<pthread.h>, the idea was to let
one pick different namespaces(implementations) there was a lot of
noise in the glibc list about this and that it was a bad thing.


-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!




reply via email to

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