Add riscv target, enhance arm target

This commit is contained in:
Sergey Lyubka committed 2021-07-26 11:00:37 +01:00
1 parent 53ee984eb7
commit 2d585474c1
8 files changed
+88 -30

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ const char *mg_unpack(const char *path, size_t *size) {
return NULL;
}
#if defined(__linux__) && defined(GCC)
#if defined(MG_FOPENCOOKIE)
ssize_t packed_read(void *cookie, char *buf, size_t size) {
struct packed_file *fp = (struct packed_file *) cookie;
if (size > fp->size - fp->pos) size = fp->size - fp->pos;
+7
View File
@@ -3,3 +3,10 @@
#include "arch.h"
FILE *mg_fopen_packed(const char *path, const char *mode);
#if defined(__linux__) && defined(GCC)
#define MG_ENABLE_PACKED_FS 1
#define MG_FOPENCOOKIE
#else
#define MG_ENABLE_PACKED_FS 0
#endif