Index: memory-mapped-files.scm =================================================================== --- memory-mapped-files.scm (revision 43989) +++ memory-mapped-files.scm (working copy) @@ -124,7 +124,7 @@ return 0; } -void* mmap(void* addr,int len,int prot,int flags,int fd,int off) +void* mmap(void* addr,size_t len,int prot,int flags,int fd,int off) { HANDLE hMap; HANDLE hFile; @@ -180,7 +180,7 @@ return ptr; } -int munmap(void* addr,int len) +int munmap(void* addr,size_t len) { if (UnmapViewOfFile(addr)) { @@ -269,7 +269,7 @@ (define map/file _map_file) (define map-file-to-memory - (let ((mmap (foreign-lambda c-pointer "mmap" c-pointer integer int int int integer)) + (let ((mmap (foreign-lambda c-pointer "mmap" c-pointer size_t int int int size_t)) (bad-mmap? (foreign-lambda bool "is_bad_mmap" c-pointer))) (lambda (addr len prot flag fd . off) (let ((addr (if (not addr) (##sys#null-pointer) addr)) @@ -282,7 +282,7 @@ (##sys#make-structure 'mmap addr2 len) ) ) ) ) ) (define unmap-file-from-memory - (let ((munmap (foreign-lambda int "munmap" c-pointer integer)) ) + (let ((munmap (foreign-lambda int "munmap" c-pointer size_t)) ) (lambda (mmap . len) (##sys#check-structure mmap 'mmap 'unmap-file-from-memory) (let ((len (if (pair? len) (car len) (##sys#slot mmap 2))))