Fix for 139574, wrong user agent specifics on mach-o builds. r=bryner, sr=darin

This commit is contained in:
hyatt%netscape.com 2002-04-24 00:55:53 +00:00
Родитель 19f892c754
Коммит 5c9121b9b8
2 изменённых файлов: 9 добавлений и 7 удалений

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

@ -5372,7 +5372,7 @@ NavigatorImpl::GetPlatform(nsAString& aPlatform)
// here (bug 47080)
#if defined(WIN32)
aPlatform = NS_LITERAL_STRING("Win32");
#elif defined(XP_MAC)
#elif defined(XP_MAC) || defined(XP_MACOSX)
// XXX not sure what to do about Mac OS X on non-PPC, but since Comm 4.x
// doesn't know about it this will actually be backward compatible
aPlatform = NS_LITERAL_STRING("MacPPC");

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

@ -1213,6 +1213,14 @@ nsHttpHandler::InitUserAgentComponents()
}
}
}
#elif defined (XP_MACOSX)
mOscpu.Adopt(nsCRT::strdup("PPC Mac OS X"));
#elif defined (XP_MAC)
long version;
if (::Gestalt(gestaltSystemVersion, &version) == noErr && version >= 0x00001000)
mOscpu.Adopt(nsCRT::strdup("PPC Mac OS X"));
else
mOscpu.Adopt(nsCRT::strdup("PPC"));
#elif defined (XP_UNIX) || defined (XP_BEOS)
struct utsname name;
@ -1224,12 +1232,6 @@ nsHttpHandler::InitUserAgentComponents()
buf += (char*)name.machine;
mOscpu.Assign(buf);
}
#elif defined (XP_MAC)
long version;
if (::Gestalt(gestaltSystemVersion, &version) == noErr && version >= 0x00001000)
mOscpu.Adopt(nsCRT::strdup("PPC Mac OS X"));
else
mOscpu.Adopt(nsCRT::strdup("PPC"));
#endif
mUserAgentIsDirty = PR_TRUE;