Browse Source

Style fixes in mmap

cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
81fd29ce8c
  1. 4
      mmap.h
  2. 4
      mmap_win32.c

4
mmap.h

@ -38,8 +38,8 @@
#define MAP_ANON MAP_ANONYMOUS
#define MAP_FAILED ((void *) -1)
void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
void munmap(void *addr, size_t length);
void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t offset);
void munmap(void* addr, size_t length);
#else // posix, yay! ^_^
#include <sys/mman.h>
#endif

4
mmap_win32.c

@ -23,7 +23,7 @@
# define DWORD_LO(x) (x)
#endif
void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)
void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t offset)
{
if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC))
return MAP_FAILED;
@ -75,7 +75,7 @@ void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset
return ret;
}
void munmap(void *addr, size_t length)
void munmap(void* addr, size_t length)
{
UnmapViewOfFile(addr);
}

Loading…
Cancel
Save