forked from jasonweiyi/XAPI2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCrossPlatform.h
More file actions
46 lines (39 loc) · 1014 Bytes
/
CrossPlatform.h
File metadata and controls
46 lines (39 loc) · 1014 Bytes
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
#ifndef _CROSS_PLATFORM_H_
#define _CROSS_PLATFORM_H_
#if defined _WIN32 || defined __CYGWIN__
#ifdef BUILDING_DLL
#ifdef __GNUC__
#define DLL_PUBLIC __attribute__ ((dllexport))
#else
#define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
#endif
#else
#ifdef __GNUC__
#define DLL_PUBLIC __attribute__ ((dllimport))
#else
#define DLL_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
#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
#ifdef BUILDING_QUEUE_DLL
#define QUEUE_DLL_PUBLIC DLL_PUBLIC
#else
#define QUEUE_DLL_PUBLIC
#endif
#ifndef _WIN32
#define MAX_PATH 1024
// #define min(x, y) ((x) < (y) ? (x) : (y))
#ifndef __stdcall
#define __stdcall
#endif
#endif
#endif // _CROSS_PLATFORM_H_