http://bugs.winehq.org/show_bug.cgi?id=15332
Summary: Compiling on PC-BSD with -Werror fails in dlls/mscms/handle.c Product: Wine Version: 1.1.4 Platform: PC OS/Version: FreeBSD Status: UNCONFIRMED Keywords: source Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
In today's installment of finding obscure bugs on weird setups, tried compiling on PC-BSD with:
CFLAGS="-Werror" ./configure && make clean && make depend && make
which works, all the way up to: gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -I/usr/local/include -Werror -o handle.o handle.c In file included from mscms_priv.h:52, from handle.c:32: /usr/local/include/lcms.h:213:1: "HIWORD" redefined In file included from ../../include/wine/debug.h:25, from handle.c:22: ../../include/windef.h:301:1: this is the location of the previous definition *** Error code 1
Stop in /usr/home/pcbsd/wine-git/dlls/mscms. *** Error code 1
Stop in /usr/home/pcbsd/wine-git/dlls. *** Error code 1
Stop in /usr/home/pcbsd/wine-git.
Marking as unconfirmed, since I'm not sure if Wine can work around this or not...
http://bugs.winehq.org/show_bug.cgi?id=15332
--- Comment #1 from Juan Lang juan_lang@yahoo.com 2008-09-19 21:13:58 --- Can you try modifying mcms_priv.h to: #define LCMS_WIN_TYPES_ALREADY_DEFINED before including lcms.h?
http://bugs.winehq.org/show_bug.cgi?id=15332
--- Comment #2 from Austin English austinenglish@gmail.com 2008-09-22 13:18:06 --- Created an attachment (id=16222) --> (http://bugs.winehq.org/attachment.cgi?id=16222) new errors
(In reply to comment #1)
Can you try modifying mcms_priv.h to: #define LCMS_WIN_TYPES_ALREADY_DEFINED before including lcms.h?
I tried putting it after the rest of the defines, but make fails with a lot more errors (attached).
http://bugs.winehq.org/show_bug.cgi?id=15332
--- Comment #3 from Austin English austinenglish@gmail.com 2008-09-22 16:40:37 --- Created an attachment (id=16224) --> (http://bugs.winehq.org/attachment.cgi?id=16224) patch
Looking at the errors/files involved, seems there's a conflict in defining HIWORD between /usr/local/include/lcms.h & ../include/windef.h:
lcms - #define HIWORD(l) ((WORD)((DWORD)(l) >> 16)) windef - #define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
adding undef HIWORD to mscms_priv.h eliminates the conflict, allowing the windef definition to overrule it.
For something similar, look at BOOL/DWORD/LPDWORD in mscms_priv.h
http://bugs.winehq.org/show_bug.cgi?id=15332
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com 2008-09-23 10:24:27 --- Patch committed.
http://bugs.winehq.org/show_bug.cgi?id=15332
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2008-10-10 10:11:01 --- Closing bugs fixed in 1.1.6.
https://bugs.winehq.org/show_bug.cgi?id=15332
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |c71a89c59773d854e27908e8569 | |a2e8a859a742c CC| |focht@gmx.net Component|-unknown |mscms Severity|enhancement |normal