Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-07 22:27:54 +0400
committerChristopher Faylor <me@cgf.cx>2003-09-07 22:27:54 +0400
commitbd8938985e9653601491742c9e4a4cfbe22e73ec (patch)
tree69a1c31ecc44996034c523ae50aa1b98d86ede35 /winsup/cygwin
parented2287adcd6b16a0ef34defb443d5c61fc7830d7 (diff)
* 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/ChangeLog8
-rw-r--r--winsup/cygwin/cygheap.cc4
-rw-r--r--winsup/cygwin/fhandler_tty.cc6
-rw-r--r--winsup/cygwin/fhandler_windows.cc2
-rw-r--r--winsup/cygwin/heap.cc2
5 files changed, 15 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e74675be1..db770a50c 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 07151e960..af53795d0 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 c273a68e0..8ba843e17 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 f200f482a..8b02e3fc6 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 5157a564d..a3f79033f 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;
}