From 4cc8f31ffea183ce10111e543f3d50a702c31760 Mon Sep 17 00:00:00 2001 From: Mark Whitley Date: Wed, 7 Mar 2001 18:00:44 +0000 Subject: Changed KILOBYTE, MEGABYTE, and GIGABYTE from #define to enum. --- busybox.h | 8 +++++--- include/busybox.h | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/busybox.h b/busybox.h index 573cce190..5e46ebbd8 100644 --- a/busybox.h +++ b/busybox.h @@ -235,9 +235,11 @@ extern int sysinfo (struct sysinfo* info); #ifdef BB_FEATURE_HUMAN_READABLE const char *make_human_readable_str(unsigned long val, unsigned long hr); #endif -#define KILOBYTE 1024 -#define MEGABYTE (KILOBYTE*1024) -#define GIGABYTE (MEGABYTE*1024) +enum { + KILOBYTE = 1024, + MEGABYTE = (KILOBYTE*1024), + GIGABYTE = (MEGABYTE*1024) +}; #ifdef BB_FEATURE_BUFFERS_GO_ON_STACK #define RESERVE_BB_BUFFER(buffer,len) char buffer[len] diff --git a/include/busybox.h b/include/busybox.h index 573cce190..5e46ebbd8 100644 --- a/include/busybox.h +++ b/include/busybox.h @@ -235,9 +235,11 @@ extern int sysinfo (struct sysinfo* info); #ifdef BB_FEATURE_HUMAN_READABLE const char *make_human_readable_str(unsigned long val, unsigned long hr); #endif -#define KILOBYTE 1024 -#define MEGABYTE (KILOBYTE*1024) -#define GIGABYTE (MEGABYTE*1024) +enum { + KILOBYTE = 1024, + MEGABYTE = (KILOBYTE*1024), + GIGABYTE = (MEGABYTE*1024) +}; #ifdef BB_FEATURE_BUFFERS_GO_ON_STACK #define RESERVE_BB_BUFFER(buffer,len) char buffer[len] -- cgit v1.2.3