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
63# define TRINITY_PATH_MAX PATH_MAX
66#if !defined(COREDEBUG)
67# define TRINITY_INLINE inline
69# if !defined(TRINITY_DEBUG)
72# define TRINITY_INLINE
75#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
76# define ATTR_PRINTF(F, V) __attribute__ ((__format__ (__printf__, F, V)))
78# define ATTR_PRINTF(F, V)
81#ifdef TRINITY_API_USE_DYNAMIC_LINKING
82# if TRINITY_COMPILER == TRINITY_COMPILER_MICROSOFT
83# define TC_API_EXPORT __declspec(dllexport)
84# define TC_API_IMPORT __declspec(dllimport)
85# elif TRINITY_COMPILER == TRINITY_COMPILER_GNU
86# define TC_API_EXPORT __attribute__((visibility("default")))
89# error compiler not supported!
96#ifdef TRINITY_API_EXPORT_COMMON
97# define TC_COMMON_API TC_API_EXPORT
99# define TC_COMMON_API TC_API_IMPORT
102#ifdef TRINITY_API_EXPORT_PROTO
103# define TC_PROTO_API TC_API_EXPORT
105# define TC_PROTO_API TC_API_IMPORT
108#ifdef TRINITY_API_EXPORT_DATABASE
109# define TC_DATABASE_API TC_API_EXPORT
111# define TC_DATABASE_API TC_API_IMPORT
114#ifdef TRINITY_API_EXPORT_SHARED
115# define TC_SHARED_API TC_API_EXPORT
117# define TC_SHARED_API TC_API_IMPORT
120#ifdef TRINITY_API_EXPORT_GAME
121# define TC_GAME_API TC_API_EXPORT
123# define TC_GAME_API TC_API_IMPORT
126#define UI64FMTD "%" PRIu64
127#define UI64LIT(N) UINT64_C(N)
129#define SI64FMTD "%" PRId64
130#define SI64LIT(N) INT64_C(N)
132#define SZFMTD "%" PRIuPTR
134#define STRING_VIEW_FMT "%.*s"
135#define STRING_VIEW_FMT_ARG(str) static_cast<int>((str).length()), (str).data()
@ FT_STRING_NOT_LOCALIZED