aboutsummaryrefslogtreecommitdiff
path: root/miscutils/dc.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r--miscutils/dc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c
index 9c74172ba..4d92bc3d0 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -4,6 +4,7 @@
4 */ 4 */
5 5
6#include "libbb.h" 6#include "libbb.h"
7#include "common_bufsiz.h"
7#include <math.h> 8#include <math.h>
8 9
9//usage:#define dc_trivial_usage 10//usage:#define dc_trivial_usage
@@ -47,11 +48,12 @@ struct globals {
47 double stack[1]; 48 double stack[1];
48} FIX_ALIASING; 49} FIX_ALIASING;
49enum { STACK_SIZE = (COMMON_BUFSIZE - offsetof(struct globals, stack)) / sizeof(double) }; 50enum { STACK_SIZE = (COMMON_BUFSIZE - offsetof(struct globals, stack)) / sizeof(double) };
50#define G (*(struct globals*)&bb_common_bufsiz1) 51#define G (*(struct globals*)bb_common_bufsiz1)
51#define pointer (G.pointer ) 52#define pointer (G.pointer )
52#define base (G.base ) 53#define base (G.base )
53#define stack (G.stack ) 54#define stack (G.stack )
54#define INIT_G() do { \ 55#define INIT_G() do { \
56 setup_common_bufsiz(); \
55 base = 10; \ 57 base = 10; \
56} while (0) 58} while (0)
57 59