Changeset 3569 for trunk/kStuff/include/k
- Timestamp:
- Aug 31, 2007, 4:16:27 AM (18 years ago)
- Location:
- trunk/kStuff/include/k
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kStuff/include/k/kDefs.h
r3554 r3569 252 252 /** @def K_E2E_U16 253 253 * Convert the endian of an unsigned 16-bit value. */ 254 # define K_E2E_U16(u16) ( ( uint16_t) (((u16) >> 8) | ((u16) << 8)) )254 # define K_E2E_U16(u16) ( (KU16) (((u16) >> 8) | ((u16) << 8)) ) 255 255 /** @def K_E2E_U32 256 256 * Convert the endian of an unsigned 32-bit value. */ 257 # define K_E2E_U32(u32) ( ( ((u32) & UINT32_C(0xff000000)) >> 24 ) \258 | ( ((u32) & UINT32_C(0x00ff0000)) >> 8 ) \259 | ( ((u32) & UINT32_C(0x0000ff00)) << 8 ) \260 | ( ((u32) & UINT32_C(0x000000ff)) << 24 ) \257 # define K_E2E_U32(u32) ( ( ((u32) & KU32_C(0xff000000)) >> 24 ) \ 258 | ( ((u32) & KU32_C(0x00ff0000)) >> 8 ) \ 259 | ( ((u32) & KU32_C(0x0000ff00)) << 8 ) \ 260 | ( ((u32) & KU32_C(0x000000ff)) << 24 ) \ 261 261 ) 262 262 /** @def K_E2E_U64 263 263 * Convert the endian of an unsigned 64-bit value. */ 264 # define K_E2E_U64(u64) ( ( ((u64) & UINT64_C(0xff00000000000000)) >> 56 ) \265 | ( ((u64) & UINT64_C(0x00ff000000000000)) >> 40 ) \266 | ( ((u64) & UINT64_C(0x0000ff0000000000)) >> 24 ) \267 | ( ((u64) & UINT64_C(0x000000ff00000000)) >> 8 ) \268 | ( ((u64) & UINT64_C(0x00000000ff000000)) << 8 ) \269 | ( ((u64) & UINT64_C(0x0000000000ff0000)) << 24 ) \270 | ( ((u64) & UINT64_C(0x000000000000ff00)) << 40 ) \271 | ( ((u64) & UINT64_C(0x00000000000000ff)) << 56 ) \264 # define K_E2E_U64(u64) ( ( ((u64) & KU64_C(0xff00000000000000)) >> 56 ) \ 265 | ( ((u64) & KU64_C(0x00ff000000000000)) >> 40 ) \ 266 | ( ((u64) & KU64_C(0x0000ff0000000000)) >> 24 ) \ 267 | ( ((u64) & KU64_C(0x000000ff00000000)) >> 8 ) \ 268 | ( ((u64) & KU64_C(0x00000000ff000000)) << 8 ) \ 269 | ( ((u64) & KU64_C(0x0000000000ff0000)) << 24 ) \ 270 | ( ((u64) & KU64_C(0x000000000000ff00)) << 40 ) \ 271 | ( ((u64) & KU64_C(0x00000000000000ff)) << 56 ) \ 272 272 ) 273 273 -
trunk/kStuff/include/k/kLdrFmts/lx.h
r3568 r3569 13 13 #ifndef IMAGE_OS2_SIGNATURE_LX 14 14 /** LX signature ("LX") */ 15 # define IMAGE_LX_SIGNATURE K LDR_LE2H_U16('L' | ('X' << 8))15 # define IMAGE_LX_SIGNATURE K_LE2H_U16('L' | ('X' << 8)) 16 16 #endif 17 17 -
trunk/kStuff/include/k/kLdrFmts/mach-o.h
r3568 r3569 865 865 typedef struct scattered_relocation_info 866 866 { 867 #if def KLDR_LITTLE_ENDIAN867 #if K_ENDIAN == K_ENDIAN_LITTLE 868 868 KU32 r_address : 24, /**< Section relative address of the fixup. (macho_relocation_info_t::r_address) */ 869 869 r_type : 4, /**< Relocation type; 0 is standard, non-zero are machine specific. (macho_relocation_info_t::r_type) */ … … 871 871 r_pcrel : 1, /**< PC (program counter) relative fixup; subtract the fixup address. (macho_relocation_info_t::r_pcrel) */ 872 872 r_scattered : 1; /**< Set if scattered relocation, clear if normal relocation. */ 873 #elif defined(KLDR_BIG_ENDIAN)873 #elif K_ENDIAN == K_ENDIAN_BIG 874 874 KU32 r_scattered : 1, /**< Set if scattered relocation, clear if normal relocation. */ 875 875 r_pcrel : 1, /**< PC (program counter) relative fixup; subtract the fixup address. (macho_relocation_info_t::r_pcrel) */ … … 878 878 r_address : 24; /**< Section relative address of the fixup. (macho_relocation_info_t::r_address) */ 879 879 #else 880 # error "Neither K LDR_LITTLE_ENDIAN nor KLDR_BIG_ENDIAN is defined!"880 # error "Neither K_ENDIAN isn't LITTLE or BIG!" 881 881 #endif 882 882 KI32 r_value; /**< The value the fixup is refering to (without offset added). */ -
trunk/kStuff/include/k/kLdrFmts/mz.h
r3568 r3569 37 37 38 38 #ifndef IMAGE_DOS_SIGNATURE 39 # define IMAGE_DOS_SIGNATURE K LDR_LE2H_U16('M' | ('Z' << 8))39 # define IMAGE_DOS_SIGNATURE K_LE2H_U16('M' | ('Z' << 8)) 40 40 #endif 41 41 -
trunk/kStuff/include/k/kLdrFmts/pe.h
r3568 r3569 19 19 *******************************************************************************/ 20 20 #ifndef IMAGE_NT_SIGNATURE 21 # define IMAGE_NT_SIGNATURE K LDR_LE2H_U32('P' | ('E' << 8))21 # define IMAGE_NT_SIGNATURE K_LE2H_U32('P' | ('E' << 8)) 22 22 #endif 23 23
Note:
See TracChangeset
for help on using the changeset viewer.