diff options
author | Chris Robinson <[email protected]> | 2016-08-31 08:14:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-08-31 08:14:50 -0700 |
commit | e01c33792108e3f0026c29a63ce38096d232aa51 (patch) | |
tree | 61fea53c14aa03f9038e320e817119147a23f1c6 /Alc/compat.h | |
parent | ccf90df07215b4317e2842641a8915d757868e8b (diff) |
Add some helper wrappers to mmap files
Diffstat (limited to 'Alc/compat.h')
-rw-r--r-- | Alc/compat.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Alc/compat.h b/Alc/compat.h index 0443692a..114fc655 100644 --- a/Alc/compat.h +++ b/Alc/compat.h @@ -25,6 +25,19 @@ FILE *al_fopen(const char *fname, const char *mode); #endif +struct FileMapping { +#ifdef _WIN32 + HANDLE file; + HANDLE fmap; +#else + int fd; +#endif + void *ptr; + size_t len; +}; +struct FileMapping MapFileToMem(const char *fname); +void UnmapFileMem(const struct FileMapping *mapping); + al_string GetProcPath(void); #ifdef HAVE_DYNLOAD |