I made some dirty hacks to compile your tools on OS X (10.6.1, so Intel only).
I just tested wwt and extracted a small game (234MB), ran it through wdf2iso/iso2wdf and everything worked.
The problems on OS X are:<ul><li>O_LARGEFILE, O_NOATIME are not supported</li><li>open64, lseek64, ftruncate64 and all the 64 functions are not supported</li><li>I had to remove the -static flag form the makefile (first original wbfs port had the same problem)</li></ul>This is not recommended for daily use, it was just a quick hack to get it work on OS X, don't know how it works with big files yet.
Here is the diff
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->diff wiimms-wbfs-tool 2/Makefile wiimms-wbfs-tool/source/Makefile
105d104
< LDFLAGSÂÂÂÂÂÂÂÂ+= -static
Only in wiimms-wbfs-tool/source/: templates.sed
Only in wiimms-wbfs-tool/source/: version.h
diff wiimms-wbfs-tool 2/wbfs-interface.c wiimms-wbfs-tool/source/wbfs-interface.c
745c745
< ÂÂÂÂÂÂÂÂÂÂÂÂ: (off64_t)w->disc->p->n_wii_sec_per_disc * 0x4000;
---
> ÂÂÂÂÂÂÂÂÂÂÂÂ: (off_t)w->disc->p->n_wii_sec_per_disc * 0x4000;
diff wiimms-wbfs-tool 2/wdf-cat.c wiimms-wbfs-tool/source/wdf-cat.c
150c150
< enumError do_cat ( File_t * f, off64_t src_off, u64 size64 )
---
> enumError do_cat ( File_t * f, off_t src_off, u64 size64 )
diff wiimms-wbfs-tool 2/wdf-dump.c wiimms-wbfs-tool/source/wdf-dump.c
209c209
<ÂÂÂÂ int fd = open(fname,O_RDONLY|O_LARGEFILE|O_NOATIME|O_NONBLOCK,0);
---
>ÂÂÂÂ int fd = open(fname,O_RDONLY|O_NONBLOCK,0);
295c295
<ÂÂÂÂ if ( lseek64(fd,wh.chunk_off,SEEK_SET) == (off64_t)-1
---
>ÂÂÂÂ if ( lseek(fd,wh.chunk_off,SEEK_SET) == (off_t)-1
diff wiimms-wbfs-tool 2/wii-disc.c wiimms-wbfs-tool/source/wii-disc.c
446c446
< enumError ReadWDF ( WDF_Info_t * wi, off64_t off, void * buf, u32 count )
---
> enumError ReadWDF ( WDF_Info_t * wi, off_t off, void * buf, u32 count )
607c607
< enumError WriteWDF ( WDF_Info_t * wi, off64_t off, const void * buf, u32 count )
---
> enumError WriteWDF ( WDF_Info_t * wi, off_t off, const void * buf, u32 count )
620c620
<ÂÂÂÂ const off64_t data_end = off + count;
---
>ÂÂÂÂ const off_t data_end = off + count;
756c756
< enumError WriteSparseWDF ( WDF_Info_t * wi, off64_t off, const void * buf, u32 count )
---
> enumError WriteSparseWDF ( WDF_Info_t * wi, off_t off, const void * buf, u32 count )
776c776
<ÂÂÂÂ const off64_t data_end = off + count;
---
>ÂÂÂÂ const off_t data_end = off + count;
844c844
< ÂÂÂÂconst off64_t off = (off64_t)offset << 2;
---
> ÂÂÂÂconst off_t off = (off_t)offset << 2;
851c851
< ÂÂÂÂÂÂÂÂ(off64_t)offset << 2,
---
> ÂÂÂÂÂÂÂÂ(off_t)offset << 2,
865c865
< ÂÂÂÂÂÂÂÂ(off64_t)offset << 2,
---
> ÂÂÂÂÂÂÂÂ(off_t)offset << 2,
882,883c882,883
<ÂÂÂÂ const off64_t off = (off64_t)lba * sector_size;
<ÂÂÂÂ const off64_t end = off + count;
---
>ÂÂÂÂ const off_t off = (off_t)lba * sector_size;
>ÂÂÂÂ const off_t end = off + count;
901,902c901,902
<ÂÂÂÂ const off64_t off = (off64_t)lba * sector_size;
<ÂÂÂÂ const off64_t end = off + count;
---
>ÂÂÂÂ const off_t off = (off_t)lba * sector_size;
>ÂÂÂÂ const off_t end = off + count;
919c919
< ÂÂÂÂÂÂÂÂ(off64_t)lba * sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * sector_size,
934c934
< ÂÂÂÂÂÂÂÂ(off64_t)lba * sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * sector_size,
diff wiimms-wbfs-tool 2/wii-disc.h wiimms-wbfs-tool/source/wii-disc.h
107,108c107,108
< ÂÂÂÂoff64_t file_size;ÂÂÂÂÂÂÂÂ// the size of the (virtual) ISO image
< ÂÂÂÂoff64_t max_virt_off;ÂÂÂÂÂÂÂÂ// maximal used offset of virtual image
---
> ÂÂÂÂoff_t file_size;ÂÂÂÂÂÂÂÂ// the size of the (virtual) ISO image
> ÂÂÂÂoff_t max_virt_off;ÂÂÂÂÂÂÂÂ// maximal used offset of virtual image
170c170
< enumError ReadWDFÂÂÂÂ( WDF_Info_t * wi, off64_t off, void * buf, u32 size );
---
> enumError ReadWDFÂÂÂÂ( WDF_Info_t * wi, off_t off, void * buf, u32 size );
175,176c175,176
< enumError WriteWDFÂÂÂÂ( WDF_Info_t * wi, off64_t off, const void * buf, u32 size );
< enumError WriteSparseWDF( WDF_Info_t * wi, off64_t off, const void * buf, u32 size );
---
> enumError WriteWDFÂÂÂÂ( WDF_Info_t * wi, off_t off, const void * buf, u32 size );
> enumError WriteSparseWDF( WDF_Info_t * wi, off_t off, const void * buf, u32 size );
diff wiimms-wbfs-tool 2/wtest.c wiimms-wbfs-tool/source/wtest.c
55c55
< enumError WriteBlock ( WDF_Info_t * wi, char ch, off64_t off, u32 count )
---
> enumError WriteBlock ( WDF_Info_t * wi, char ch, off_t off, u32 count )
diff wiimms-wbfs-tool 2/wwt-file.c wiimms-wbfs-tool/source/wwt-file.c
847,849c847,849
< ÂÂÂÂÂÂÂÂ// second try: use lseek64() (needed for block devices)
< ÂÂÂÂÂÂÂÂinfo->file_size = lseek64(F.fd,0,SEEK_END);
< ÂÂÂÂÂÂÂÂif ( info->file_size == (off64_t)-1 )
---
> ÂÂÂÂÂÂÂÂ// second try: use lseek() (needed for block devices)
> ÂÂÂÂÂÂÂÂinfo->file_size = lseek(F.fd,0,SEEK_END);
> ÂÂÂÂÂÂÂÂif ( info->file_size == (off_t)-1 )
diff wiimms-wbfs-tool 2/wwt-lib.c wiimms-wbfs-tool/source/wwt-lib.c
131c131
<ÂÂÂÂ TRACE_SIZEOF(off64_t);
---
>ÂÂÂÂ TRACE_SIZEOF(off_t);
636c636
< ÂÂÂÂÂÂÂÂf->st.st_size = lseek64(f->fd,0,SEEK_END);
---
> ÂÂÂÂÂÂÂÂf->st.st_size = lseek(f->fd,0,SEEK_END);
638c638
< ÂÂÂÂÂÂÂÂlseek64(f->fd,0,SEEK_SET);
---
> ÂÂÂÂÂÂÂÂlseek(f->fd,0,SEEK_SET);
663,664c663,664
< ÂÂÂÂÂÂÂÂÂÂÂÂO_RDONLY|O_LARGEFILE|O_NOATIME,
< ÂÂÂÂÂÂÂÂÂÂÂÂO_LARGEFILE );
---
> ÂÂÂÂÂÂÂÂÂÂÂÂO_RDONLY,
> ÂÂÂÂÂÂÂÂÂÂÂÂ0 );
673,674c673,674
< ÂÂÂÂÂÂÂÂÂÂÂÂO_RDWR|O_LARGEFILE|O_NOATIME,
< ÂÂÂÂÂÂÂÂÂÂÂÂO_LARGEFILE );
---
> ÂÂÂÂÂÂÂÂÂÂÂÂO_RDWR,
> ÂÂÂÂÂÂÂÂÂÂÂÂ0 );
690,691c690,691
< ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT|O_LARGEFILE|O_WRONLY|O_TRUNC|O_EXCL,
< ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT|O_LARGEFILE );
---
> ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT|O_WRONLY|O_TRUNC|O_EXCL,
> ÂÂÂÂÂÂÂÂÂÂÂÂO_CREAT );
712c712
<ÂÂÂÂ const int open_flags = O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_EXCL;
---
>ÂÂÂÂ const int open_flags = O_WRONLY|O_CREAT|O_TRUNC|O_EXCL;
806c806
<ÂÂvoid DefineCachedArea ( File_t * f, off64_t off, size_t count )
---
>ÂÂvoid DefineCachedArea ( File_t * f, off_t off, size_t count )
820c820
<ÂÂÂÂ off64_t off_end = (( off + count + f->st.st_blksize - 1 )
---
>ÂÂÂÂ off_t off_end = (( off + count + f->st.st_blksize - 1 )
832c832
< ÂÂÂÂoff64_t ptr_end = ptr->off + ptr->count;
---
> ÂÂÂÂoff_t ptr_end = ptr->off + ptr->count;
844c844
< ÂÂÂÂÂÂÂÂoff64_t new_end = ptr->off + ptr->count;
---
> ÂÂÂÂÂÂÂÂoff_t new_end = ptr->off + ptr->count;
1121c1121
<ÂÂstatic FileCache_t * XCacheHelper ( XPARM File_t * f, off64_t off, size_t count )
---
>ÂÂstatic FileCache_t * XCacheHelper ( XPARM File_t * f, off_t off, size_t count )
1196,1197c1196,1197
< ÂÂÂÂÂÂÂÂÂÂÂÂ? lseek64(f->fd,(off64_t)0,SEEK_CUR)
< ÂÂÂÂÂÂÂÂÂÂÂÂ: (off64_t)-1;
---
> ÂÂÂÂÂÂÂÂÂÂÂÂ? lseek(f->fd,(off_t)0,SEEK_CUR)
> ÂÂÂÂÂÂÂÂÂÂÂÂ: (off_t)-1;
1199c1199
<ÂÂÂÂ if ( f->file_off == (off64_t)-1 )
---
>ÂÂÂÂ if ( f->file_off == (off_t)-1 )
1223c1223
< enumError XSeekF ( XPARM File_t * f, off64_t off )
---
> enumError XSeekF ( XPARM File_t * f, off_t off )
1246c1246
< ÂÂÂÂoff64_t skip_size = off - f->file_off;
---
> ÂÂÂÂoff_t skip_size = off - f->file_off;
1287,1288c1287,1288
< ÂÂÂÂÂÂÂÂÂÂÂÂ? fseeko(f->fp,off,SEEK_SET) == (off64_t)-1
< ÂÂÂÂÂÂÂÂÂÂÂÂ: f->fd == -1 || lseek64(f->fd,off,SEEK_SET) == (off64_t)-1;
---
> ÂÂÂÂÂÂÂÂÂÂÂÂ? fseeko(f->fp,off,SEEK_SET) == (off_t)-1
> ÂÂÂÂÂÂÂÂÂÂÂÂ: f->fd == -1 || lseek(f->fd,off,SEEK_SET) == (off_t)-1;
1298c1298
< ÂÂÂÂf->file_off = (off64_t)-1;
---
> ÂÂÂÂf->file_off = (off_t)-1;
1313c1313
< enumError XSetSizeF ( XPARM File_t * f, off64_t off )
---
> enumError XSetSizeF ( XPARM File_t * f, off_t off )
1320c1320
<ÂÂÂÂ if (ftruncate64(f->fd,off))
---
>ÂÂÂÂ if (ftruncate(f->fd,off))
1348c1348
< ÂÂÂÂoff64_t my_off = f->cur_off;
---
> ÂÂÂÂoff_t my_off = f->cur_off;
1449c1449
< ÂÂÂÂf->file_off = (off64_t)-1;
---
> ÂÂÂÂf->file_off = (off_t)-1;
1508c1508
< ÂÂÂÂf->file_off = (off64_t)-1;
---
> ÂÂÂÂf->file_off = (off_t)-1;
1533c1533
< ÂÂÂÂ|| f->file_off == (off64_t)-1 || f->file_off < f->max_off )
---
> ÂÂÂÂ|| f->file_off == (off_t)-1 || f->file_off < f->max_off )
1556c1556
<ÂÂÂÂ off64_t off = f->file_off + ( (ccp)ptr - (ccp)iobuf );
---
>ÂÂÂÂ off_t off = f->file_off + ( (ccp)ptr - (ccp)iobuf );
1598c1598
< enumError XReadAtF ( XPARM File_t * f, off64_t off, void * iobuf, size_t count )
---
> enumError XReadAtF ( XPARM File_t * f, off_t off, void * iobuf, size_t count )
1608c1608
< enumError XWriteAtF ( XPARM File_t * f, off64_t off, const void * iobuf, size_t count )
---
> enumError XWriteAtF ( XPARM File_t * f, off_t off, const void * iobuf, size_t count )
1618c1618
< enumError XWriteSparseAtF ( XPARM File_t * f, off64_t off, const void * iobuf, size_t count )
---
> enumError XWriteSparseAtF ( XPARM File_t * f, off_t off, const void * iobuf, size_t count )
1643c1643
< ÂÂÂÂÂÂÂÂ(off64_t)lba * f->sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * f->sector_size,
1663c1663
< ÂÂÂÂÂÂÂÂ(off64_t)lba * f->sector_size,
---
> ÂÂÂÂÂÂÂÂ(off_t)lba * f->sector_size,
diff wiimms-wbfs-tool 2/wwt-lib.h wiimms-wbfs-tool/source/wwt-lib.h
199c199
< ÂÂÂÂoff64_tÂÂÂÂoff;ÂÂÂÂÂÂÂÂÂÂÂÂ// file offset
---
> ÂÂÂÂoff_tÂÂÂÂoff;ÂÂÂÂÂÂÂÂÂÂÂÂ// file offset
237,239c237,239
< ÂÂÂÂoff64_t file_off;ÂÂÂÂ// current real file offset
< ÂÂÂÂoff64_t cur_off;ÂÂÂÂ// current virtual file offset
< ÂÂÂÂoff64_t max_off;ÂÂÂÂ// max (real&virtual) file offset
---
> ÂÂÂÂoff_t file_off;ÂÂÂÂ// current real file offset
> ÂÂÂÂoff_t cur_off;ÂÂÂÂ// current virtual file offset
> ÂÂÂÂoff_t max_off;ÂÂÂÂ// max (real&virtual) file offset
281c281
<ÂÂvoid DefineCachedAreaÂÂÂÂ( File_t * f, off64_t off, size_t count );
---
>ÂÂvoid DefineCachedAreaÂÂÂÂ( File_t * f, off_t off, size_t count );
296,297c296,297
< enumError XSeekFÂÂÂÂ ( XPARM File_t * f, off64_t off );
< enumError XSetSizeFÂÂÂÂ ( XPARM File_t * f, off64_t off );
---
> enumError XSeekFÂÂÂÂ ( XPARM File_t * f, off_t off );
> enumError XSetSizeFÂÂÂÂ ( XPARM File_t * f, off_t off );
301,303c301,303
< enumError XReadAtFÂÂÂÂ ( XPARM File_t * f, off64_t off,ÂÂÂÂÂÂ void * iobuf, size_t count );
< enumError XWriteAtFÂÂÂÂ ( XPARM File_t * f, off64_t off, const void * iobuf, size_t count );
< enumError XWriteSparseAtF( XPARM File_t * f, off64_t off, const void * iobuf, size_t count );
---
> enumError XReadAtFÂÂÂÂ ( XPARM File_t * f, off_t off,ÂÂÂÂÂÂ void * iobuf, size_t count );
> enumError XWriteAtFÂÂÂÂ ( XPARM File_t * f, off_t off, const void * iobuf, size_t count );
> enumError XWriteSparseAtF( XPARM File_t * f, off_t off, const void * iobuf, size_t count );<!--c2--></div><!--ec2-->
And the binaries+source:
<a href="http://www.megaupload.com/?d=4D70EHVT" target="_blank">http://www.megaupload.com/?d=4D70EHVT</a>
Maybe this helps wiim making the source multi platform, I don't know but as you can't test it on OS X I thought I write you what will break the compile there.
By the way, there are still warnings this way but I didn't care for them yet.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->******-**********-Mac Pro:source ******$ make
awk: calling undefined function strftime
input record number 1, file
source line number 1
awk: calling undefined function strftime
input record number 1, file
source line number 1
***ÂÂobject iso2wdf.o
iso2wdf.c:32:20: warning: malloc.h: No such file or directory
***ÂÂobject debug.o
***ÂÂobject wwt-lib.o
wwt-lib.c: In function ‘XWriteSparseF’:
wwt-lib.c:1532: warning: cast from pointer to integer of different size
***ÂÂobject wii-disc.o
wii-disc.c:9:20: warning: malloc.h: No such file or directory
wii-disc.c: In function ‘WriteWDF’:
wii-disc.c:696: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘long int’
wii-disc.c:730: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘long int’
***ÂÂÂÂtool iso2wdf
***ÂÂobject wdf-cat.o
wdf-cat.c:32:20: warning: malloc.h: No such file or directory
wdf-cat.c: In function ‘help_exit’:
wdf-cat.c:88: warning: format not a string literal and no format arguments
***ÂÂÂÂtool wdf-cat
***ÂÂobject wdf-dump.o
wdf-dump.c:32:20: warning: malloc.h: No such file or directory
wdf-dump.c: In function ‘help_exit’:
wdf-dump.c:94: warning: format not a string literal and no format arguments
***ÂÂÂÂtool wdf-dump
***ÂÂobject wdf2iso.o
wdf2iso.c:32:20: warning: malloc.h: No such file or directory
wdf2iso.c: In function ‘help_exit’:
wdf2iso.c:93: warning: format not a string literal and no format arguments
***ÂÂÂÂtool wdf2iso
***ÂÂobject wtest.o
wtest.c:32:20: warning: malloc.h: No such file or directory
***ÂÂobject dclib-utf8.o
***ÂÂobject libwbfs.o
***ÂÂobject rijndael.o
***ÂÂobject titles.o
***ÂÂobject wbfs-interface.o
wbfs-interface.c:10:20: warning: malloc.h: No such file or directory
***ÂÂobject wiidisc.o
***ÂÂobject wwt-file.o
wwt-file.c:16:20: warning: malloc.h: No such file or directory
***ÂÂÂÂtool wtest
***ÂÂobject wwt.o
wwt.c:33:20: warning: malloc.h: No such file or directory
wwt.c: In function ‘help_exit’:
wwt.c:277: warning: format not a string literal and no format arguments
wwt.c: In function ‘check_options’:
wwt.c:1793: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
***ÂÂÂÂtool wwt
HINT: try 'make help'<!--c2--></div><!--ec2-->