some portability fixes by rmh in Bug 395

This commit is contained in:
Mike Frysinger 2005-08-27 18:18:06 +00:00
parent e1d9633e20
commit 038b076e55
2 changed files with 3 additions and 3 deletions

View File

@ -33,8 +33,6 @@
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
/* get page info */
#include <asm/page.h>
#include "busybox.h"
//#define FEATURE_CPU_USAGE_PERCENTAGE /* + 2k */

View File

@ -35,7 +35,9 @@
#include <stdlib.h>
#include "busybox.h"
static const int FSHIFT = 16; /* nr of bits of precision */
#ifndef FSHIFT
# define FSHIFT 16 /* nr of bits of precision */
#endif
#define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */
#define LOAD_INT(x) ((x) >> FSHIFT)
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)