mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Fixing the browser side of bug 265536. Make the user agent string differentiate between 32-bit and 64-bit version of mozilla when running on x86_64 unix systems. r=bzbarsky@mit.edu, sr=darin@meer.net
This commit is contained in:
parent
7c229a9e64
commit
c0bff6d43b
@ -669,8 +669,22 @@ nsHttpHandler::InitUserAgentComponents()
|
||||
if (ret >= 0) {
|
||||
nsCAutoString buf;
|
||||
buf = (char*)name.sysname;
|
||||
buf += ' ';
|
||||
buf += (char*)name.machine;
|
||||
|
||||
if (strcmp(name.machine, "x86_64") == 0 &&
|
||||
sizeof(void *) == sizeof(PRInt32)) {
|
||||
// We're running 32-bit code on x86_64. Make this browser
|
||||
// look like it's running on i686 hardware, but append "
|
||||
// (x86_64)" to the end of the oscpu identifier to be able
|
||||
// to differentiate this from someone running 64-bit code
|
||||
// on x86_64..
|
||||
|
||||
buf += " i686 (x86_64)";
|
||||
} else {
|
||||
buf += ' ';
|
||||
|
||||
buf += (char*)name.machine;
|
||||
}
|
||||
|
||||
mOscpu.Assign(buf);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user