 |
TrinityCore
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
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)
46#define TRINITY_LITTLEENDIAN 0
47#define TRINITY_BIGENDIAN 1
49#if !defined(TRINITY_ENDIAN)
50# if defined (BOOST_BIG_ENDIAN)
51# define TRINITY_ENDIAN TRINITY_BIGENDIAN
53# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
57#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
58# define TRINITY_PATH_MAX 260
60# define TRINITY_PATH_MAX PATH_MAX
63#if !defined(COREDEBUG)
64# define TRINITY_INLINE inline
66# if !defined(TRINITY_DEBUG)
69# define TRINITY_INLINE
72#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
73# define ATTR_PRINTF(F, V) __attribute__ ((__format__ (__printf__, F, V)))
75# define ATTR_PRINTF(F, V)
78#ifdef TRINITY_API_USE_DYNAMIC_LINKING
79# if TRINITY_COMPILER == TRINITY_COMPILER_MICROSOFT
80# define TC_API_EXPORT __declspec(dllexport)
81# define TC_API_IMPORT __declspec(dllimport)
82# elif TRINITY_COMPILER == TRINITY_COMPILER_GNU
83# define TC_API_EXPORT __attribute__((visibility("default")))
86# error compiler not supported!
93#ifdef TRINITY_API_EXPORT_COMMON
94# define TC_COMMON_API TC_API_EXPORT
96# define TC_COMMON_API TC_API_IMPORT
99#ifdef TRINITY_API_EXPORT_DATABASE
100# define TC_DATABASE_API TC_API_EXPORT
102# define TC_DATABASE_API TC_API_IMPORT
105#ifdef TRINITY_API_EXPORT_SHARED
106# define TC_SHARED_API TC_API_EXPORT
108# define TC_SHARED_API TC_API_IMPORT
111#ifdef TRINITY_API_EXPORT_GAME
112# define TC_GAME_API TC_API_EXPORT
114# define TC_GAME_API TC_API_IMPORT
117#define UI64FMTD "%" PRIu64
118#define UI64LIT(N) UINT64_C(N)
120#define SI64FMTD "%" PRId64
121#define SI64LIT(N) INT64_C(N)
123#define SZFMTD "%" PRIuPTR
125#define STRING_VIEW_FMT "%.*s"
126#define STRING_VIEW_FMT_ARG(str) static_cast<int>((str).length()), (str).data()