mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-26 12:14:56 +00:00
Enable mg_fopen_packed in newlib
This commit is contained in:
1 parent
dfc22af10f
commit
55d102e450
5 files changed
+18
-15
No files matched your search
+6
-3
@@ -1336,11 +1336,14 @@ static void test_multipart(void) {
|
||||
}
|
||||
|
||||
static void test_packed(void) {
|
||||
FILE *fp = mg_fopen_packed("Makefile", "r");
|
||||
#if defined(__linux__) && defined(GCC)
|
||||
const char *path = "Makefile";
|
||||
FILE *fp = mg_fopen_packed(path, "r");
|
||||
#if MG_ENABLE_PACKED_FS
|
||||
struct stat st;
|
||||
ASSERT(stat(path, &st) == 0);
|
||||
ASSERT(fp != NULL);
|
||||
fseek(fp, 0, SEEK_END);
|
||||
ASSERT(ftell(fp) > 0);
|
||||
ASSERT(ftell(fp) == st.st_size);
|
||||
fclose(fp);
|
||||
#else
|
||||
ASSERT(fp == NULL);
|
||||
|
||||
Reference in new issue
Block a user