Refactoring WOLFSSL_MDK, MDK5 to KEIL_TCP_NET, KEIL_FS

This commit is contained in:
Takashi Kojo
2015-10-07 14:06:19 +09:00
parent 9f6b07aec2
commit cdc3d61b97
2 changed files with 9 additions and 18 deletions

View File

@ -61,18 +61,16 @@
#include <rtcs.h>
#elif defined(FREESCALE_KSDK_MQX)
#include <rtcs.h>
#elif defined(WOLFSSL_MDK_ARM)
#if defined(WOLFSSL_MDK5)
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_MDK5) || defined(WOLFSSL_KEIL_TCP_NET)
#include "cmsis_os.h"
#include "rl_fs.h"
#include "rl_net.h"
#else
#include <rtl.h>
#endif
#undef RNG
#include "WOLFSSL_MDK_ARM.h"
#undef RNG
#define RNG wolfSSL_RNG
static int errno;
#define SOCKET_T int
#include "rl_net.h"
/* for avoiding name conflict in "stm32f2xx.h" */
static int errno;
#elif defined(WOLFSSL_TIRTOS)
@ -157,8 +155,8 @@
#define SOCKET_ECONNREFUSED NIO_ECONNREFUSED
#define SOCKET_ECONNABORTED NIO_ECONNABORTED
#endif
#elif defined(WOLFSSL_MDK_ARM)
#if defined(WOLFSSL_MDK5)
#elif defined(WOLFSSL_MDK_ARM)|| defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_MDK5)|| defined(WOLFSSL_KEIL_TCP_NET)
#define SOCKET_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
#define SOCKET_EAGAIN BSD_ERROR_LOCKED
#define SOCKET_ECONNRESET BSD_ERROR_CLOSED

View File

@ -3492,13 +3492,6 @@ int wolfSSL_CTX_SetOCSP_Cb(WOLFSSL_CTX* ctx, CbOCSPIO ioCb,
#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
userChain specifies a user certificate chain to pass during handshake */
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
#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)
extern int closesocket(int) ;
#else