1 | #ifndef WUFF_CONFIG_H |
2 | #define WUFF_CONFIG_H |
3 | |
4 | /* Defines that the internal code is being built. */ |
5 | /* The wuff.h header uses this to change export and import macros. */ |
6 | #define WUFF_BUILDING_CORE |
7 | |
8 | #ifndef WUFF_INLINE_OVERRIDE |
9 | #ifdef __cplusplus |
10 | #define WUFF_INLINE inline |
11 | #else |
12 | #ifdef _MSC_VER |
13 | #define WUFF_INLINE __inline |
14 | #elif __GNUC__ |
15 | #define WUFF_INLINE __inline__ |
16 | #else |
17 | #define WUFF_INLINE |
18 | #endif |
19 | #endif |
20 | #endif |
21 | |
22 | |
23 | #ifndef WUFF_GCC_VISIBILITY_OVERRIDE |
24 | #if __GNUC__ >= 4 |
25 | #define WUFF_INTERN_API __attribute__((visibility("hidden"))) |
26 | #else |
27 | #define WUFF_INTERN_API |
28 | #endif |
29 | #endif |
30 | |
31 | |
32 | #ifdef WUFF_MEMALLOC_OVERRIDE |
33 | #ifdef __cplusplus |
34 | extern "C" { |
35 | #endif |
36 | |
37 | /* Define your own memory allocator. */ |
38 | void * wuff_alloc(size_t size); |
39 | void wuff_free(void * mem); |
40 | |
41 | #ifdef __cplusplus |
42 | } |
43 | #endif |
44 | #else |
45 | WUFF_INTERN_API void * wuff_alloc(size_t size); |
46 | WUFF_INTERN_API void wuff_free(void * mem); |
47 | #endif |
48 | |
49 | |
50 | #endif /* WUFF_CONFIG_H */ |
51 | |