Rosetta Detector

the right way:

http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_exec_a/chapter_7_section_7.html

another way:

 bool CPSFMactel::IsRosetta() {
 bool isRosetta = false;
     char model[32];
     size_t len = sizeof(model);
     int mib[2] = { CTL_HW, HW_MODEL };
      if (sysctl(mib, 2, &model, &len, NULL, 0) == 0) {
 isRosetta = (len == 9 && strcmp(model, "PowerMac") == 0);
 }
 return isRosetta;
 }