After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747326 - duplicate declarations for MetaKeyCombo and MetaUIFrame
duplicate declarations for MetaKeyCombo and MetaUIFrame
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other OpenBSD
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-04 08:02 UTC by Jasper Lievisse Adriaanse
Modified: 2015-06-27 04:41 UTC
See Also:
GNOME target: ---
GNOME version: 3.15/3.16


Attachments
Prevent redefinition of MetaKeyCombo (1.28 KB, patch)
2015-04-04 08:04 UTC, Jasper Lievisse Adriaanse
none Details | Review
Prevent redefinition of MetaUIFrame (694 bytes, patch)
2015-04-04 08:05 UTC, Jasper Lievisse Adriaanse
none Details | Review
Prevent redefinition of MetaUIFrame (694 bytes, patch)
2015-04-13 07:59 UTC, Jasper Lievisse Adriaanse
none Details | Review
Prevent redefinition of MetaKeyCombo (928 bytes, patch)
2015-04-13 08:12 UTC, Jasper Lievisse Adriaanse
committed Details | Review
Prevent redefinition of MetaUIFrame (813 bytes, patch)
2015-04-13 08:13 UTC, Jasper Lievisse Adriaanse
committed Details | Review

Description Jasper Lievisse Adriaanse 2015-04-04 08:02:24 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?
Comment 1 Jasper Lievisse Adriaanse 2015-04-04 08:04:51 UTC
Created attachment 300936 [details] [review]
Prevent redefinition of MetaKeyCombo
Comment 2 Jasper Lievisse Adriaanse 2015-04-04 08:05:16 UTC
Created attachment 300937 [details] [review]
Prevent redefinition of MetaUIFrame
Comment 3 Owen Taylor 2015-04-09 17:25:37 UTC
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.
Comment 4 Owen Taylor 2015-04-09 17:27:56 UTC
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.
Comment 5 Jasper Lievisse Adriaanse 2015-04-13 07:53:48 UTC
(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,
Comment 6 Jasper Lievisse Adriaanse 2015-04-13 07:58:55 UTC
(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?
Comment 7 Jasper Lievisse Adriaanse 2015-04-13 07:59:33 UTC
Created attachment 301441 [details] [review]
Prevent redefinition of MetaUIFrame
Comment 8 Jasper Lievisse Adriaanse 2015-04-13 08:12:06 UTC
Created attachment 301442 [details] [review]
Prevent redefinition of MetaKeyCombo
Comment 9 Jasper Lievisse Adriaanse 2015-04-13 08:13:18 UTC
Created attachment 301443 [details] [review]
Prevent redefinition of MetaUIFrame

Attach correct patch this time.
Comment 10 Jasper Lievisse Adriaanse 2015-04-13 08:13:41 UTC
Both patches are updated as per your suggestions.
Comment 11 Jasper Lievisse Adriaanse 2015-04-25 18:32:40 UTC
Owen, is there anything else to rework?
Comment 12 Jasper St. Pierre (not reading bugmail) 2015-06-27 04:41:07 UTC
Attachment 301442 [details] pushed as 3fe281a - Prevent redefinition of MetaKeyCombo



Nope, these are fine, thank you! Sorry for the late response.