Closed Bug 959912 Opened 10 years ago Closed 10 years ago

widget/gonk/libui/cutils_log.h doesn't compile

Categories

(Core Graveyard :: Widget: Gonk, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla29

People

(Reporter: mwu, Assigned: seinlin)

References

Details

Attachments

(1 file, 3 obsolete files)

      No description provided.
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → All
Kai-Zhen will check it first.
Attached patch bug-959912-fix.patch (obsolete) — Splinter Review
Both ANDROID_VERSION >= 19 and ANDROID_VERSION == 19 can work properly for gonk-kk.
Attachment #8360207 - Flags: review?(mwu)
Assignee: nobody → kli
Attachment #8360207 - Flags: review?(mwu) → review+
Attached patch bug-959912-fix-2.patch (obsolete) — Splinter Review
The duplicate typedef for gonk-kk need to be disabled.
Attachment #8360207 - Attachment is obsolete: true
Attachment #8360211 - Flags: review?(mwu)
Attached patch bug-959912-fix-2.patch (obsolete) — Splinter Review
Hi, Michael, Can you help me have a look on this patch?
Attachment #8360211 - Attachment is obsolete: true
Attachment #8360211 - Flags: review?(mwu)
Attachment #8360258 - Flags: review?(mwu)
Comment on attachment 8360258 [details] [diff] [review]
bug-959912-fix-2.patch

Review of attachment 8360258 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/gonk/libui/cutils_log.h
@@ +32,2 @@
>  #define _LIBS_CUTILS_LOG_H
> +#endif

I think we can just unconditionally define both things.
Do you mean something like this?
-----------------------------------------------------------------
-#ifndef _LIBS_CUTILS_LOG_H
+#if !defined(_LIBS_CUTILS_LOG_H) && !defined(_LIBS_LOG_LOG_H)
+#define _LIBS_LOG_LOG_H
 #define _LIBS_CUTILS_LOG_H

-----------------------------------------------------------------

Without the outer most check, unconditionally define both thing may build break with the following error.

In file included from ../../../gecko/widget/gonk/libui/InputWindow.cpp:21:0:
../../../gecko/widget/gonk/libui/cutils_log.h:481:22: error: conflicting declaration 'EVENT_TYPE_INT'
In file included from ../../../system/core/include/cutils/log.h:1:0,
                 from ../../../system/core/include/utils/Vector.h:24,
                 from ../../../gecko/widget/gonk/libui/Input.h:25,
                 from ../../../gecko/widget/gonk/libui/InputWindow.h:20,
                 from ../../../gecko/widget/gonk/libui/InputWindow.cpp:19:
(In reply to Kai-Zhen Li from comment #6)
> Do you mean something like this?
> -----------------------------------------------------------------
> -#ifndef _LIBS_CUTILS_LOG_H
> +#if !defined(_LIBS_CUTILS_LOG_H) && !defined(_LIBS_LOG_LOG_H)
> +#define _LIBS_LOG_LOG_H
>  #define _LIBS_CUTILS_LOG_H
> 
> -----------------------------------------------------------------
> 

That works for me here. What kind of build are you testing on?
OK, I'll submit a new patch ringht now.

It also work for me. I mean if unconditionally define without this line will build break.

#if !defined(_LIBS_CUTILS_LOG_H) && !defined(_LIBS_LOG_LOG_H)
Attachment #8360258 - Attachment is obsolete: true
Attachment #8360258 - Flags: review?(mwu)
Attachment #8360311 - Flags: review?(mwu)
Comment on attachment 8360311 [details] [diff] [review]
bug-959912-fix-3.patch

Review of attachment 8360311 [details] [diff] [review]:
-----------------------------------------------------------------

Might need to double check that this works on other versions.
Attachment #8360311 - Flags: review?(mwu) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2312b12fbf04
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: