|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: /* ! 23: * This header file describes the structures of the file format for "fat" ! 24: * architecture specific file (wrapper design). At the begining of the file ! 25: * there is one fat_header structure followed by a number of fat_arch ! 26: * structures. For each architecture in the file, specified by a pair of ! 27: * cputype and cpusubtype, the fat_header describes the file offset, file ! 28: * size and alignment in the file of the architecture specific member. ! 29: * The padded bytes in the file to place each member on it's specific alignment ! 30: * are defined to be read as zeros and can be left as "holes" if the file system ! 31: * can support them as long as they read as zeros. ! 32: * ! 33: * All structures defined here are always written and read to/from disk ! 34: * in big-endian order. ! 35: */ ! 36: ! 37: /* ! 38: * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types ! 39: * and contains the constants for the possible values of these types. ! 40: */ ! 41: #import <mach/machine.h> ! 42: #import <architecture/byte_order.h> ! 43: ! 44: #define FAT_MAGIC 0xcafebabe ! 45: #define FAT_CIGAM NXSwapLong(FAT_MAGIC) ! 46: ! 47: struct fat_header { ! 48: unsigned long magic; /* FAT_MAGIC */ ! 49: unsigned long nfat_arch; /* number of structs that follow */ ! 50: }; ! 51: ! 52: struct fat_arch { ! 53: cpu_type_t cputype; /* cpu specifier (int) */ ! 54: cpu_subtype_t cpusubtype; /* machine specifier (int) */ ! 55: unsigned long offset; /* file offset to this object file */ ! 56: unsigned long size; /* size of this object file */ ! 57: unsigned long align; /* alignment as a power of 2 */ ! 58: }; ! 59:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.