diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-08-27 18:18:06 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-08-27 18:18:06 +0000 |
commit | 038b076e5592681eb870413f00829e8e984d2ce4 (patch) | |
tree | 481558d96e646c63caee86475985db1904e9bea0 /procps/uptime.c | |
parent | e1d9633e20d8f3153602249441df916cd31f303f (diff) | |
download | busybox-w32-038b076e5592681eb870413f00829e8e984d2ce4.tar.gz busybox-w32-038b076e5592681eb870413f00829e8e984d2ce4.tar.bz2 busybox-w32-038b076e5592681eb870413f00829e8e984d2ce4.zip |
some portability fixes by rmh in Bug 395
Diffstat (limited to '')
-rw-r--r-- | procps/uptime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/procps/uptime.c b/procps/uptime.c index 38d58af9c..004288993 100644 --- a/procps/uptime.c +++ b/procps/uptime.c | |||
@@ -35,7 +35,9 @@ | |||
35 | #include <stdlib.h> | 35 | #include <stdlib.h> |
36 | #include "busybox.h" | 36 | #include "busybox.h" |
37 | 37 | ||
38 | static const int FSHIFT = 16; /* nr of bits of precision */ | 38 | #ifndef FSHIFT |
39 | # define FSHIFT 16 /* nr of bits of precision */ | ||
40 | #endif | ||
39 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | 41 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ |
40 | #define LOAD_INT(x) ((x) >> FSHIFT) | 42 | #define LOAD_INT(x) ((x) >> FSHIFT) |
41 | #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) | 43 | #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) |