cpp: Use #pragma once instead of #ifndef guards
[ghc.git] / rts / linker / M32Alloc.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2000-2012
4 *
5 * RTS Object Linker
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #pragma once
10
11 #if RTS_LINKER_USE_MMAP
12 #include <fcntl.h>
13 #include <sys/mman.h>
14
15 #ifdef HAVE_UNISTD_H
16 #include <unistd.h>
17 #endif
18
19 #endif
20
21 #include "BeginPrivate.h"
22
23 #if RTS_LINKER_USE_MMAP
24 #define M32_NO_RETURN /* Nothing */
25 #else
26 #define M32_NO_RETURN GNUC3_ATTRIBUTE(__noreturn__)
27 #endif
28
29 void m32_allocator_init(void) M32_NO_RETURN;
30
31 void m32_allocator_flush(void) M32_NO_RETURN;
32
33 void m32_free(void *addr, size_t size) M32_NO_RETURN;
34
35 void * m32_alloc(size_t size, size_t alignment) M32_NO_RETURN;
36
37 #include "EndPrivate.h"