mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-20 07:51:35 +08:00
* 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.
This commit is contained in:
parent
ed2287adcd
commit
bd8938985e
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 ();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user