diff options
Diffstat (limited to 'win32/glue/sys')
| -rw-r--r-- | win32/glue/sys/mman.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/win32/glue/sys/mman.h b/win32/glue/sys/mman.h new file mode 100644 index 00000000..0309f982 --- /dev/null +++ b/win32/glue/sys/mman.h @@ -0,0 +1,31 @@ +//
+// Copyright (c) 2008, Wei Mingzhi. All rights reserved.
+//
+// Use, redistribution and modification of this code is unrestricted
+// as long as this notice is preserved.
+//
+
+#ifndef MMAN_H
+#define MMAN_H
+
+#define PROT_WRITE 0
+#define PROT_READ 0
+#define PROT_EXEC 0
+#define MAP_PRIVATE 0
+#define MAP_ANONYMOUS 0
+
+#include <stdlib.h>
+
+static inline void *mmap(void *start, size_t length, int prot, int flags,
+ int fd, off_t offset)
+{
+ return (unsigned char *)malloc(length);
+}
+
+static inline int munmap(void *start, size_t length)
+{
+ free(start);
+ return 0;
+}
+
+#endif
|
