From 22ecf049b634ccd507ed0587526599ed1971c308 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 2 Jul 2001 17:32:40 +0000 Subject: [PATCH] Per patch from vodz, change a couple of consts to defines, since apparently gcc 2.95.4, at least, is too stupid to realize that a "static const int" is in fact a constant. --- coreutils/tr.c | 4 +++- sysklogd/syslogd.c | 4 +++- syslogd.c | 4 +++- tr.c | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/coreutils/tr.c b/coreutils/tr.c index 07922af17..a5d068262 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c @@ -31,7 +31,9 @@ #include #include "busybox.h" -static const int ASCII = 0377; +/* This must be a #define, since when DODEBUG and BUFFERS_GO_IN_BSS are + * enabled, we otherwise get a "storage size isn't constant error. */ +#define ASCII 0377 /* some "globals" shared across this file */ static char com_fl, del_fl, sq_fl; diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 8d8bd1afe..89f5348ec 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -387,7 +387,9 @@ static void domark(int sig) } } -static const int BUFSIZE = 1023; +/* This must be a #define, since when DODEBUG and BUFFERS_GO_IN_BSS are + * enabled, we otherwise get a "storage size isn't constant error. */ +#define BUFSIZE 1023 static int serveConnection (int conn) { RESERVE_BB_BUFFER(tmpbuf, BUFSIZE + 1); diff --git a/syslogd.c b/syslogd.c index 8d8bd1afe..89f5348ec 100644 --- a/syslogd.c +++ b/syslogd.c @@ -387,7 +387,9 @@ static void domark(int sig) } } -static const int BUFSIZE = 1023; +/* This must be a #define, since when DODEBUG and BUFFERS_GO_IN_BSS are + * enabled, we otherwise get a "storage size isn't constant error. */ +#define BUFSIZE 1023 static int serveConnection (int conn) { RESERVE_BB_BUFFER(tmpbuf, BUFSIZE + 1); diff --git a/tr.c b/tr.c index 07922af17..a5d068262 100644 --- a/tr.c +++ b/tr.c @@ -31,7 +31,9 @@ #include #include "busybox.h" -static const int ASCII = 0377; +/* This must be a #define, since when DODEBUG and BUFFERS_GO_IN_BSS are + * enabled, we otherwise get a "storage size isn't constant error. */ +#define ASCII 0377 /* some "globals" shared across this file */ static char com_fl, del_fl, sq_fl;