delete checking for domainname field of struct utsname

RESOLVED FIXED in mozilla27

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: froydnj, Unassigned)

Tracking

unspecified
mozilla27
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Linux is the only place we care about the name, and we always know what it is there.
AFAICT, Linux's libc is the only interesting libc that defines domainname.  The
BSDs and OSX don't, and the latter is the only one we really need to care about.
Since we're doing multiple configure checks for this one (!) place, it's not
really worth worrying about.  Let's just hardcode this check and be done with
it.
Attachment #815205 - Flags: review?(benjamin)
These checks are now unused after part 1.
Attachment #815206 - Flags: review?(mh+mozilla)
(In reply to Nathan Froyd (:froydnj) from comment #1)
> AFAICT, Linux's libc is the only interesting libc that defines domainname. 

bionic's does too, but that matches __linux__ too. Just saying the comment is not entirely accurate. For the record, Hurd's glibc doesn't, so it's not a __GLIBC__ thing (it's a kernel feature that's exposed in linux libcs). Note that knowing bionic, it might not be there in older headers, and might break builds against older NDKs. Not sure what we support these days, but might be worth checking.
Attachment #815206 - Flags: review?(mh+mozilla) → review+
(In reply to Mike Hommey [:glandium] from comment #3)
> (In reply to Nathan Froyd (:froydnj) from comment #1)
> > AFAICT, Linux's libc is the only interesting libc that defines domainname. 
> 
> bionic's does too, but that matches __linux__ too. Just saying the comment
> is not entirely accurate. For the record, Hurd's glibc doesn't, so it's not
> a __GLIBC__ thing (it's a kernel feature that's exposed in linux libcs).
> Note that knowing bionic, it might not be there in older headers, and might
> break builds against older NDKs. Not sure what we support these days, but
> might be worth checking.

Mmm, good point.  Grepping through my r8e NDK, I see that bionic unconditionally defines it.  So I think we're good on that front.
Comment on attachment 815205 [details] [diff] [review]
part 1 - just check for __linux__ in nsUserInfo::GetDomain

Are you going to remove the configure checks also? That seems like the real value here.
Attachment #815205 - Flags: review?(benjamin) → review+
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> Comment on attachment 815205 [details] [diff] [review]
> part 1 - just check for __linux__ in nsUserInfo::GetDomain
> 
> Are you going to remove the configure checks also? That seems like the real
> value here.

Indeed!  Part 2 (attachment 815206 [details] [diff] [review]) does just that.
https://hg.mozilla.org/mozilla-central/rev/32cf695522ce
https://hg.mozilla.org/mozilla-central/rev/ced987234f5f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.