]> granicus.if.org Git - procps-ng/commitdiff
version checking clean-up
authoralbert <>
Fri, 18 Oct 2002 21:15:49 +0000 (21:15 +0000)
committeralbert <>
Fri, 18 Oct 2002 21:15:49 +0000 (21:15 +0000)
top.c
top.h

diff --git a/top.c b/top.c
index 9da4ce28f87544844806f3460c9d609c414cc3fb..de11b44bb635a6199574f9dd97607e91b0cb9c0d 100644 (file)
--- 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 2f423ef3f6c921b9623d287399501f345863e8a7..84a44a9a220ba750f065548539d561469b47aa03 100644 (file)
--- 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  ##################################*/