Closed Bug 298549 Opened 20 years ago Closed 20 years ago

nsBidiKeyboard.cpp change broke gcc 4 builds

Categories

(Core Graveyard :: Widget: Mac, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta3

People

(Reporter: mark, Assigned: mark)

Details

Attachments

(1 file)

Attachment #187102 - Flags: review?(bugs.mano)
Comment on attachment 187102 [details] [diff] [review] Putting the "const" back in What do you mean by "back"? It wasn't there before (we loaded the function on runtime, that's why it did compile...). Anyway, could you explain why is this change needed? It isn't clear to me from reading http://developer.apple.com/documentation/Carbon/Reference/KeyboardLayoutService s/klservices_refchap/chapter_45.2_section_2.html
Comment on attachment 187102 [details] [diff] [review] Putting the "const" back in oh, i see. r=mano.
Attachment #187102 - Flags: review?(bugs.mano) → review+
Comment on attachment 187102 [details] [diff] [review] Putting the "const" back in BTW, On checkin, I'll move the decl' into the if block.
Attachment #187102 - Flags: superreview?(sfraser_bugs)
Attachment #187102 - Flags: superreview?(sfraser_bugs) → superreview+
Attachment #187102 - Flags: approval-aviary1.1a2?
Attachment #187102 - Flags: approval-aviary1.1a2? → approval1.8b3?
Comment on attachment 187102 [details] [diff] [review] Putting the "const" back in a=mkaply could we put some info into the bug as to why the const is needed?
Attachment #187102 - Flags: approval1.8b3? → approval1.8b3+
I took the const out in bug 294244. gcc 4 is stricter about type checking, and at the time, KLGetKeyboardLayoutProperty was a call through a function pointer. We defined the type manually as: typedef OSStatus (*fpKLGetKeyboardLayoutProperty_type) (KeyboardLayoutRef, KeyboardLayoutPropertyTag, void**); void** is what Apple's doc at http://developer.apple.com/documentation/Carbon/Reference/KeyboardLayoutServices/klservices_refchap/chapter_45.2_section_2.html specifies, but it doesn't match the header, which asks for const void**. Ideally, I would have noticed this at the time and changed the function pointer type declaration to use const, but I didn't. The header is: /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Keyboards.h Now that 10.2 is the minimum requirement, bug 298430, we no longer need to call through the function pointer. The function is declard with a const third argument, and for the same reason that the const was removed in bug 294244, it now has to go back in.
Checking in nsBidiKeyboard.cpp; /cvsroot/mozilla/widget/src/mac/nsBidiKeyboard.cpp,v <-- nsBidiKeyboard.cpp new revision: 1.14; previous revision: 1.13 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta3
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: