aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/compat.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-08-31 08:14:50 -0700
committerChris Robinson <[email protected]>2016-08-31 08:14:50 -0700
commite01c33792108e3f0026c29a63ce38096d232aa51 (patch)
tree61fea53c14aa03f9038e320e817119147a23f1c6 /Alc/compat.h
parentccf90df07215b4317e2842641a8915d757868e8b (diff)
Add some helper wrappers to mmap files
Diffstat (limited to 'Alc/compat.h')
-rw-r--r--Alc/compat.h13
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