This patch enables Mach-O (Darwin linker file format) support in WineLib.
Thanks,
Pierre
ModifiedFiles: - loader/module.c
ChangeLog: - Add Mach-O (Darwin file format) support.
Index: loader/module.c =================================================================== RCS file: /home/wine/wine/loader/module.c,v retrieving revision 1.185 diff -u -r1.185 module.c --- loader/module.c 22 May 2003 03:44:01 -0000 1.185 +++ loader/module.c 21 Jul 2003 12:04:44 -0000 @@ -145,6 +145,13 @@ unsigned char ignored[12]; unsigned short type; } elf; + struct + { + unsigned long magic; + unsigned long cputype; + unsigned long cpusubtype; + unsigned long filetype; + } macho; IMAGE_DOS_HEADER mz; } header; @@ -168,10 +175,22 @@ return BINARY_UNKNOWN; } + /* Mach-o File with Endian set to Big Endian or Little Endian*/ + if (header.macho.magic == 0xfeedface || header.macho.magic == 0xecafdeef) + { + switch(header.macho.filetype) + { + case 0x8: /* MH_BUNDLE */ return BINARY_UNIX_LIB; + } + return BINARY_UNKNOWN; + } /* Not ELF, try DOS */