[Bug 82577] New: get rid of prex.h / postx.h wrapper headers
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Aug 13 13:06:22 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=82577
Priority: medium
Bug ID: 82577
CC: libreoffice at lists.freedesktop.org
Assignee: libreoffice-bugs at lists.freedesktop.org
Summary: get rid of prex.h / postx.h wrapper headers
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: mstahl at redhat.com
Hardware: Other
Status: NEW
Version: Inherited From OOo
Component: Libreoffice
Product: LibreOffice
includes of X11 headers in LO are wrapped with
#include <prex.h>
and
#include <postx.h>
this is because old LO code, especially in "tools" and "vcl",
defines types that have the same names as X11 types,
so the headers do a bunch of stupid macro hackery
to rename the X11 types so they don't collide with LO types.
it would be obviously much simpler if the LO types
simply had names that don't collide with X11 types.
"git grep" or ctags or opengrok.libreoffice.org
should find the definitions of types in LO that are re-defined
in the wrapper headers.
there are several ways to clean up collisions:
1) if there is no equivalent in LO of the redefined type,
it can just be removed from the wrapper header
2) in some cases it can be avoided to have the X11 type
and the LO type visible in the same LO source file
by not including both the defining LO and X11 headers
3) if the X11 type is not a macro, then putting the LO
type into a namespace and namespace-qualifying the uses
should avoid the collisions
4) if the X11 type is a macro, then adding a namespace
prefix to the LO type is probably required
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140813/6cc0d28d/attachment.html>
More information about the LibreOffice
mailing list