From: cherierm Date: Tue, 19 Dec 2006 16:13:23 +0000 (+0000) Subject: contains common definitions X-Git-Tag: v3.3~2360 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/79a4463b1f151f15e60df3f57c1d3575acb0d444?hp=e7c4935b3e19e0d8835009ce154447cdf7826050 contains common definitions git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2999 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/win32_test_app/include/TDefs.h b/win32_test_app/include/TDefs.h new file mode 100644 index 0000000000..c88c444f4b --- /dev/null +++ b/win32_test_app/include/TDefs.h @@ -0,0 +1,47 @@ +#ifndef __DEFS_H__ +#define __DEFS_H__ + +#include + +/* NULL definition*/ +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif /* #ifndef NULL*/ + +#if !defined(__cplusplus) && !defined(__BOOL_TYPE_DEFINED) +typedef int bool; +#define __BOOL_TYPE_DEFINED +#endif /* #ifndef __cplusplus*/ + +#ifndef __SSIZE_TYPE_DEFINED +typedef int ssize_t; +#define __SSIZE_TYPE_DEFINED +#endif /* #ifndef __SSIZE_TYPE_DEFINED */ + +#ifndef true +#define true 1 +#endif /* #ifndef true*/ + +#ifndef false +#define false 0 +#endif /* #ifndef false*/ + +/* Asserts that a condition is true.*/ +#define ASSERT(c) assert(c) +/* Asserts that a pointer is not NULL.*/ +#define ASSERT_NOT_NULL(p) assert(NULL != p) + +/* Error number type (int) */ +#ifndef __ERRNO_TYPE_DEFINED +typedef int errno_t; +#define __ERRNO_TYPE_DEFINED +#endif /* #ifndef __ERRNO_TYPE_DEFINED */ + +/* comment this line if you don't want activate the verbose mode. */ +#define __VERBOSE + +#endif /* #ifndef __DEFS_H__ */