CCAux  2.17.6.0
CCAux API reference
CCPlatform.h
Go to the documentation of this file.
1 /************************************************
2 *
3 * CROSSCONTROL AUX API
4 *
5 * CCPlatform.h
6 *
7 * Version 2.17.6.0", 2021-04-08
8 *
9 * (c) CrossControl 2010-2020
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 #ifndef EXTERN_C
25 # define EXTERN_C extern "C"
26 #endif /* #ifndef EXTERN_C */
27 #else
28 # define EXTERN_C
29 #endif
30 
31 #ifdef LINUX /* Calling conventions */
32 # define CCAUXDLL_API EXTERN_C
33 # define CCAUXDLL_CALLING_CONV
34 #else
35 # define CCAUXDLL_CALLING_CONV __stdcall
36 # if defined(CCAUXDLL_EXPORTS)
37 
38  #ifdef USE_DLL_EXPORT
39  #undef USE_DLL_EXPORT
40  #endif /* #ifdef USE_DLL_EXPORT */
41 
42  #ifdef USE_DLL_EXPORT
43  #define CCAUXDLL_API extern "C" __declspec(dllexport)
44  #else /* #ifdef USE_DLL_EXPORT */
45  #define CCAUXDLL_API extern "C"
46  #endif /* #ifdef USE_DLL_EXPORT */
47 
48 # else
49 # define CCAUXDLL_API __declspec(dllimport)
50 # endif
51 #endif
52 
53 #ifdef LINUX /* Macros specifying ordinals for Win32 */
54 #define EXPORT_ORDINAL(ordinal)
55 #define EXPORT_ORDINAL_FUNCD(ordinal)
56 #else
57 #define EXPORT_ORDINAL(ordinal) comment(linker, "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__ ",@" #ordinal)
58 #define EXPORT_ORDINAL_FUNCD(ordinal) comment(linker, "/EXPORT:" __FUNCDNAME__ ",@" #ordinal)
59 #endif
60 
61 /****************************************************************************
62 // CHARACTER TYPE
63 ****************************************************************************/
64 #ifdef LINUX
65 # include <wchar.h>
66 # if defined(_UNICODE) || defined(UNICODE)
67 # define LPCTSTR whcar_t const *
68 # define TCHAR wchar_t
69 # define _T(x) L ## x
70 # else
71 #ifndef LPCTSTR
72 # define LPCTSTR char_t const *
73 #endif
74 #ifndef TCHAR
75 # define TCHAR char_t
76 #endif
77 #ifndef _T
78 # define _T(x) x
79 #endif
80 # endif
81 #else
82 # include <wchar.h>
83 #endif
84 
85 #endif /* PLATFORM__H */
86