NSPR tweaks for building with Mozilla's build system

RESOLVED FIXED

Status

defect
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: ted, Assigned: ted)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

I hit just two things I needed to fix to make NSPR build with moz.build files:
1) The top-level configure defines WIN32_LEAN_AND_MEAN which makes a Windows header not get included for one file.
2) For Android the visibility flags are different which breaks a file that declares "extern void *__mmap2".
Comment on attachment 8706714 [details]
MozReview Request: bug 1237869 - Tweak NSPR to build with Mozilla's build system. r?glandium

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29983/diff/1-2/
Attachment #8706715 - Attachment is obsolete: true
Attachment #8706715 - Flags: review?(mh+mozilla)
Attachment #8706716 - Attachment is obsolete: true
Attachment #8706716 - Flags: review?(mh+mozilla)
Comment on attachment 8706714 [details]
MozReview Request: bug 1237869 - Tweak NSPR to build with Mozilla's build system. r?glandium

https://reviewboard.mozilla.org/r/29983/#review27659

::: nsprpub/pr/src/md/unix/unix.c:2718
(Diff revision 2)
> -extern void *__mmap2(void *, size_t, int, int, int, size_t);
> + PR_IMPORT(void) *__mmap2(void *, size_t, int, int, int, size_t);

No need for the extra whitespace at the beginning of the line :)

::: nsprpub/pr/src/md/windows/ntinrval.c:14
(Diff revision 2)
> +#endif

Why not add DEFINES['WIN32_LEAN_AND_MEAN'] = False to the nspr moz.build?
Attachment #8706714 - Flags: review?(mh+mozilla)
https://reviewboard.mozilla.org/r/29983/#review27659

> Why not add DEFINES['WIN32_LEAN_AND_MEAN'] = False to the nspr moz.build?

That doesn't work because the define comes from mozilla-config.h, which gets -included. The alternative would be to manually include the header it needs, but I was worried about breaking something wierd like WinCE.
Attachment #8706714 - Flags: review?(mh+mozilla)
Comment on attachment 8706714 [details]
MozReview Request: bug 1237869 - Tweak NSPR to build with Mozilla's build system. r?glandium

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29983/diff/2-3/
Comment on attachment 8706714 [details]
MozReview Request: bug 1237869 - Tweak NSPR to build with Mozilla's build system. r?glandium

https://reviewboard.mozilla.org/r/29983/#review28091
Attachment #8706714 - Flags: review?(mh+mozilla) → review+
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Depends on: 1306642
You need to log in before you can comment on or make changes to this bug.