http://bugs.winehq.org/show_bug.cgi?id=21320
Summary: wine/list.h has namespace conflicts with sys/queue.h Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jeremyhu@freedesktop.org
sys/queue.h on FreeBSD, darwin, etc provide LIST_ENTRY macros which conflict with those in wine/list.h ... this has led to problems such as:
http://trac.macports.org/ticket/22342
A workaround for this was pushed into wine a while back, but it is merely a hackish workaround. If you permute the order in which headers are included, or if system headers happen to add an include on sys/queue.h, you may end up not being able to build wine. This is what happened in the above external ticket.
If you simply add a '#include <sys/queue.h>' to /usr/include/dispatch/dispatch.h, wine stops building here on darwin. I'm sure it would be easy to find a similar case on FreeBSD.
One fix is to avoid conflicting with the sys/queue.h namespace and use something like WINE_LIST_ENTRY
http://bugs.winehq.org/show_bug.cgi?id=21320
Jeremy Huddleston jeremyhu@freedesktop.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|x86 |All OS/Version|Linux |FreeBSD
http://bugs.winehq.org/show_bug.cgi?id=21320
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other Version|unspecified |1.1.36 Severity|normal |trivial
http://bugs.winehq.org/show_bug.cgi?id=21320
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine-2010@ryandesign.com
--- Comment #1 from Austin English austinenglish@gmail.com 2010-01-13 16:48:08 --- *** Bug 21358 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=21320
--- Comment #2 from Austin English austinenglish@gmail.com 2010-01-16 18:32:19 --- Patch sent: http://www.winehq.org/pipermail/wine-patches/2010-January/083812.html
http://bugs.winehq.org/show_bug.cgi?id=21320
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2010-01-17 23:14:18 --- http://www.winehq.org/pipermail/wine-devel/2010-January/081179.html:
Austin English <austinenglish at gmail.com> writes:
Subject: [PATCH 1/7] include: rename LIST_ENTRY to WINE_LIST_ENTRY to prevent a conflict on *BSD/OSX
Don't do that. Fix the includes order in the files that fail to compile.
http://bugs.winehq.org/show_bug.cgi?id=21320
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2010-01-17 23:15:08 --- Closing invalid.
http://bugs.winehq.org/show_bug.cgi?id=21320
Jeremy Huddleston jeremyhu@freedesktop.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #5 from Jeremy Huddleston jeremyhu@freedesktop.org 2010-01-17 23:50:43 --- Well then re-opening, so you can fix the build-failure by re-ordering includes (which I think is a less valid solution).
http://bugs.winehq.org/show_bug.cgi?id=21320
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2010-01-19 00:33:18 --- What is the problem exactly? Which module/file in Wine fails to compile?
http://bugs.winehq.org/show_bug.cgi?id=21320
--- Comment #7 from Jeremy Huddleston jeremyhu@freedesktop.org 2010-01-19 02:53:43 --- As referenced in the MacPorts ticket (http://trac.macports.org/ticket/22342), dlls/winecoreaudio.drv/audio.c can fail to compile.
You can see the patch that I used to reorder the includes here:
http://trac.macports.org/browser/trunk/dports/x11/wine-crossover-games/files...
but this is of course no guarantee that something else won't go wront in the future.
Another file may eventually include <sys/queue.h> and cause these problems all over again... the proper fix is for wine to not clobber those macros.
http://bugs.winehq.org/show_bug.cgi?id=21320
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2010-01-19 04:04:44 --- No, the proper fix is to ensure that system headers are always included before Wine headers. We can't prefix every single definition with WINE_ on the off chance that some system header decides to use the same name. There are plenty of similar cases already, including some defines in Win32 headers which of course can't be renamed.
http://bugs.winehq.org/show_bug.cgi?id=21320
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #9 from Austin English austinenglish@gmail.com 2010-01-19 12:43:39 --- Fixed by http://source.winehq.org/git/wine.git/?a=commitdiff;h=7222e8b665a85b88993bf3...
http://bugs.winehq.org/show_bug.cgi?id=21320
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org 2010-01-22 11:02:30 --- Closing bugs fixed in 1.1.37.