#ifndef _GLOBAL_H_
#define _GLOBAL_H_
/**
 * \file global.h
 * \brief This file holds the global includes, mostly for debuging, tracing and profiling
 *
 *
 * \ingroup corefiles
 * \date Apr 13, 2009
 * \author Alexander Pimenov
 */

#ifdef __cplusplus
	extern "C" {
#endif
// Hooks for memory profiling and leaks search
#define dv_malloc malloc
#define dv_calloc calloc
#define dv_free free

#ifdef WIN32
	#define strdup _strdup 
#endif

#ifdef ASSERTS
#include <stdlib.h>
#include <stdio.h>

#define DOASSERT(X) \
do {                                                         \
	printf("Assert at %s:%d - %s\n", __FILE__, __LINE__, X); \
	fflush(stdout);                                          \
	exit (-2);                                               \
} while (0);

#endif

#if( defined(WIN32) && defined(_MSC_VER) )
#define snprintf sprintf_s
#endif


#ifdef __cplusplus
	} // 	extern "C"
#endif

#endif // _GLOBAL_H_
