19 #include <mach-o/fat.h> 27 uint32_t *magic=reinterpret_cast<uint32_t*>(hdr);
49 in.read(reinterpret_cast<char*>(&fh),
sizeof(
struct fat_header));
58 sizeof(fh.nfat_arch) == 4,
"fat_header::nfat_arch is of type uint32_t");
66 in.read(reinterpret_cast<char*>(&fa),
sizeof(
struct fat_arch));
69 sizeof(fa.cputype) == 4 &&
sizeof(fa.cpusubtype) == 4 &&
71 "This requires a specific fat architecture");
77 cpusubtype==CPU_SUBTYPE_HPPA_7100LC &&
86 const std::string &source,
87 const std::string &dest)
const 92 "lipo", {
"lipo",
"-thin",
"hppa7100LC",
"-output", dest, source}) !=
Thrown when failing to deserialize a value from some low level format, like JSON or raw bytes.
bool extract_gb(const std::string &source, const std::string &dest) const
#define PRECONDITION(CONDITION)
int run(const std::string &what, const std::vector< std::string > &argv)
Thrown when some external system fails unexpectedly.
osx_fat_readert(std::ifstream &in)
bool is_osx_fat_magic(char hdr[4])