18#ifndef TRINITY_DEFINE_H
19#define TRINITY_DEFINE_H
23#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
24# if !defined(__STDC_FORMAT_MACROS)
25# define __STDC_FORMAT_MACROS
27# if !defined(__STDC_CONSTANT_MACROS)
28# define __STDC_CONSTANT_MACROS
30# if !defined(_GLIBCXX_USE_NANOSLEEP)
31# define _GLIBCXX_USE_NANOSLEEP
34# include <valgrind/helgrind.h>
35# undef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE
36# undef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER
37# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) ANNOTATE_HAPPENS_BEFORE(A)
38# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) ANNOTATE_HAPPENS_AFTER(A)
41# include <valgrind/memcheck.h>
49#define TRINITY_LITTLEENDIAN 0
50#define TRINITY_BIGENDIAN 1
52#if !defined(TRINITY_ENDIAN)
53# if defined (BOOST_BIG_ENDIAN)
54# define TRINITY_ENDIAN TRINITY_BIGENDIAN
56# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
60#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
61# define TRINITY_PATH_MAX 260
62# define _USE_MATH_DEFINES
64# define TRINITY_PATH_MAX PATH_MAX
67#if !defined(COREDEBUG)
68# define TRINITY_INLINE inline
70# if !defined(TRINITY_DEBUG)
73# define TRINITY_INLINE
76#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
77# define ATTR_PRINTF(F, V) __attribute__ ((__format__ (__printf__, F, V)))
79# define ATTR_PRINTF(F, V)
82#ifdef TRINITY_API_USE_DYNAMIC_LINKING
83# if TRINITY_COMPILER == TRINITY_COMPILER_MICROSOFT
84# define TC_API_EXPORT __declspec(dllexport)
85# define TC_API_IMPORT __declspec(dllimport)
86# elif TRINITY_COMPILER == TRINITY_COMPILER_GNU
87# define TC_API_EXPORT __attribute__((visibility("default")))
90# error compiler not supported!
97#ifdef TRINITY_API_EXPORT_COMMON
98# define TC_COMMON_API TC_API_EXPORT
100# define TC_COMMON_API TC_API_IMPORT
103#ifdef TRINITY_API_EXPORT_PROTO
104# define TC_PROTO_API TC_API_EXPORT
106# define TC_PROTO_API TC_API_IMPORT
109#ifdef TRINITY_API_EXPORT_DATABASE
110# define TC_DATABASE_API TC_API_EXPORT
112# define TC_DATABASE_API TC_API_IMPORT
115#ifdef TRINITY_API_EXPORT_SHARED
116# define TC_SHARED_API TC_API_EXPORT
118# define TC_SHARED_API TC_API_IMPORT
121#ifdef TRINITY_API_EXPORT_GAME
122# define TC_GAME_API TC_API_EXPORT
124# define TC_GAME_API TC_API_IMPORT
127#define UI64FMTD "%" PRIu64
128#define UI64LIT(N) UINT64_C(N)
130#define SI64FMTD "%" PRId64
131#define SI64LIT(N) INT64_C(N)
133#define SZFMTD "%" PRIuPTR
135#define STRING_VIEW_FMT "%.*s"
136#define STRING_VIEW_FMT_ARG(str) static_cast<int>((str).length()), (str).data()
@ FT_STRING_NOT_LOCALIZED