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

Re: [Cdrecord-video] Re: [Cdrecord-developers] Cdrtools-2.01a25: Patch UPDATED ! Last was wrong !



Joerg Schilling wrote:
From: Meino Christian Cramer <Meino.Cramer@gmx.de>
    
  
according to Joerg, my last patch to cdrtools 2.01a25 wasnt correct.
The corrected patch is attached to this mail.
    
Even this one is not needed.

It you _relly_ need to compile against these broken kernel include files,
you could use:

	make "COPTX=-Du8=unsigned char'

or 

	make "COPTX=-Du8=uint8_t'

  

Using kernel headers is inherently broken, a clever programmer would have avoided creating version-dependent executables. You fail to understand that Linux kernel series are in many cases as unlike as HP-UX and Solaris. A 2.6 application may well not work on 2.4 kernels. This can be done by building an executable with on copy of critical procedures which include kernel headers by renaming and including in the source.

So the application builds three procedures, for example called foo22, foo24, and foo26. Then the kernel series is identified at runtime and a "pointer to procedure" is set so the program will call the correct version.

Instead of using
  foo(arg1, arg2)
and needing one executable for each kernel, it becomes
  (*foo)(arg1, arg2)
and one executable will work on all three kernels.

-- 
E. Robert Bogusta
  It seemed like a good idea at the time

Reply to: