- client: Copy the AltiVec CPU feature to the p_features field, leave

AltiVec in the host model field for backwards compatibility.
        
    client/
        hostinfo_unix.cpp

svn path=/trunk/boinc/; revision=22740
This commit is contained in:
Rom Walton 2010-11-23 17:43:31 +00:00
parent ba7b2d6898
commit 2c795c4159
2 changed files with 11 additions and 4 deletions

View File

@ -8314,3 +8314,10 @@ Charlie 23 Nov 2010
Installer.cpp
LoginItemAPI.c
PostInstall.cpp
Rom 23 Nov 2010
- client: Copy the AltiVec CPU feature to the p_features field, leave
AltiVec in the host model field for backwards compatibility.
client/
hostinfo_unix.cpp

View File

@ -658,20 +658,20 @@ static void get_cpu_info_maxosx(HOST_INFO& host) {
brand_string, family, model, stepping
);
#else // PowerPC
char capabilities[256], model[256];
char model[256];
int response = 0;
int retval;
len = sizeof(response);
safe_strcpy(host.p_vendor, "Power Macintosh");
retval = sysctlbyname("hw.optional.altivec", &response, &len, NULL, 0);
if (response && (!retval)) {
safe_strcpy(capabilities, "AltiVec");
safe_strcpy(host.p_features, "AltiVec");
}
len = sizeof(model);
sysctlbyname("hw.model", model, &len, NULL, 0);
snprintf(host.p_model, p_model_size, "%s [%s Model %s] [%s]", host.p_vendor, host.p_vendor, model, capabilities);
safe_strcpy(host.p_vendor, "Power Macintosh");
snprintf(host.p_model, p_model_size, "%s [%s Model %s] [%s]", host.p_vendor, host.p_vendor, model, host.p_features);
#endif