On Jun 18, 2010, at 1:45 PM, Michael Jennings wrote: > 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 > *use*. >
Should I go to the effort of a run-time "features" acquisition API? (aside) For a "toy" library like POPT, all of this is horrendous overkill engineering. OTOH, horrendous overkill engineering is _EXACTLY_ what has made both POPT/RPM successful. Less maintenance -> more usage. YMMV. But that's MHO on the matter. 73 de Jeff ______________________________________________________________________ POPT Library http://rpm5.org Developer Communication List [email protected]
