Re: linux version codes

Marty Leisner (leisner@sdsp.mc.xerox.com)
Fri, 11 Apr 1997 08:52:46 PDT


> Marty Leisner wrote:
> >
> > I'm working to get a common module for the msr driver.
> >
> > Should there be defines for __LINUX__ = 2
> > and __LINUX_MINOR__ = 0 or 1
>
> The ncr53c8xx driver has, IMH^HO, the most elegant solution:
>
> #define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
> #if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,0)
>
> Hope this helps. On a more bizarre and esoteric note, LINUX_VERSION_CODE
> & (1<<8) should be false for production kernels, true for development.

I like this...I think this is a good idea...

I'm going to use it from now on...

Can it be mainstreamed so its more commonly used?

-- 
marty
leisner@sdsp.mc.xerox.com  
The Feynman problem solving Algorithm
        1) Write down the problem
        2) Think real hard
        3) Write down the answer
                Murray Gel-mann in the NY Times