CCAux  2.8.3.0
CCAux API reference
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator
CCPlatform.h
Go to the documentation of this file.
1 /************************************************
2 *
3 * CROSSCONTROL AUX API
4 *
5 * CCPlatform.h
6 *
7 * Version 2.8.3.0, 2016-04-06
8 *
9 * (c) maximatecc 2013
10 *
11 
12  * File description:
13  * Platform dependent defines
14  *
15  ************************************************/
16 
17 #ifndef PLATFORM__H
18 #define PLATFORM__H
19 
20 //*****************************************************************************
21 // CALLING CONVENTION DEFINES
22 //*****************************************************************************
23 #ifdef __cplusplus
24 # define EXTERN_C extern "C"
25 #else
26 # define EXTERN_C
27 #endif
28 
29 #ifdef LINUX // Calling conventions
30 # define CCAUXDLL_API EXTERN_C
31 # define CCAUXDLL_CALLING_CONV
32 #else
33 # define CCAUXDLL_CALLING_CONV __stdcall
34 # if defined(CCAUXDLL_EXPORTS)
35  #define CCAUXDLL_API EXTERN_C
36 # else
37 # define CCAUXDLL_API __declspec(dllimport)
38 # endif
39 #endif
40 
41 #ifdef LINUX //Macros specifying ordinals for Win32
42 #define EXPORT_ORDINAL(ordinal)
43 #define EXPORT_ORDINAL_FUNCD(ordinal)
44 #else
45 #define EXPORT_ORDINAL(ordinal) comment(linker, "/EXPORT:"__FUNCTION__"="__FUNCDNAME__",@"#ordinal)
46 #define EXPORT_ORDINAL_FUNCD(ordinal) comment(linker, "/EXPORT:"__FUNCDNAME__",@"#ordinal)
47 #endif
48 
49 //*****************************************************************************
50 // CHARACTER TYPE
51 //*****************************************************************************
52 #ifdef LINUX // string types
53 # include <wchar.h>
54 # if defined(_UNICODE) || defined(UNICODE)
55 # define LPCTSTR whcar_t const *
56 # define TCHAR wchar_t
57 # define _T(x) L ## x
58 # else
59 # define LPCTSTR char const *
60 # define TCHAR char
61 # define _T(x) x
62 # endif
63 #else
64 # include <wchar.h>
65 #endif
66 
67 #endif /* PLATFORM__H */
68