diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-02-10 13:38:51 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-02-10 13:38:51 +0000 |
commit | de4e0d3001021bb98664c3c23b32fe66c4dc59d0 (patch) | |
tree | 5324c8fc5fd5157ae0adb3ada3218af9accb0528 /winsup/cygwin/mmap.cc | |
parent | a505db6554fb96d8eecce221378decbf3edf6b2e (diff) | |
download | cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.tar.gz cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.tar.bz2 cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.zip |
* (child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h):
Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
INVALID_SEEK instead casting -1 to the appropriate type.
* winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
* include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
types. Don't declare acl functions when compiling Cygwin.
* include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
correct types for internal usage.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r-- | winsup/cygwin/mmap.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 884941ae4..e30d8fd37 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -256,7 +256,7 @@ public: mmap_record *add_record (mmap_record r); void erase (int i); mmap_record *match (DWORD off, DWORD len); - off_t match (caddr_t addr, DWORD len, off_t start); + __off32_t match (caddr_t addr, DWORD len, __off32_t start); }; list::list () @@ -307,14 +307,14 @@ list::match (DWORD off, DWORD len) } /* Used in munmap() */ -off_t -list::match (caddr_t addr, DWORD len, off_t start) +__off32_t +list::match (caddr_t addr, DWORD len, __off32_t start) { for (int i = start + 1; i < nrecs; ++i) if (addr >= recs[i].get_address () && addr + len <= recs[i].get_address () + recs[i].get_size ()) return i; - return (off_t)-1; + return ILLEGAL_SEEK; } void @@ -400,7 +400,7 @@ static map *mmapped_areas; extern "C" caddr_t -mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off) +mmap (caddr_t addr, size_t len, int prot, int flags, int fd, __off32_t off) { syscall_printf ("addr %x, len %d, prot %x, flags %x, fd %d, off %d", addr, len, prot, flags, fd, off); @@ -589,7 +589,7 @@ munmap (caddr_t addr, size_t len) list *l = mmapped_areas->lists[it]; if (l) { - off_t li = -1; + __off32_t li = ILLEGAL_SEEK; if ((li = l->match(addr, len, li)) >= 0) { mmap_record *rec = l->recs + li; @@ -695,7 +695,7 @@ msync (caddr_t addr, size_t len, int flags) */ HANDLE fhandler_base::mmap (caddr_t *addr, size_t len, DWORD access, - int flags, off_t off) + int flags, __off32_t off) { set_errno (ENODEV); return INVALID_HANDLE_VALUE; @@ -726,7 +726,7 @@ fhandler_base::fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset, /* Implementation for disk files. */ HANDLE fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access, - int flags, off_t off) + int flags, __off32_t off) { DWORD protect; |