[Top][All Lists]

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

[Libcdio-devel] paranoia compatibility issue

From: R. Bernstein
Subject: [Libcdio-devel] paranoia compatibility issue
Date: Tue, 25 Jan 2005 06:19:00 -0500

In writing my first media-player CDDA plugin to use cdparanoia, I came
across a slight compatibility issue.

On GNU/Linux I have cdparanoia and its libraries installed
(e.g. libcdda_interface). I had kept the routine names the same
(e.g. paranoia_init); the other library was getting picked
up. Initially this was because of a bug in my pkg-config file where I
gave the old library to load. But for reasons that I don't understand,
even after this was fixed there was a problem. ldd didn't show the old
paranoia library - so I suppose it could have been linked statically
although I'm not sure how.

In order to address this problem and other things, I've renamed the
paranoia names for libcdio. For example instead of cdda_open() I now
have cdio_cddap_open(). For compatibility I've #defined cdda_open

Not only did this solve my particular problem, but I think when one is
reading code which was written specifically with libcdio's paranoia in
mind (i.e. not using "compatibility" names) or when debugging code
using this, it should be more clear which routine is getting used.
Even in those pathological cases where one wants to use both paranoia
routines (for example a regression test that compares the results of
both) it might be done. In this rare circumstance, one would need to
#undef the compatability names.

I open this up for comment; perhaps others have other suggestions.
BUt after a release if this blows up I can say well at least I
mentioned it.

reply via email to

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