winpr: more Win32 fixes

This commit is contained in:
Marc-André Moreau 2015-11-25 14:41:32 -05:00
parent c6eacd4c40
commit c0c9c9353e
3 changed files with 7 additions and 3 deletions

View File

@ -158,7 +158,7 @@ WINPR_API PVOID InterlockedCompareExchangePointer(PVOID volatile *Destination, P
#endif /* _WIN32 */
#if (!defined(_WIN32) || (defined(_WIN32) && (_WIN32_WINNT < 0x0502)))
#if (!defined(_WIN32) || (defined(_WIN32) && !defined(_M_AMD64) && (_WIN32_WINNT < 0x0502)))
#define WINPR_INTERLOCKED_COMPARE_EXCHANGE64 1
#endif

View File

@ -228,9 +228,13 @@ BOOL SetStdHandleEx(DWORD dwStdHandle, HANDLE hNewHandle, HANDLE* phOldHandle)
/* Extended API */
#ifdef _WIN32
#include <io.h>
#endif
HANDLE GetFileHandleForFileDescriptor(int fd)
{
#ifdef WIN32
#ifdef _WIN32
return (HANDLE)_get_osfhandle(fd);
#else /* WIN32 */
WINPR_FILE *pFile;

View File

@ -205,9 +205,9 @@ PTP_POOL CreateThreadpool(PVOID reserved)
free(pool);
return NULL;
}
#endif
return pool;
#endif
}
VOID CloseThreadpool(PTP_POOL ptpp)