Merge branch 'master' of github.com:FreeRDP/FreeRDP

This commit is contained in:
Marc-André Moreau 2014-06-18 16:12:54 -04:00
commit 3aac5ec897
2 changed files with 12 additions and 6 deletions

View File

@ -32,21 +32,29 @@
#ifndef _WIN32
#ifndef _rotl
static INLINE UINT32 _rotl(UINT32 value, int shift) {
return (value << shift) | (value >> (32 - shift));
}
#endif
#ifndef _rotl64
static INLINE UINT64 _rotl64(UINT64 value, int shift) {
return (value << shift) | (value >> (64 - shift));
}
#endif
#ifndef _rotr
static INLINE UINT32 _rotr(UINT32 value, int shift) {
return (value >> shift) | (value << (32 - shift));
}
#endif
#ifndef _rotr64
static INLINE UINT64 _rotr64(UINT64 value, int shift) {
return (value >> shift) | (value << (64 - shift));
}
#endif
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))

View File

@ -368,12 +368,7 @@ BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
if (io_status == 0)
{
switch (errno)
{
case ECONNRESET:
SetLastError(ERROR_BROKEN_PIPE);
break;
}
SetLastError(ERROR_BROKEN_PIPE);
status = FALSE;
}
else if (io_status < 0)
@ -385,6 +380,9 @@ BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
case EWOULDBLOCK:
SetLastError(ERROR_NO_DATA);
break;
default:
SetLastError(ERROR_BROKEN_PIPE);
break;
}
}