Original email...
Date: Tue, 28 Oct 2008 20:22:04 +0100
From: Christian Gmeiner
To: icculus@icculus.org
Subject: Physfs IPhone suport
Hi.. this simple patch adds IPhone support to physfs. I
have also tested a normal osx 10 cocoa app and it builds too
with this patch. Hope to see it soon in the main hg tree.
In the next week I will do some tests on a real IPhone/IPod Touch,
but I think it should be okay.
greets,
--
Christian Gmeiner, B.Sc.
From: eH
To: physfs@icculus.org
Subject: [physfs] lzma.c msvc, etc. patch
I came across a few bugs compiling PhysFS with msvc9 - I've created a patch which seems to fix them:
SzFileReadImp / SzFileSeekImp:
Problem: Can't preform arithmatic on 'void *'
Fix: Cast 'object' to unsigned long
LZMA_enumerateFiles:
Problem: There is no error handling if the directory 'dname' doesn't exist
Fix: Check the return value of 'lzma_find_file()' before using it
LZMA_isDirectory:
Problem: return (file->item->IsDirectory) is illegal if 'file' doesn't exist
Fix: Make sure 'file' isn't null before returning
only enumerated their files when looking in a directory other than the root,
instead of enumerating only for the root. Thanks to Chris Taylor for the
catch.
versions of the OS, and fallback to "ANSI" versions for 95/98/ME,
tapdancing around the system codepage if it has to. Other minor Windows
cleanups and corrections.
which will stack allocate small (128 or less bytes) blocks and Malloc the
rest...naturally these now have to be paired with __PHYSFS_smallFree() calls,
so you can't be as lazy as a basic alloca() would let you be. The benefit is
both less malloc pressure for those temporary allocations and better stack
overflow safety (so if some jerk tries to push a 78 megabyte string through
the library as a filename, we won't try to strcpy it to the stack).
platform-specific stricmp implementations, changed appropriate calls to an
ASCII-only stricmp that ignores locale. Fixed case on UTF-8 API entry points.