libtool
[Top][All Lists]
Advanced

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

Re: ltdl.c and 1.4.1 (type conflicts)


From: Bruce Korb
Subject: Re: ltdl.c and 1.4.1 (type conflicts)
Date: Sat, 08 Sep 2001 01:49:35 -0700

Robert Collins wrote:
> 
> On Sat, 2001-09-08 at 13:31, Gary V. Vaughan wrote:
> > On Fri, Sep 07, 2001 at 02:45:11PM -0500, Tim Mooney wrote:
> > Phew!  Thanks for that info.
> >
> > I'm open to suggestions for a cleaner way to implement this, but I
> > think that it is an unavoidable weakness in C that forces one to (ab)use
> > void* in cases such as this.
> 
> I haven't checked the code in question, but if what youa re doing is
> returning a pointer to a function froma function, then typdef'ing a
> function pointer type and returning that should be a clean solution.
> 
> ie if the function type being passed around is
> int func(char *, int)
> 
> typedef int functype(char *, int);
> 
> functype *
> functionthatreturnspointertofunction()
> {
>  ...
> }

That's my preferred solution, too.  Unfortunately, libtool is _still_
trying to be K&R compatible, and ancient K&R won't let you typedef
procedures.  I believe also that it is well past time to punt
pre-ANSI compilers.  Anyone still stuck with such an antequated
system that they want to maintain as a hobby could also use their
hobby time to maintain some bootstrapping tools.  :-)  I don't
think serious development needs to be hobbled by K&R-isms anymore.



reply via email to

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