EBSnet RTIP support

This commit is contained in:
Chris Conlon
2012-08-13 17:10:05 -06:00
parent bfd510b919
commit 7ec04c16b6
8 changed files with 121 additions and 17 deletions

View File

@@ -61,9 +61,14 @@
#endif
#ifndef NO_FILESYSTEM
#if !defined(USE_WINDOWS_API) && !defined(NO_CYASSL_DIR)
#if !defined(USE_WINDOWS_API) && !defined(NO_CYASSL_DIR) \
&& !defined(EBSNET)
#include <dirent.h>
#endif
#ifdef EBSNET
#include "vfapi.h"
#include "vfile.h"
#endif
#endif /* NO_FILESYSTEM */
@@ -1200,7 +1205,17 @@ static int ProcessChainBuffer(CYASSL_CTX* ctx, const unsigned char* buff,
#ifndef NO_FILESYSTEM
#ifndef MICRIUM
#if defined(EBSNET)
#define XFILE int
#define XFOPEN(NAME, MODE) vf_open((const char *)NAME, VO_RDONLY, 0);
#define XFSEEK vf_lseek
#define XFTELL vf_tell
#define XREWIND vf_rewind
#define XFREAD(BUF, SZ, AMT, FD) vf_read(FD, BUF, SZ*AMT)
#define XFCLOSE vf_close
#define XSEEK_END VSEEK_END
#define XBADFILE -1
#elif !defined(MICRIUM)
#define XFILE FILE*
#define XFOPEN fopen
#define XFSEEK fseek