mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-22 15:07:43 +08:00
e7bcd47bd5
The cast to generate the return value uses a DWORD variable as test and set value. The error case is the constant -1. Given the type of the other half of the conditioal expression, -1 is cast to DWORD as well. On 64 bit, this results in the error case returning a 32 bit -1 value which is equivalent to (ssize_t) 4294967295 rather than (ssize_t) -1. Add a fixing cast. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin