version checking clean-up

This commit is contained in:
albert 2002-10-18 21:15:49 +00:00
parent 80a7f3ff35
commit c956c3dbf3
2 changed files with 4 additions and 5 deletions

6
top.c
View File

@ -944,11 +944,7 @@ static void before (char *me)
Cpu_map = alloc_r(NULL, sizeof(int) * Cpu_tot);
for (i = 0; i < Cpu_tot; i++)
Cpu_map[i] = i;
#ifndef PRETEND2_5_X
if ( 2 <= LINUX_VERSION_MAJOR(linux_version_code)
&& 5 <= LINUX_VERSION_MINOR(linux_version_code)
&& 41 <= LINUX_VERSION_PATCH(linux_version_code))
#endif
if(linux_version_code > LINUX_VERSION(2, 5, 41))
States_fmts = STATES_line2x5;
/* get virtual page size -- nearing huge! */

3
top.h
View File

@ -39,6 +39,9 @@
//#define PRETENDNOCAP /* use a terminal without essential caps */
//#define YIELDCPU_OFF /* hang on tight, DON'T issue sched_yield */
#ifdef PRETEND2_5_X
#define linux_version_code LINUX_VERSION(2,5,43)
#endif
/*###### Some Miscellaneous constants ##################################*/