From: albert <> Date: Fri, 18 Oct 2002 21:15:49 +0000 (+0000) Subject: version checking clean-up X-Git-Tag: v3.3.0~402 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c956c3dbf3e444fe4621d09318bbfcb853d230b6;p=procps-ng version checking clean-up --- diff --git a/top.c b/top.c index 9da4ce28..de11b44b 100644 --- a/top.c +++ b/top.c @@ -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! */ diff --git a/top.h b/top.h index 2f423ef3..84a44a9a 100644 --- a/top.h +++ b/top.h @@ -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 ##################################*/