confuse-devel
[Top][All Lists]
Advanced

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

Re: [Confuse-devel] Fwd: Small patches for const/shared


From: Nathan Phillip Brink
Subject: Re: [Confuse-devel] Fwd: Small patches for const/shared
Date: Fri, 8 Oct 2010 12:02:59 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

> > ---------- Weitergeleitete Nachricht ----------
> > From: Jens Rehsack <address@hidden>
> > To: address@hidden
> > Date: Thu, 7 Oct 2010 08:36:39 +0200
> > Subject: Small patches for const/shared
> > Hi all,
> > 
> > first: thanks for libConfuse. It saves us a lot of work.
> > 
> > Nevertheless I have two small patches (the const-patch probably could
> > be extended to more functions).
> > Furthermore, it doesn't solve the:
> > 
> > config.cpp:46: warning: deprecated conversion from string constant to 
> > ?char*?
> > config.cpp:46: warning: deprecated conversion from string constant to 
> > ?char*?
> > config.cpp:54: warning: deprecated conversion from string constant to 
> > ?char*?
> > config.cpp:54: warning: deprecated conversion from string constant to 
> > ?char*?
> > ...
> > 
> > It wasn't enought/didn't work to make all cfg_opt_t instances const like
> > const cfg_opt_t foot_opts[] = {...};
> > When I have some time after finishing the PoC, I'll take a deeper look.
> > 

I think const-correctness would be useful in any case. I haven't
looked closely enough at the implications of this patch yet, however
;-).

> > The second patch allows users to enable libconfuse' shared library target.
> > I don't see any reason to prevent it at all. Linking compatibility can be 
> > solved
> > with appropriate library version numbers
> > (http://www.lrde.epita.fr/~adl/autotools.html).

Even with AC_DISABLE_SHARED, one may specify --enable-shared to
./configure to get a shared libconfuse library. Thus, this patch isn't
necessary for users or distributions to compile shared libraries for
libconfuse. (for example, Gentoo passes --enable-shared to confuse's
./configure script).

However, I also would like to see shared objects enabled by default as
well. And, yes, if the ABI changes between releases, I hope to make
sure that the libtool's -version-info flag is set properly. However, I
think that moving a function's argument from being non-const to being
const doesn't affect the ABI... thus, the default version flag
(-version-info 0:0:0) should be sufficient when only accounting for
the changes in the first patch (and that's what libtool's been
assuming so far anyways).

If it's fine with others, I'll remove AC_DISABLE_SHARED and put in an
empty -version-info flag tonight.

> > 
> > Best regards,
> > Jens


-- 
binki

Look out for missing apostrophes!

Attachment: pgpgbrXsu__Ki.pgp
Description: PGP signature


reply via email to

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