forked from wolfSSL/wolfssl
Refactoring WOLFSSL_MDK, MDK5 to KEIL_TCP_NET, KEIL_FS
This commit is contained in:
18
src/io.c
18
src/io.c
@ -61,18 +61,16 @@
|
|||||||
#include <rtcs.h>
|
#include <rtcs.h>
|
||||||
#elif defined(FREESCALE_KSDK_MQX)
|
#elif defined(FREESCALE_KSDK_MQX)
|
||||||
#include <rtcs.h>
|
#include <rtcs.h>
|
||||||
#elif defined(WOLFSSL_MDK_ARM)
|
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||||
#if defined(WOLFSSL_MDK5)
|
#if defined(WOLFSSL_MDK5) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
#include "rl_fs.h"
|
#include "rl_net.h"
|
||||||
#include "rl_net.h"
|
|
||||||
#else
|
#else
|
||||||
#include <rtl.h>
|
#include <rtl.h>
|
||||||
#endif
|
#endif
|
||||||
#undef RNG
|
static int errno;
|
||||||
#include "WOLFSSL_MDK_ARM.h"
|
#define SOCKET_T int
|
||||||
#undef RNG
|
#include "rl_net.h"
|
||||||
#define RNG wolfSSL_RNG
|
|
||||||
/* for avoiding name conflict in "stm32f2xx.h" */
|
/* for avoiding name conflict in "stm32f2xx.h" */
|
||||||
static int errno;
|
static int errno;
|
||||||
#elif defined(WOLFSSL_TIRTOS)
|
#elif defined(WOLFSSL_TIRTOS)
|
||||||
@ -157,8 +155,8 @@
|
|||||||
#define SOCKET_ECONNREFUSED NIO_ECONNREFUSED
|
#define SOCKET_ECONNREFUSED NIO_ECONNREFUSED
|
||||||
#define SOCKET_ECONNABORTED NIO_ECONNABORTED
|
#define SOCKET_ECONNABORTED NIO_ECONNABORTED
|
||||||
#endif
|
#endif
|
||||||
#elif defined(WOLFSSL_MDK_ARM)
|
#elif defined(WOLFSSL_MDK_ARM)|| defined(WOLFSSL_KEIL_TCP_NET)
|
||||||
#if defined(WOLFSSL_MDK5)
|
#if defined(WOLFSSL_MDK5)|| defined(WOLFSSL_KEIL_TCP_NET)
|
||||||
#define SOCKET_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
|
#define SOCKET_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
|
||||||
#define SOCKET_EAGAIN BSD_ERROR_LOCKED
|
#define SOCKET_EAGAIN BSD_ERROR_LOCKED
|
||||||
#define SOCKET_ECONNRESET BSD_ERROR_CLOSED
|
#define SOCKET_ECONNRESET BSD_ERROR_CLOSED
|
||||||
|
@ -3492,13 +3492,6 @@ int wolfSSL_CTX_SetOCSP_Cb(WOLFSSL_CTX* ctx, CbOCSPIO ioCb,
|
|||||||
|
|
||||||
#ifndef NO_FILESYSTEM
|
#ifndef NO_FILESYSTEM
|
||||||
|
|
||||||
#if defined(WOLFSSL_MDK_ARM)
|
|
||||||
extern FILE * wolfSSL_fopen(const char *name, const char *mode) ;
|
|
||||||
#define XFOPEN wolfSSL_fopen
|
|
||||||
#else
|
|
||||||
#define XFOPEN fopen
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* process a file with name fname into ctx of format and type
|
/* process a file with name fname into ctx of format and type
|
||||||
userChain specifies a user certificate chain to pass during handshake */
|
userChain specifies a user certificate chain to pass during handshake */
|
||||||
int ProcessFile(WOLFSSL_CTX* ctx, const char* fname, int format, int type,
|
int ProcessFile(WOLFSSL_CTX* ctx, const char* fname, int format, int type,
|
||||||
@ -7578,7 +7571,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
|||||||
|
|
||||||
#ifdef USE_WINDOWS_API
|
#ifdef USE_WINDOWS_API
|
||||||
#define CloseSocket(s) closesocket(s)
|
#define CloseSocket(s) closesocket(s)
|
||||||
#elif defined(WOLFSSL_MDK_ARM)
|
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||||
#define CloseSocket(s) closesocket(s)
|
#define CloseSocket(s) closesocket(s)
|
||||||
extern int closesocket(int) ;
|
extern int closesocket(int) ;
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user