From e08e9aba1039f59abb88528e41feca495c4e6697 Mon Sep 17 00:00:00 2001
From: Sergey Fionov <fionov@gmail.com>
Date: Wed, 28 Oct 2009 13:51:14 +0300
Subject: [PATCH] Avoid Sun Studio compiler bug
Modify designators to avoid bug #6888373
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6888373)
---
src/wtools.h | 62 ++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 43 insertions(+), 19 deletions(-)
diff --git a/src/wtools.h b/src/wtools.h
index 5d06391..d9f7b8b 100644
a
|
b
|
typedef struct { |
86 | 86 | .relative_y = y, \ |
87 | 87 | .y_divisions = ydiv, \ |
88 | 88 | .widget = NULL, \ |
89 | | .u.checkbox.text = txt, \ |
90 | | .u.checkbox.state = st \ |
| 89 | .u = { \ |
| 90 | .checkbox = { \ |
| 91 | .text = txt, \ |
| 92 | .state = st \ |
| 93 | } \ |
| 94 | } \ |
91 | 95 | } |
92 | 96 | |
93 | 97 | #define QUICK_BUTTON(x, xdiv, y, ydiv, txt, act, cb) \ |
… |
… |
typedef struct { |
98 | 102 | .relative_y = y, \ |
99 | 103 | .y_divisions = ydiv, \ |
100 | 104 | .widget = NULL, \ |
101 | | .u.button.text = txt, \ |
102 | | .u.button.action = act, \ |
103 | | .u.button.callback = cb \ |
| 105 | .u = { \ |
| 106 | .button = { \ |
| 107 | .text = txt, \ |
| 108 | .action = act, \ |
| 109 | .callback = cb \ |
| 110 | } \ |
| 111 | } \ |
104 | 112 | } |
105 | 113 | |
106 | 114 | #define QUICK_INPUT(x, xdiv, y, ydiv, txt, len_, flags_, hname, res) \ |
… |
… |
typedef struct { |
111 | 119 | .relative_y = y, \ |
112 | 120 | .y_divisions = ydiv, \ |
113 | 121 | .widget = NULL, \ |
114 | | .u.input.text = txt, \ |
115 | | .u.input.len = len_, \ |
116 | | .u.input.flags = flags_, \ |
117 | | .u.input.histname = hname, \ |
118 | | .u.input.result = res \ |
| 122 | .u = { \ |
| 123 | .input = { \ |
| 124 | .text = txt, \ |
| 125 | .len = len_, \ |
| 126 | .flags = flags_, \ |
| 127 | .histname = hname, \ |
| 128 | .result = res \ |
| 129 | } \ |
| 130 | } \ |
119 | 131 | } |
120 | 132 | |
121 | 133 | #define QUICK_LABEL(x, xdiv, y, ydiv, txt) \ |
… |
… |
typedef struct { |
126 | 138 | .relative_y = y, \ |
127 | 139 | .y_divisions = ydiv, \ |
128 | 140 | .widget = NULL, \ |
129 | | .u.label.text = txt \ |
| 141 | .u = { \ |
| 142 | .label = { \ |
| 143 | .text = txt \ |
| 144 | } \ |
| 145 | } \ |
130 | 146 | } |
131 | 147 | |
132 | 148 | #define QUICK_RADIO(x, xdiv, y, ydiv, cnt, items_, val) \ |
… |
… |
typedef struct { |
137 | 153 | .relative_y = y, \ |
138 | 154 | .y_divisions = ydiv, \ |
139 | 155 | .widget = NULL, \ |
140 | | .u.radio.count = cnt, \ |
141 | | .u.radio.items = items_, \ |
142 | | .u.radio.value = val, \ |
| 156 | .u = { \ |
| 157 | .radio = { \ |
| 158 | .count = cnt, \ |
| 159 | .items = items_, \ |
| 160 | .value = val \ |
| 161 | } \ |
| 162 | } \ |
143 | 163 | } |
144 | 164 | |
145 | 165 | #define QUICK_END \ |
… |
… |
typedef struct { |
150 | 170 | .relative_y = 0, \ |
151 | 171 | .y_divisions = 0, \ |
152 | 172 | .widget = NULL, \ |
153 | | .u.input.text = NULL, \ |
154 | | .u.input.len = 0, \ |
155 | | .u.input.flags = 0, \ |
156 | | .u.input.histname = NULL, \ |
157 | | .u.input.result = NULL \ |
| 173 | .u = { \ |
| 174 | .input = { \ |
| 175 | .text = NULL, \ |
| 176 | .len = 0, \ |
| 177 | .flags = 0, \ |
| 178 | .histname = NULL, \ |
| 179 | .result = NULL \ |
| 180 | } \ |
| 181 | } \ |
158 | 182 | } |
159 | 183 | |
160 | 184 | typedef struct { |