diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-07 18:27:54 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-07 18:27:54 +0000 |
commit | bd8938985e9653601491742c9e4a4cfbe22e73ec (patch) | |
tree | 69a1c31ecc44996034c523ae50aa1b98d86ede35 /winsup/cygwin | |
parent | ed2287adcd6b16a0ef34defb443d5c61fc7830d7 (diff) | |
download | newlib-bd8938985e9653601491742c9e4a4cfbe22e73ec.zip newlib-bd8938985e9653601491742c9e4a4cfbe22e73ec.tar.gz newlib-bd8938985e9653601491742c9e4a4cfbe22e73ec.tar.bz2 |
* cygheap.cc (_csbrk): More left coercion cleanup.
* fhandler_tty.cc (fhandler_tty_slave::read): Ditto.
(fhandler_tty_slave::write): Ditto.
* fhandler_windows.cc (fhandler_windows::read): Ditto.
* heap.cc (sbrk): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/cygwin/cygheap.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_windows.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/heap.cc | 2 |
5 files changed, 15 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e74675b..db770a5 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2003-09-07 Christopher Faylor <cgf@redhat.com> + + * cygheap.cc (_csbrk): More left coercion cleanup. + * fhandler_tty.cc (fhandler_tty_slave::read): Ditto. + (fhandler_tty_slave::write): Ditto. + * fhandler_windows.cc (fhandler_windows::read): Ditto. + * heap.cc (sbrk): Ditto. + 2003-09-07 Pierre Humblet <pierre.humblet@ieee.org> * signal.cc (nanosleep): Improve test for valid values. Round delay up diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 07151e9..af53795 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -179,14 +179,14 @@ _csbrk (int sbs) { void *prebrk = cygheap_max; void *prebrka = pagetrunc (prebrk); - (char *) cygheap_max += sbs; + cygheap_max = (char *) cygheap_max + sbs; if (!sbs || (prebrk != prebrka && prebrka == pagetrunc (cygheap_max))) /* nothing to do */; else if (!VirtualAlloc (prebrk, (DWORD) sbs, MEM_COMMIT, PAGE_READWRITE)) { malloc_printf ("couldn't commit memory for cygwin heap, %E"); __seterrno (); - (char *) cygheap_max -= sbs; + cygheap_max = (char *) cygheap_max - sbs; return NULL; } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index c273a68..8ba843e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -762,7 +762,7 @@ fhandler_tty_slave::read (void *ptr, size_t& len) if (!vmin && !time_to_wait) { ReleaseMutex (input_mutex); - (ssize_t) len = bytes_in_pipe; + len = (size_t) bytes_in_pipe; return; } @@ -842,7 +842,7 @@ fhandler_tty_slave::read (void *ptr, size_t& len) waiter = time_to_wait; } termios_printf ("%d=read(%x, %d)", totalread, ptr, len); - (ssize_t) len = totalread; + len = (size_t) totalread; return; } @@ -1153,7 +1153,7 @@ fhandler_pty_master::write (const void *ptr, size_t len) void __stdcall fhandler_pty_master::read (void *ptr, size_t& len) { - (ssize_t) len = process_slave_output ((char *) ptr, len, pktmode); + len = (size_t) process_slave_output ((char *) ptr, len, pktmode); return; } diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc index f200f48..8b02e3f 100644 --- a/winsup/cygwin/fhandler_windows.cc +++ b/winsup/cygwin/fhandler_windows.cc @@ -90,7 +90,7 @@ fhandler_windows::read (void *buf, size_t& len) return; } - (ssize_t) len = GetMessage (ptr, hWnd_, 0, 0); + len = (size_t) GetMessage (ptr, hWnd_, 0, 0); if ((ssize_t) len == -1) __seterrno (); diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index 5157a56..a3f7903 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -146,7 +146,7 @@ sbrk (int n) || VirtualAlloc (cygheap->user_heap.top, newbrksize = commitbytes, MEM_RESERVE, PAGE_NOACCESS)) && VirtualAlloc (cygheap->user_heap.top, commitbytes, MEM_COMMIT, PAGE_READWRITE) != NULL) { - (char *) cygheap->user_heap.max += pround (newbrksize); + cygheap->user_heap.max = (char *) cygheap->user_heap.max + pround (newbrksize); goto good; } |