Per patch from vodz, change a couple of consts to defines, since
authorEric Andersen <andersen@codepoet.org>
Mon, 2 Jul 2001 17:32:40 +0000 (17:32 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 2 Jul 2001 17:32:40 +0000 (17:32 -0000)
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
sysklogd/syslogd.c
syslogd.c
tr.c

index 07922af175fb19c2b2a33506eb18176a189942b2..a5d068262bb636488e1ed6adf7ffb70a1bc3ef3f 100644 (file)
@@ -31,7 +31,9 @@
 #include <sys/types.h>
 #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;
index 8d8bd1afefae74bc689156e525493fae1c18737b..89f5348ec94ffbd197fac8ee275873ffe33d4463 100644 (file)
@@ -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);
index 8d8bd1afefae74bc689156e525493fae1c18737b..89f5348ec94ffbd197fac8ee275873ffe33d4463 100644 (file)
--- 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 07922af175fb19c2b2a33506eb18176a189942b2..a5d068262bb636488e1ed6adf7ffb70a1bc3ef3f 100644 (file)
--- a/tr.c
+++ b/tr.c
@@ -31,7 +31,9 @@
 #include <sys/types.h>
 #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;