Rename posix_* -> p_* to avoid build conflict on linux

This commit is contained in:
Sergey Lyubka committed 2021-09-16 11:16:10 +01:00
1 parent 894a168833
commit 409fdaec59
3 files changed
+45 -56

No files matched your search

+7 -18
View File
@@ -596,27 +596,16 @@ void mg_usleep(unsigned long usecs);
enum { MG_FS_READ = 1, MG_FS_WRITE = 2, MG_FS_DIR = 4 };
// Filesystem API functions
// stat() returns MG_FS_* flags and populates file size and modification time
// list() calls fn() for every directory entry, allowing to list a directory
struct mg_fs {
// Return MG_FS_* flags, and populate file size and modification time
int (*stat)(const char *path, size_t *size, time_t *mtime);
// Enumerates objects in directory
void (*list)(const char *path, void (*fn)(const char *, void *), void *);
// Open file
struct mg_fd *(*open)(const char *path, int flags);
// Close file
void (*close)(struct mg_fd *fd);
// Read file
size_t (*read)(void *fd, void *buf, size_t len);
// Write file
size_t (*write)(void *fd, const void *buf, size_t len);
// Seek file
size_t (*seek)(void *fd, size_t offset);
struct mg_fd *(*open)(const char *path, int flags); // Open file
void (*close)(struct mg_fd *fd); // Close file
size_t (*read)(void *fd, void *buf, size_t len); // Read file
size_t (*write)(void *fd, const void *buf, size_t len); // Write file
size_t (*seek)(void *fd, size_t offset); // Set file position
};
// File descriptor