37 lines
794 B
C
37 lines
794 B
C
|
|
#ifndef _H_MCUTIL
|
|
#define _H_MCUTIL
|
|
|
|
// https://fdiv.net/2015/10/08/emulating-defer-c-clang-or-gccblocks
|
|
|
|
#ifndef MCU_ALLOC
|
|
#define MCU_ALLOC malloc
|
|
#endif
|
|
|
|
#ifndef MCU_REALLOC
|
|
#define MCU_REALLOC realloc
|
|
#endif
|
|
|
|
#ifndef MCU_FREE
|
|
#define MCU_FREE free
|
|
#endif
|
|
|
|
#if defined(_MSC_VER)
|
|
#define MCU_API __declspec(dllexport)
|
|
#elif defined(__GNUC__) || defined(__clang__)
|
|
#define MCU_API __attribute__((visibility("default")))
|
|
#else
|
|
#define MCU_API
|
|
#pragma warning Unknown dynamic link import/export semantics.
|
|
#endif
|
|
|
|
#ifdef MCUTIL_IMPLEMENTATION
|
|
// Add all new files
|
|
#include "../../src/collect/gen_vec.c"
|
|
#include "../../src/collect/hash_map.c"
|
|
#include "../../src/collect/str.c"
|
|
#include "../../src/collect/md5.c"
|
|
#endif // MCUTIL_IMPLEMENTATION
|
|
|
|
#endif // _H_MCUTIL
|