mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
lsr fs macros
This commit is contained in:
@@ -158,8 +158,15 @@
|
|||||||
#define NO_DEV_RANDOM
|
#define NO_DEV_RANDOM
|
||||||
#define NO_CYASSL_DIR
|
#define NO_CYASSL_DIR
|
||||||
#define NO_RABBIT
|
#define NO_RABBIT
|
||||||
|
#ifndef NO_FILESYSTEM
|
||||||
|
#define LSR_FS
|
||||||
|
#include "fs.h"
|
||||||
|
#endif
|
||||||
#define CYASSL_LWIP
|
#define CYASSL_LWIP
|
||||||
#define CYASSL_SAFERTOS
|
#define CYASSL_SAFERTOS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CYASSL_SAFERTOS
|
||||||
#ifndef SINGLE_THREADED
|
#ifndef SINGLE_THREADED
|
||||||
#include "SafeRTOS/semphr.h"
|
#include "SafeRTOS/semphr.h"
|
||||||
#endif
|
#endif
|
||||||
|
34
src/ssl.c
34
src/ssl.c
@@ -1214,17 +1214,18 @@ static int ProcessChainBuffer(CYASSL_CTX* ctx, const unsigned char* buff,
|
|||||||
#define XFCLOSE vf_close
|
#define XFCLOSE vf_close
|
||||||
#define XSEEK_END VSEEK_END
|
#define XSEEK_END VSEEK_END
|
||||||
#define XBADFILE -1
|
#define XBADFILE -1
|
||||||
#elif !defined(MICRIUM)
|
#elif defined(LSR_FS)
|
||||||
#define XFILE FILE*
|
#include <fs.h>
|
||||||
#define XFOPEN fopen
|
#define XFILE struct fs_file*
|
||||||
#define XFSEEK fseek
|
#define XFOPEN(NAME, MODE) fs_open(NAME);
|
||||||
#define XFTELL ftell
|
#define XFSEEK
|
||||||
#define XREWIND rewind
|
#define XFTELL(F) (F)->len
|
||||||
#define XFREAD fread
|
#define XREWIND
|
||||||
#define XFCLOSE fclose
|
#define XFREAD(BUF, SZ, AMT, F) fs_read(F, BUF, SZ*AMT)
|
||||||
#define XSEEK_END SEEK_END
|
#define XFCLOSE fs_close
|
||||||
#define XBADFILE NULL
|
#define XSEEK_END 0
|
||||||
#else
|
#define XBADFILE NULL
|
||||||
|
#elif defined(MICRIUM)
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#define XFILE FS_FILE*
|
#define XFILE FS_FILE*
|
||||||
#define XFOPEN fs_fopen
|
#define XFOPEN fs_fopen
|
||||||
@@ -1235,6 +1236,17 @@ static int ProcessChainBuffer(CYASSL_CTX* ctx, const unsigned char* buff,
|
|||||||
#define XFCLOSE fs_fclose
|
#define XFCLOSE fs_fclose
|
||||||
#define XSEEK_END FS_SEEK_END
|
#define XSEEK_END FS_SEEK_END
|
||||||
#define XBADFILE NULL
|
#define XBADFILE NULL
|
||||||
|
#else
|
||||||
|
/* stdio, default case */
|
||||||
|
#define XFILE FILE*
|
||||||
|
#define XFOPEN fopen
|
||||||
|
#define XFSEEK fseek
|
||||||
|
#define XFTELL ftell
|
||||||
|
#define XREWIND rewind
|
||||||
|
#define XFREAD fread
|
||||||
|
#define XFCLOSE fclose
|
||||||
|
#define XSEEK_END SEEK_END
|
||||||
|
#define XBADFILE NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user