[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Problem with ltdl.h
From: |
Bernard Dautrevaux |
Subject: |
RE: Problem with ltdl.h |
Date: |
Tue, 28 Nov 2000 18:52:55 +0100 |
> -----Original Message-----
> From: Kevin Atkinson [mailto:address@hidden
> Sent: Tuesday, November 28, 2000 9:01 AM
> To: address@hidden
> Subject: Re: Problem with ltdl.h
>
>
> On Tue, 28 Nov 2000, Kevin Atkinson wrote:
>
> >
> > I just updated to the latest CVS version of libtool and I
> noticed two
> > problems.
> >
> > 1) Even though I defined LT_NON_POSIX_NAMESPACE I still
> can't get lt_ptr_t
> > to work. After looking at the header file I discovered the
> really is
> > LT_FUBAR_NAMESPACE. Either the docs or the header files need to be
> > changed....
> >
> > 2) I keep on getting...
> > /usr/local/include/ltdl.h:143: conflicting types for
> `typedef struct
> > lt_dlhandle *lt_dlhandle'
> > /usr/local/include/ltdl.h:143: previous declaration as `struct
> > lt_dlhandle'
> >
> > I tried the affending line on egcs 1.1 gcc 2.95 and the gcc
> included in
> > RedHat 7.0 and all of them give the same error.
>
> I should add that this works with C code but not in C++ code.
>
Ooooh... Now I understand better: this diagnostic is due to the fact that in
C++
struct lt_dlhandle
automatically define a TYPENAME i.e. makes an implicit
typedef struct lt_dlhandle lt_dlhandle;
Then the explicit
typedef struct lt_dlhandle* lt_dlhandle;
defining the TYPENAME lt_dlhandle to be a pointer-to struct lt_dlhandle
creates a conflict.
I must say that although this is perfect C code, it's nevertheless highly
questionable... It's kinda
#define ADD(a, b) ((a) - (b))
^
|
This is not an error and was intentional to show some perfectly legal code
that I would never accept if a programmer do that in my team ;-0
To be coherent, either the explicit typedef should read
typedef struct lt_dlhandle* lt_dlhandle_ptr;
or
typedef struct lt_dlhandle* lt_dlhandle_handle;
or the struct name is not good and everything should read:
typedef struct lt_dl* lt_dlhandle;
but clearly here we have a naming problem :-)
I don't know from where this problem comes; I'm using a quite recent
CVS-libtool (from beginning of october I think) and do not have this
problem.
HTH
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: address@hidden
address@hidden
--------------------------------------------
- Problem with ltdl.h, Kevin Atkinson, 2000/11/28
- RE: Problem with ltdl.h,
Bernard Dautrevaux <=
- Re: Problem with ltdl.h, Alexandre Oliva, 2000/11/28
- Re: Problem with ltdl.h, Gary V. Vaughan, 2000/11/28
- Re: Problem with ltdl.h, Alexandre Oliva, 2000/11/28
- Re: Problem with ltdl.h, Kevin Atkinson, 2000/11/28
- Re: Problem with ltdl.h, Alexandre Oliva, 2000/11/28
- Re: Problem with ltdl.h, Gary V. Vaughan, 2000/11/29