This is a patch that attempts to override mmap, mmap64, and munmap so that host libs can used memory from the Wine heap instead of being restricted to the address space Wine leaves unreserved. It is based on Albert Lee's patch found here:
http://bugs.winehq.org/show_bug.cgi?id=13335#c170
It has been enhanced to fix the problem with using off64_t in the wine/library.h header by using ULONGLONG instead, and it should override the aforementioned functions with the correct prototype in 32-bit and 64-bit in a much simpler way.
It currently relies on the system having mmap or mmap64 that uses a 64-bit offset type, though if that's a problem, an extra wrapper can probably be made. It also relies on ULONGLONG being a 64-bit type, but from what I can tell, that will always true.
If there's a problem with it, or some way it can be improved, please let me know. :)