Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


https://bugs.freedesktop.org/show_bug.cgi?id=82579

          Priority: medium
            Bug ID: 82579
                CC: libreoffice@lists.freedesktop.org
          Assignee: libreoffice-bugs@lists.freedesktop.org
           Summary: get rid of premac.h / postmac.h wrapper headers
          Severity: normal
    Classification: Unclassified
                OS: Mac OS X (All)
          Reporter: mstahl@redhat.com
          Hardware: Other
            Status: NEW
           Version: Inherited From OOo
         Component: Libreoffice
           Product: LibreOffice

includes of Mac OS X headers in LO are wrapped with
#include <premac.h>
and
#include <postmac.h>

this is because old LO code, especially in "tools" and "vcl",
defines types that have the same names as Mac OS X types,
so the headers do a bunch of stupid macro hackery
to rename the Mac OS X 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 Mac OS X 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 Mac OS X type
   and the LO type visible in the same LO source file
   by not including both the defining LO and Mac OS X headers

3) if the Mac OS X 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 Mac OS X type is a macro, then adding a namespace-like
   prefix to the LO type is probably required

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.