Le sam 09/11/2002 à 21:20, Steven Edwards a écrit :
Bugs:
- The current treeview code doesnt compile under WINE for some resion.
When building under Mingw I dont have this problem. treeview.c: In function `AddEntryToTree': treeview.c:99: structure has no member named `item' treeview.c: In function `InitTreeViewItems': treeview.c:124: structure has no member named `item'
Because of -DNONAMELESSUNION in Makeprog.rules.in. Now, why is it always set? It comes from this patch (http://www.winehq.com/hypermail/wine-cvs/2001/11/0114.html), applied nearly one year ago.
Alternatively, the other way is to reference foo.u.bar instead of foo.bar. And actually, that's the way it's done in the rest of programs/. (Verified: it compiles correctly).
Vincent
On 9 Nov 2002, Vincent Béron wrote: [...]
Because of -DNONAMELESSUNION in Makeprog.rules.in. Now, why is it always set? It comes from this patch (http://www.winehq.com/hypermail/wine-cvs/2001/11/0114.html), applied nearly one year ago.
It is done this way because some versions of gcc/g++ don't support nameless structs. I believe the situation is better with nameless unions and with more recent versions of g++. But for the best compatibility (e.g. with other compilers) it is safer to never use these features, especially in code that we control.