From 79a4463b1f151f15e60df3f57c1d3575acb0d444 Mon Sep 17 00:00:00 2001 From: cherierm Date: Tue, 19 Dec 2006 16:13:23 +0000 Subject: [PATCH 1/1] contains common definitions git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2999 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- win32_test_app/include/TDefs.h | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 win32_test_app/include/TDefs.h 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__ */ -- 2.20.1