Fix a few more WinCE header issues.

pull/134/head
John Safranek 2019-01-16 11:02:53 -08:00
parent 0f77f67bdf
commit a8cf8b6b97
2 changed files with 10 additions and 5 deletions

View File

@ -119,6 +119,7 @@ extern "C" {
} }
#define WCHMOD(f,m) wChmod((f),(m)) #define WCHMOD(f,m) wChmod((f),(m))
#else #else
#include <stdlib.h>
#define WFILE FILE #define WFILE FILE
WOLFSSH_API int wfopen(WFILE**, const char*, const char*); WOLFSSH_API int wfopen(WFILE**, const char*, const char*);
@ -142,9 +143,11 @@ extern "C" {
!defined(WOLFSSH_SCP_USER_CALLBACKS) !defined(WOLFSSH_SCP_USER_CALLBACKS)
#ifdef USE_WINDOWS_API #ifdef USE_WINDOWS_API
#include <direct.h> #ifndef _WIN32_WCE
#define WCHDIR(p) _chdir((p)) #include <direct.h>
#define WMKDIR(p,m) _mkdir((p)) #define WCHDIR(p) _chdir((p))
#define WMKDIR(p,m) _mkdir((p))
#endif
#else #else
#include <unistd.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -179,7 +182,7 @@ extern "C" {
#define WSTRNCPY(s1,s2,n) strncpy_s((s1),(n),(s2),(n)) #define WSTRNCPY(s1,s2,n) strncpy_s((s1),(n),(s2),(n))
#define WSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n)) #define WSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n))
#define WSNPRINTF(s,n,f,...) _snprintf_s((s),(n),(n),(f),##__VA_ARGS__) #define WSNPRINTF(s,n,f,...) _snprintf_s((s),(n),(n),(f),##__VA_ARGS__)
#define WVSNPRINTF(s,n,f,...) vsnprintf_s((s),(n),(n),(f),##__VA_ARGS__) #define WVSNPRINTF(s,n,f,...) _vsnprintf_s((s),(n),(n),(f),##__VA_ARGS__)
#elif defined(MICROCHIP_MPLAB_HARMONY) || defined(MICROCHIP_PIC32) #elif defined(MICROCHIP_MPLAB_HARMONY) || defined(MICROCHIP_PIC32)
#include <stdio.h> #include <stdio.h>
#define WSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n)) #define WSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n))

View File

@ -13,7 +13,9 @@
#ifdef USE_WINDOWS_API #ifdef USE_WINDOWS_API
#include <winsock2.h> #include <winsock2.h>
#include <process.h> #ifndef _WIN32_WCE
#include <process.h>
#endif
#include <assert.h> #include <assert.h>
#ifdef TEST_IPV6 /* don't require newer SDK for IPV4 */ #ifdef TEST_IPV6 /* don't require newer SDK for IPV4 */
#include <ws2tcpip.h> #include <ws2tcpip.h>