GNOME Bugzilla – Bug 747326
duplicate declarations for MetaKeyCombo and MetaUIFrame
Last modified: 2015-06-27 04:41:12 UTC
OpenBSD uses GCC 4.2.1 which fails to compile mutter due to duplicate declarations of MetaKeyCombo and MetaUIFrame. The attached patches resolve this. OK to push this to git master?
Created attachment 300936 [details] [review] Prevent redefinition of MetaKeyCombo
Created attachment 300937 [details] [review] Prevent redefinition of MetaUIFrame
Review of attachment 300937 [details] [review]: ui.h the header file that is included by other parts of Mutter, so should not include frames.h which is private to the ui/ directory. You can reverse it, and make frames.h include ui.h.
Review of attachment 300936 [details] [review]: A basic rule is that headers in Mutter need to be standalone - that we should never have to worry about the order of includes in a C file. I would make keybindings-private.h include meta-accel-parse.h.
(In reply to Owen Taylor from comment #3) > Review of attachment 300937 [details] [review] [review]: > > ui.h the header file that is included by other parts of Mutter, so should > not include frames.h which is private to the ui/ directory. You can reverse > it, and make frames.h include ui.h. I've tried that, but in that case the build fails with: ./ui/ui.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token Which is on this line: MetaUIFrame * meta_ui_create_frame (MetaUI *ui,
(In reply to Jasper Lievisse Adriaanse from comment #5) > (In reply to Owen Taylor from comment #3) > > Review of attachment 300937 [details] [review] [review] [review]: > > > > ui.h the header file that is included by other parts of Mutter, so should > > not include frames.h which is private to the ui/ directory. You can reverse > > it, and make frames.h include ui.h. > > I've tried that, but in that case the build fails with: > > ./ui/ui.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > > Which is on this line: > > MetaUIFrame * meta_ui_create_frame (MetaUI *ui, Nevermind this, I've updated this patch. OK to push that?
Created attachment 301441 [details] [review] Prevent redefinition of MetaUIFrame
Created attachment 301442 [details] [review] Prevent redefinition of MetaKeyCombo
Created attachment 301443 [details] [review] Prevent redefinition of MetaUIFrame Attach correct patch this time.
Both patches are updated as per your suggestions.
Owen, is there anything else to rework?
Attachment 301442 [details] pushed as 3fe281a - Prevent redefinition of MetaKeyCombo Nope, these are fine, thank you! Sorry for the late response.