/
defs.h
58 lines (50 loc) · 1.11 KB
/
defs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// defs.h
// TICK
//
// Created by bacry on 27/12/2015.
// Copyright (c) 2015 bacry. All rights reserved.
//
#ifndef TICK_BASE_SRC_DEFS_H_
#define TICK_BASE_SRC_DEFS_H_
// License: BSD 3 clause
#ifdef PYTHON_LINK
#include <Python.h>
#endif
#include <cstdint>
#if defined _WIN32 || defined __CYGWIN__
#ifdef BUILDING_DLL
#ifdef __GNUC__
#define DLL_PUBLIC __attribute__ ((dllexport))
#else
// Note: actually gcc seems to also supports this syntax.
#define DLL_PUBLIC __declspec(dllexport)
#endif
#else
#ifdef __GNUC__
#define DLL_PUBLIC __attribute__ ((dllimport))
#else
// Note: actually gcc seems to also supports this syntax.
#define DLL_PUBLIC __declspec(dllimport)
#endif
#endif
#define DLL_LOCAL
#else
#if __GNUC__ >= 4
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
#define DLL_LOCAL __attribute__ ((visibility ("hidden")))
#else
#define DLL_PUBLIC
#define DLL_LOCAL
#endif
#endif
#ifndef ulong
typedef std::uint64_t ulong;
#endif
#ifndef ushort
typedef std::uint16_t ushort;
#endif
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif // _USE_MATH_DEFINES
#endif // TICK_BASE_SRC_DEFS_H_