Closed
Bug 566869
Opened 14 years ago
Closed 14 years ago
prefapi.h does not like Chromium's prtypes.h
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
FIXED
People
(Reporter: fred23, Assigned: fred23)
Details
Attachments
(1 file, 1 obsolete file)
1016 bytes,
patch
|
fred23
:
review+
|
Details | Diff | Splinter Review |
when MOZ_IPC, chromium's basictypes.h explicitly disables NSPR_10 support before including prtypes.h. Here are first lines of basictypes.h : ****************** // Chromium includes a prtypes.h also, but it has been modified to include // their build_config.h as well. We can therefore test for both to determine // if someone screws up the include order. #if defined(prtypes_h___) && !defined(BUILD_BUILD_CONFIG_H_) #error You_must_include_basictypes.h_before_prtypes.h! #endif #ifndef NO_NSPR_10_SUPPORT #define NO_NSPR_10_SUPPORT #define NO_NSPR_10_SUPPORT_SAVE #endif #include "prtypes.h" #ifdef NO_NSPR_10_SUPPORT_SAVE #undef NO_NSPR_10_SUPPORT_SAVE #undef NO_NSPR_10_SUPPORT #endif ****************** ... This keeps "NSPR_BEGIN_EXTERN_C" from being properly defined and make prefapi.h build fail.
I defer to bent's judgment here re: NSPR_10. One solution is to just s/extern "C" {/namespace mozilla { namespace Pref {/ and get rid of the ugly PREF_ prefix on its functions. libpref isn't an external API afaict and it's only used from C++ code in gecko.
Or just replace the (2!) uses of NSPR_BEGIN_EXTERN_C with PR_BEGIN_EXTERN_C. I guess I can't approve that (bsmedberg maybe?) but I'd certainly vote for it!
Assignee | ||
Comment 3•14 years ago
|
||
Here's the quick fix Ben suggested. This makes all my troubles go away ;-) I'm not sure who's entitled to r+ that... setting Bent as reviewer for now.
Assignee: nobody → bugzillaFred
Attachment #446498 -
Flags: review?(bent.mozilla)
Updated•14 years ago
|
Attachment #446498 -
Flags: review?(bent.mozilla) → review?(benjamin)
Updated•14 years ago
|
Attachment #446498 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 4•14 years ago
|
||
I think we should push that directly to m-c, instead of getting it merged later on from e10s. Could someone push that for me ? thanks :-)
Attachment #446498 -
Attachment is obsolete: true
Attachment #446900 -
Flags: review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 5•14 years ago
|
||
(In reply to comment #4) > Created an attachment (id=446900) [details] > patch_to_push (with commit info) There's no commit info.
Comment 6•14 years ago
|
||
http://hg.mozilla.org/projects/electrolysis/rev/216fccb29929 Pushed to e10s; we'll let it sync up to m-c in good time.
You need to log in
before you can comment on or make changes to this bug.
Description
•