RPM Community Forums

Mailing List Message of <popt-devel>

Re: POPT 2.0: version stamping in includes

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 18 Jun 2010 - 20:01:05 CEST
Message-id: <BAADA2F3-52D7-4C61-9D32-E21AD5F1BB3D@mac.com>

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
Received on Fri Jun 18 20:02:03 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.