diff --git a/src/wolfio.c b/src/wolfio.c index 080973472..d0b82faa0 100644 --- a/src/wolfio.c +++ b/src/wolfio.c @@ -182,7 +182,7 @@ static WC_INLINE int wolfSSL_LastError(int err, SOCKET_T sd) */ static int TranslateIoReturnCode(int err, SOCKET_T sd, int direction) { -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__WATCOMC__) && !defined(_WIN32_WCE) size_t errstr_offset; char errstr[WOLFSSL_STRERROR_BUFFER_SIZE]; #endif /* _WIN32 */ @@ -241,7 +241,7 @@ static int TranslateIoReturnCode(int err, SOCKET_T sd, int direction) return WOLFSSL_CBIO_ERR_CONN_CLOSE; } -#if defined(_WIN32) && !defined(__WATCOMC__) +#if defined(_WIN32) && !defined(__WATCOMC__) && !defined(_WIN32_WCE) strcpy_s(errstr, sizeof(errstr), "\tGeneral error: "); errstr_offset = strlen(errstr); FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 3ff9ec522..e28737d5d 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -1622,6 +1622,17 @@ typedef struct w64wrapper { typedef unsigned int THREAD_RETURN; typedef TaskHandle_t THREAD_TYPE; #define WOLFSSL_THREAD + #elif defined(_WIN32_WCE) + typedef unsigned THREAD_RETURN; + typedef size_t THREAD_TYPE; + typedef struct COND_TYPE { + wolfSSL_Mutex mutex; + HANDLE cond; + } COND_TYPE; + #define WOLFSSL_COND + #define INVALID_THREAD_VAL ((THREAD_TYPE)(INVALID_HANDLE_VALUE)) + #define WOLFSSL_THREAD __stdcall + #define WOLFSSL_THREAD_NO_JOIN __cdecl #elif defined(USE_WINDOWS_API) typedef unsigned THREAD_RETURN; typedef uintptr_t THREAD_TYPE;