On Friday, 18 June 2010, at 10:52:22 (-0400),
Jeff Johnson wrote:

> (aside)
> Instead of a #define version, I typically us a "de facto" check
> for POPT in compatibilities. E.g. in order to use POPT 2.0
> in rpm-5.3.2 I'll likely do
>       #if defined(POPT_ARGFLAG_CALCULATOR)
>               ... this is POPT 2.0 ...
>       #else
>               ... this is NOT POPT 2.0 ...
>       #endif

I've always preferred this technique myself.  Versioning macros and
such often fail to account for things like SVN snapshots or human
error.  Always better to look for what you're actually trying to


Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <m...@kainx.org>
Linux Server/Cluster Admin, LBL.gov       Author, Eterm (www.eterm.org)
 "A little learning is a dangerous thing;  Drink deep, or taste not
  the Pierian spring:  There shallow draughts intoxicate the brain,
  And drinking largely sobers us again."
                            -- Alexander Pope, "An Essay on Criticism"
POPT Library                                           http://rpm5.org
Developer Communication List                       popt-devel@rpm5.org

Reply via email to