summaryrefslogtreecommitdiff
path: root/Source/external/Wuff/wuff_config.h
blob: ed17005f4c1371bc5e537b80a70376bc6e70c8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef WUFF_CONFIG_H
#define WUFF_CONFIG_H

/* Defines that the internal code is being built. */
/* The wuff.h header uses this to change export and import macros. */
#define WUFF_BUILDING_CORE

#ifndef WUFF_INLINE_OVERRIDE
	#ifdef __cplusplus
		#define WUFF_INLINE inline
	#else
		#ifdef _MSC_VER
			#define WUFF_INLINE __inline
		#elif __GNUC__
			#define WUFF_INLINE __inline__
		#else
			#define WUFF_INLINE
		#endif
	#endif
#endif


#ifndef WUFF_GCC_VISIBILITY_OVERRIDE
	#if __GNUC__ >= 4
		#define WUFF_INTERN_API __attribute__((visibility("hidden")))
	#else
		#define WUFF_INTERN_API
    #endif
#endif


#ifdef WUFF_MEMALLOC_OVERRIDE
	#ifdef __cplusplus
extern "C" {
	#endif

	/* Define your own memory allocator. */
	void * wuff_alloc(size_t size);
	void wuff_free(void * mem);

	#ifdef __cplusplus
}
	#endif
#else
WUFF_INTERN_API void * wuff_alloc(size_t size);
WUFF_INTERN_API void wuff_free(void * mem);
#endif


#endif /* WUFF_CONFIG_H */