18 #include <mach-o/fat.h> 24 uint32_t *magic=
reinterpret_cast<uint32_t*
>(hdr);
44 in.read(reinterpret_cast<char*>(&fh),
sizeof(
struct fat_header));
47 throw "failed to read OSX fat header";
50 throw "OSX fat header malformed (magic)";
52 assert(
sizeof(fh.nfat_arch)==4);
60 in.read(reinterpret_cast<char*>(&fa),
sizeof(
struct fat_arch));
62 assert(
sizeof(fa.cputype)==4 &&
63 sizeof(fa.cpusubtype)==4 &&
70 cpusubtype==CPU_SUBTYPE_HPPA_7100LC &&
77 const std::string &source,
78 const std::string &dest)
const 83 "lipo -thin hppa7100LC -output \""+dest+
"\" \""+source+
"\"";
84 return system(command.c_str())!=0;
bool extract_gb(const std::string &source, const std::string &dest) const
osx_fat_readert(std::ifstream &in)
bool is_osx_fat_magic(char hdr[4])