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:
jst%mozilla.jstenback.com 2005-03-03 18:08:01 +00:00
Родитель 7c229a9e64
Коммит c0bff6d43b
1 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -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