Summary: | CMake Windows compile error | ||
---|---|---|---|
Product: | dbus | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | core | Assignee: | D-Bus Maintainers <dbus> |
Status: | RESOLVED FIXED | QA Contact: | D-Bus Maintainers <dbus> |
Severity: | normal | ||
Priority: | medium | Keywords: | patch |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Windows (All) | ||
Whiteboard: | review? | ||
i915 platform: | i915 features: | ||
Attachments: |
Fix cmake compile errors
Fix unix cmake compile errors bus_driver_check_caller_is_privileged: correct the DBUS_WIN case |
Description
Ralf Habacker
2015-02-04 12:20:50 UTC
Created attachment 113153 [details] [review] Fix cmake compile errors Created attachment 113155 [details] [review] Fix unix cmake compile errors Comment on attachment 113153 [details] [review] Fix cmake compile errors Review of attachment 113153 [details] [review]: ----------------------------------------------------------------- The bit with the libraries is fine. ::: bus/driver.c @@ +134,4 @@ > } > > return TRUE; > +#elifdef DBUS_WIN #elifdef is not standard C. I should have written #elif defined(DBUS_WIN), which I believe is the standard C spelling for what I intended. Does that version work for you? Comment on attachment 113155 [details] [review] Fix unix cmake compile errors Review of attachment 113155 [details] [review]: ----------------------------------------------------------------- The parts of this commit dealing with the DBUS_USER and DBUS_TEST_USER are fine. I'd prefer the #ifdef bits to be one correct patch, rather than a patch for Windows that breaks Unix followed by a patch that de-breaks Unix. Combining everything you've done on this bug into one patch would be fine; having one patch for the #ifdef, one patch for the new helper library and one patch for the DBUS_USER/DBUS_TEST_USER would also be fine. Please choose whichever you prefer. ::: bus/driver.c @@ +134,5 @@ > } > > return TRUE; > +#else > +#ifdef DBUS_WIN I'd prefer #elif defined(DBUS_WIN), unless #elif doesn't work on your compiler for some reason - then we wouldn't need the extra #endif. (In reply to Simon McVittie from comment #3) > The bit with the libraries is fine. (In reply to Simon McVittie from comment #4) > The parts of this commit dealing with the DBUS_USER and DBUS_TEST_USER are > fine. I applied them for 1.9.10. Created attachment 113160 [details] [review] bus_driver_check_caller_is_privileged: correct the DBUS_WIN case --- Does this work for you? Sorry, my mingw environment isn't working right now. (In reply to Simon McVittie from comment #3) > Comment on attachment 113153 [details] [review] [review] > I should have written #elif defined(DBUS_WIN), which I believe is the > standard C spelling for what I intended. Does that version work for you? yes will take that. Comment on attachment 113160 [details] [review] bus_driver_check_caller_is_privileged: correct the DBUS_WIN case Review of attachment 113160 [details] [review]: ----------------------------------------------------------------- #elif defined(DBUS_WIN) is fine with MINGW Comment on attachment 113160 [details] [review] bus_driver_check_caller_is_privileged: correct the DBUS_WIN case committed to master Thanks. Fixed in git for 1.9.10 (and I'll be more careful about doing cmake builds in future). (In reply to Simon McVittie from comment #10) > Thanks. Fixed in git for 1.9.10 (and I'll be more careful about doing cmake > builds in future). To get a quick build check I have registered mingw32 dbus git master builds at https://build.opensuse.org/project/show/home:rhabacker:branches:windows:mingw:win32 for autotools and cmake. See packages - mingw32-dbus-1 (autotools using git master) - mingw32-dbus-1-cmake (cmake using git master) Registered users are able to trigger a git checkout refresh and rebuild. |
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.