Re: Remove cdrtools
Steve Greenland <email@example.com> writes:
> On 16-Aug-06, 04:00 (CDT), Gabor Gombas <firstname.lastname@example.org> wrote:
>> On Tue, Aug 15, 2006 at 02:26:29PM -0500, Steve Greenland wrote:
>> > And guess what? System tests are actually more reliable, especially
>> > when the user tells you what the system is. You can simply flip to
>> > compiling foo_linux.c or foo_solaris.c and go on your way.
>> This will never work. Real life example from a couple of weeks ago: I
>> wrote a program that was running happily on Sarge, then somebody wanted
>> to build it on RHEL and failed because the UUID library on RHEL does not
>> have uuid_unparse_lower().
> So you chose to use a function not reliably available. Sounds like bad
> planning to me.
>> And RHEL _is_ Linux and it is pretty heavily used in corporate
>> environments. So instead of foo_linux.c you need foo_sarge.c,
>> foo_etch.c, foo_rhel.c, foo_opensuse.c and probably a dozen more,
>> which is just plainly unmanageable.
> No, you figure out what the base system requirement is, and write to that.
> I can guarantee you that there's a lot more difference between AIX and
> "Linux" than there is between RHEL 3.x and Debian sarge, not to even
> mention non-Unix platforms. None-the-less, code can be written that runs
> on all of them. You figure out where the incompatability points are, and
> you write functions to mask them. Of course the functions themselves
> have #ifdefs (or some other way of controlling compilation), but you get
> it *out* of your main code base.
Then again you have code that depends on the size of variable types,
the availability of header files, libaries, functions in libraries,
different prototypes for functions, .....
Instead of finding out what all those parameters are for each system
and writing an foo_<system>.c you can use autoconf to run reliable
testcases for them and use the results to automatically adjust to the
probed set of parameters.
Especialy when you have optional stuff, like 'png support yes/no',
then you need something to easily set the #ifdef variables.