aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/mmap.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-07-21 13:06:49 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-07-21 13:06:49 +0000
commitd432ac751b7fb37d50502081243da5c722a8a522 (patch)
tree3904eb800b8da3e32ff6eacfecde525aa8ce84c3 /winsup/cygwin/mmap.cc
parent522483e4f65302d35bfbaf7750b3cf82e2def2a9 (diff)
downloadnewlib-d432ac751b7fb37d50502081243da5c722a8a522.zip
newlib-d432ac751b7fb37d50502081243da5c722a8a522.tar.gz
newlib-d432ac751b7fb37d50502081243da5c722a8a522.tar.bz2
* mmap.cc: Use proper format specifiers for _off64_t and size_t in
format strings passed to syscall_printf () and debug_printf () throughout.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r--winsup/cygwin/mmap.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 00ef3e6..32287b1 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -123,12 +123,12 @@ mmap_record::alloc_map (_off64_t off, DWORD len)
len = PAGE_CNT (len) * getpagesize ();
if (off > 0 &&
!VirtualProtect (base_address_, off, PAGE_NOACCESS, &old_prot))
- syscall_printf ("VirtualProtect(%x,%d) failed: %E", base_address_, off);
+ syscall_printf ("VirtualProtect(%x,%D) failed: %E", base_address_, off);
if (off + len < size_to_map_
&& !VirtualProtect (base_address_ + off + len,
size_to_map_ - len - off,
PAGE_NOACCESS, &old_prot))
- syscall_printf ("VirtualProtect(%x,%d) failed: %E",
+ syscall_printf ("VirtualProtect(%x,%D) failed: %E",
base_address_ + off + len, size_to_map_ - len - off);
off /= getpagesize ();
len /= getpagesize ();
@@ -158,7 +158,7 @@ mmap_record::map_map (_off64_t off, DWORD len)
break;
}
- debug_printf ("map_map (fd=%d, off=%D, len=%d)", fdesc_, off, len);
+ debug_printf ("map_map (fd=%d, off=%D, len=%u)", fdesc_, off, len);
len = PAGE_CNT (len);
if ((off = find_empty (len)) == (DWORD)-1)
@@ -435,7 +435,7 @@ static map *mmapped_areas;
extern "C" caddr_t
mmap64 (caddr_t addr, size_t len, int prot, int flags, int fd, _off64_t off)
{
- syscall_printf ("addr %x, len %d, prot %x, flags %x, fd %d, off %D",
+ syscall_printf ("addr %x, len %u, prot %x, flags %x, fd %d, off %D",
addr, len, prot, flags, fd, off);
static DWORD granularity;
@@ -618,7 +618,7 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, _off_t off)
extern "C" int
munmap (caddr_t addr, size_t len)
{
- syscall_printf ("munmap (addr %x, len %d)", addr, len);
+ syscall_printf ("munmap (addr %x, len %u)", addr, len);
/* Error conditions according to SUSv3 */
if (!addr || ((DWORD)addr % getpagesize ()) || !len
@@ -675,7 +675,7 @@ munmap (caddr_t addr, size_t len)
extern "C" int
msync (caddr_t addr, size_t len, int flags)
{
- syscall_printf ("addr = %x, len = %d, flags = %x",
+ syscall_printf ("addr = %x, len = %u, flags = %x",
addr, len, flags);
/* However, check flags for validity. */
@@ -843,7 +843,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access,
if (!base && !(flags & MAP_FIXED))
base = MapViewOfFileEx (h, access, high, low, len, NULL);
debug_printf ("%x = MapViewOfFileEx (h:%x, access:%x, 0, off:%D, "
- "len:%d, addr:%x)", base, h, access, off, len, *addr);
+ "len:%u, addr:%x)", base, h, access, off, len, *addr);
if (!base || ((flags & MAP_FIXED) && base != *addr))
{
if (!base)
@@ -907,7 +907,7 @@ mprotect (caddr_t addr, size_t len, int prot)
DWORD old_prot;
DWORD new_prot = 0;
- syscall_printf ("mprotect (addr %x, len %d, prot %x)", addr, len, prot);
+ syscall_printf ("mprotect (addr %x, len %u, prot %x)", addr, len, prot);
if (!wincap.virtual_protect_works_on_shared_pages ()
&& addr >= (caddr_t)0x80000000 && addr <= (caddr_t)0xBFFFFFFF)
@@ -985,7 +985,7 @@ fixup_mmaps_after_fork (HANDLE parent)
{
mmap_record *rec = map_list->recs + li;
- debug_printf ("fd %d, h %x, access %x, offset %d, size %d, address %p",
+ debug_printf ("fd %d, h %x, access %x, offset %D, size %u, address %p",
rec->get_fd (), rec->get_handle (), rec->get_access (),
rec->get_offset (), rec->get_size (), rec->get_address ());