mirror of
https://github.com/upx/upx
synced 2025-10-05 19:20:23 +08:00
Replace some negative enum constants with "static const unsigned" vars.
This commit is contained in:
parent
5d3be8da1d
commit
14710dea55
|
@ -32,10 +32,15 @@
|
||||||
|
|
||||||
__packed_struct(Mach_fat_header)
|
__packed_struct(Mach_fat_header)
|
||||||
BE32 magic;
|
BE32 magic;
|
||||||
|
# if 0
|
||||||
enum { // note conflict with java bytecode PackLinuxI386
|
enum { // note conflict with java bytecode PackLinuxI386
|
||||||
FAT_MAGIC = 0xcafebabe,
|
FAT_MAGIC = 0xcafebabe,
|
||||||
FAT_MAGIC_SWAB = 0xbebafeca
|
FAT_MAGIC_SWAB = 0xbebafeca
|
||||||
};
|
};
|
||||||
|
# else
|
||||||
|
static const unsigned FAT_MAGIC = 0xcafebabe;
|
||||||
|
static const unsigned FAT_MAGIC_SWAB = 0xbebafeca;
|
||||||
|
# endif
|
||||||
BE32 nfat_arch; // Number of Mach_fat_arch which follow.
|
BE32 nfat_arch; // Number of Mach_fat_arch which follow.
|
||||||
__packed_struct_end()
|
__packed_struct_end()
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,13 @@
|
||||||
|
|
||||||
#ifdef WANT_MACH_HEADER_ENUM /*{*/
|
#ifdef WANT_MACH_HEADER_ENUM /*{*/
|
||||||
#undef WANT_MACH_HEADER_ENUM
|
#undef WANT_MACH_HEADER_ENUM
|
||||||
|
# if 0
|
||||||
enum { // magic
|
enum { // magic
|
||||||
MH_MAGIC = 0xfeedface
|
MH_MAGIC = 0xfeedface
|
||||||
};
|
};
|
||||||
|
# else
|
||||||
|
static const unsigned MH_MAGIC = 0xfeedface;
|
||||||
|
# endif
|
||||||
enum { // cputype
|
enum { // cputype
|
||||||
CPU_TYPE_I386 = 7,
|
CPU_TYPE_I386 = 7,
|
||||||
CPU_TYPE_X86_64 = 0x01000007,
|
CPU_TYPE_X86_64 = 0x01000007,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user