gmio/src/datax_core/global.h

85 lines
2.0 KiB
C
Raw Normal View History

#ifndef FOUG_C_GLOBAL_H
#define FOUG_C_GLOBAL_H
2013-01-25 22:37:06 +08:00
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) \
|| defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
# define FOUG_DECL_EXPORT __declspec(dllexport)
# define FOUG_DECL_IMPORT __declspec(dllimport)
#else
# define FOUG_DECL_EXPORT
# define FOUG_DECL_IMPORT
#endif /* WIN */
#ifdef FOUG_LIB_DLL
# ifdef FOUG_LIB_MAKE_DLL
# define FOUG_LIB_EXPORT FOUG_DECL_EXPORT
# else
# define FOUG_LIB_EXPORT FOUG_DECL_IMPORT
2013-03-06 17:27:37 +08:00
# endif /* FOUG_LIB_MAKE_DLL */
#else
# define FOUG_LIB_EXPORT
#endif /* FOUG_LIB_DLL */
/* "config.h" is generated by cmake, it should reside in the out-of-source build dir.
* In CMakeFiles.txt, the directory where resides "config.h" is added to the include path list
*/
#include "config.h"
2013-02-21 21:37:42 +08:00
#ifdef FOUG_HAVE_STDINT_H
# include <stdint.h>
#else
2014-01-21 17:49:24 +08:00
typedef char int8_t;
typedef unsigned char uint8_t;
2014-01-21 17:49:24 +08:00
typedef short int16_t;
typedef unsigned short uint16_t;
2014-01-21 17:49:24 +08:00
typedef int int32_t;
typedef unsigned int uint32_t;
2013-01-25 01:38:43 +08:00
/*# ifdef _MSC_VER
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
# else
typedef long long int64_t;
typedef unsigned long long uint64_t;
2013-01-25 01:38:43 +08:00
# endif*/ /* _MSC_VER */
#endif /* FOUG_USE_STDINT_H */
/*! Typedef for boolean type */
typedef int foug_bool_t;
2014-02-13 23:25:37 +08:00
/*! This enum defines true/false boolean values */
2014-01-30 17:19:22 +08:00
enum foug_bool_value
{
FOUG_FALSE = 0,
FOUG_TRUE = 1
};
/*! Typedef for 32bit real type (float) */
typedef float foug_real32_t;
2014-02-13 23:25:37 +08:00
/*! Typedef for 64bit real type (double) */
typedef double foug_real64_t;
#ifndef FOUG_INLINE
# if defined(__GNUC__)
# define FOUG_INLINE __inline__ /* Compatible with C90 */
# elif defined(_MSC_VER)
# define FOUG_INLINE __inline
# else
# define FOUG_INLINE
# endif
#endif /* !FOUG_INLINE */
#ifdef __cplusplus
# define FOUG_C_LINKAGE_BEGIN extern "C" {
# define FOUG_C_LINKAGE_END }
#else
# define FOUG_C_LINKAGE_BEGIN
# define FOUG_C_LINKAGE_END
#endif /* __cplusplus */
#endif /* FOUG_C_GLOBAL_H */