/*
 * This file was based on an automatically generated file. For cross
 * compiling it's a bit difficult to rely on a binary to generate it.
 */

#ifndef _DUMA_CONFIG_H_
#define _DUMA_CONFIG_H_

/*
 * Configuration of DUMA:
 */
#ifdef DUMA_SO_LIBRARY

#ifdef DUMA_NO_GLOBAL_MALLOC_FREE
#undef DUMA_NO_GLOBAL_MALLOC_FREE
#endif

#ifdef DUMA_EXPLICIT_INIT
#undef DUMA_EXPLICIT_INIT
#endif

#ifdef DUMA_NO_THREAD_SAFETY
#undef DUMA_NO_THREAD_SAFETY
#endif

#ifdef DUMA_NO_CPP_SUPPORT
#undef DUMA_NO_CPP_SUPPORT
#endif

#ifdef DUMA_NO_LEAKDETECTION
#undef DUMA_NO_LEAKDETECTION
#endif

#ifdef DUMA_USE_FRAMENO
#undef DUMA_USE_FRAMENO
#endif

#ifdef DUMA_PREFER_ATEXIT
#undef DUMA_PREFER_ATEXIT
#endif

#ifdef DUMA_OLD_NEW_MACRO
#undef DUMA_OLD_NEW_MACRO
#endif

#ifdef DUMA_OLD_DEL_MACRO
#undef DUMA_OLD_DEL_MACRO
#endif

#ifdef DUMA_NO_HANG_MSG
#undef DUMA_NO_HANG_MSG
#endif

#else

#ifdef DUMA_NO_GLOBAL_MALLOC_FREE
#undef DUMA_NO_GLOBAL_MALLOC_FREE
#endif

#ifdef DUMA_EXPLICIT_INIT
#undef DUMA_EXPLICIT_INIT
#endif

#ifdef DUMA_NO_THREAD_SAFETY
#undef DUMA_NO_THREAD_SAFETY
#endif

#ifdef DUMA_NO_CPP_SUPPORT
#undef DUMA_NO_CPP_SUPPORT
#endif

#ifdef DUMA_NO_LEAKDETECTION
#undef DUMA_NO_LEAKDETECTION
#endif

#ifdef DUMA_USE_FRAMENO
#undef DUMA_USE_FRAMENO
#endif

#ifdef DUMA_PREFER_ATEXIT
#undef DUMA_PREFER_ATEXIT
#endif

#ifdef DUMA_OLD_NEW_MACRO
#undef DUMA_OLD_NEW_MACRO
#endif

#ifdef DUMA_OLD_DEL_MACRO
#undef DUMA_OLD_DEL_MACRO
#endif

#ifdef DUMA_NO_HANG_MSG
#undef DUMA_NO_HANG_MSG
#endif

#endif

/*
 * Number of bytes per virtual-memory page, as returned by Page_Size().
 */
#define DUMA_PAGE_SIZE 4096

/*
 * Minimum required alignment by CPU.
 */

#if defined(__mips__)
#define DUMA_MIN_ALIGNMENT 4
#else
#define DUMA_MIN_ALIGNMENT 1
#endif

/*
 * Build environment supports the '__attribute ((constructor))'?
 */
#define DUMA_GNU_INIT_ATTR 1

/*
 * An integer type with same size as 'void *'
 */
typedef unsigned int DUMA_ADDR;

/*
 * An integer type with same size as 'size_t'
 */
typedef unsigned int DUMA_SIZE;

#endif /* _DUMA_CONFIG_H_ */
