[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Version
- From: John Belmonte <jvb@...>
- Date: Thu, 11 Jul 2002 00:24:30 +0900
To get around the floating point issue, the linux kernel codes the
version in hex and provides a macro for comparisons:
#define LINUX_VERSION_CODE 132376
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
For example:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
....
#endif
Using conditional code is lousy, but it should be for the users to decide.
-John
--
http:// i . /