Bug 35083 - [cmake] nasty workaround for winioctl.h should be removed
Summary: [cmake] nasty workaround for winioctl.h should be removed
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.4.x
Hardware: Other Windows (All)
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 06:57 UTC by Simon McVittie
Modified: 2011-05-22 07:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2011-03-07 06:57:17 UTC
config.h.cmake has this hack:

    #ifdef _MSC_VER
    /* avoid defines of ELEMENT_TYPE */
    #define _WINIOCTL_
    #endif

which "fixes" compilation on Windows by defining the current multiple-inclusion guard for winioctl.h, but only if you're using MSVC++ and cmake; relying on an implementation detail like the exact name of a multiple-inclusion guard is ugly anyway.

Andre Heinecke has contributed a workaround that should work for all Windows compilers in both the cmake and autotools build-systems (renaming ELEMENT_TYPE to ELEMENT_CONFIGTYPE), so this hack should be removed.

Mailing list reference: http://lists.freedesktop.org/archives/dbus/2011-March/014184.html
Comment 1 Ralf Habacker 2011-05-18 13:04:26 UTC
This buf has been fixed in commit http://cgit.freedesktop.org/dbus/dbus/commit/?id=e0fc90bdf2c60a4c77fffaf490d6f06b2bd6999d and could be closed
Comment 2 Simon McVittie 2011-05-19 01:55:31 UTC
(In reply to comment #1)
> http://cgit.freedesktop.org/dbus/dbus/commit/?id=e0fc90bdf2c60a4c77fffaf490d6f06b2bd6999d

I know, I committed that patch. That's not what this bug is about, though. This bug is a request to remove this hack from config.h.cmake, which shouldn't be necessary since commit e0fc90bdf:

    #ifdef _MSC_VER
    /* avoid defines of ELEMENT_TYPE */
    #define _WINIOCTL_
    #endif

and check that that still works on Windows/MSVC/cmake (I can't test this myself, since I don't have Windows or MSVC).
Comment 3 Ralf Habacker 2011-05-22 07:50:20 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > http://cgit.freedesktop.org/dbus/dbus/commit/?id=e0fc90bdf2c60a4c77fffaf490d6f06b2bd6999d
> 
> I know, I committed that patch. That's not what this bug is about, though. This
> bug is a request to remove this hack from config.h.cmake, which shouldn't be
> necessary since commit e0fc90bdf:
> 
>     #ifdef _MSC_VER
>     /* avoid defines of ELEMENT_TYPE */
>     #define _WINIOCTL_
>     #endif
> 
> and check that that still works on Windows/MSVC/cmake (I can't test this
> myself, since I don't have Windows or MSVC).

fixed in git master


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.