1 /*! \file pabidecl.h 2 \brief calling conventions. 3 4 * APICALL and BACKCALL can be something like __stdcall or __cdecl (compiler-specific). 5 6 * APICALL set the calling convention for exported symbols. 7 8 * BACKCALL set the calling convention for callback pointers. 9 10 * By default, the code uses C standard (Cdecl) calling conventions. 11 * One can override the calling conventions by defining their own 12 * APICALL and BACKCALL macro. 13 */ 14 15 #ifndef _PABIDECL_H 16 #define _PABIDECL_H 1 17 18 #ifdef __cplusplus 19 #define TMPLPRO_EXTERN_C extern "C" 20 #else 21 #define TMPLPRO_EXTERN_C 22 #endif 23 24 #if defined( __WIN32__ ) || defined( _WIN32 ) || defined __CYGWIN__ 25 # define TMPLPRO_HIDDEN_SYM 26 # if defined(HTMLTMPLPRO_STATIC) 27 # define TMPLPRO_EXPORT_SYM 28 # else 29 # if defined( htmltmplpro_EXPORTS ) || defined (DLL_EXPORT) 30 # define TMPLPRO_EXPORT_SYM __declspec(dllexport) 31 # else 32 # define TMPLPRO_EXPORT_SYM __declspec(dllimport) 33 # endif 34 # endif 35 #elif __GNUC__ >= 4 36 # define TMPLPRO_EXPORT_SYM __attribute__ ((visibility("default"))) 37 # define TMPLPRO_HIDDEN_SYM __attribute__ ((visibility("hidden"))) 38 #else 39 # define TMPLPRO_EXPORT_SYM 40 # define TMPLPRO_HIDDEN_SYM 41 #endif 42 43 #ifndef APICALL 44 #define APICALL 45 #endif 46 #ifndef BACKCALL 47 #define BACKCALL 48 #endif 49 50 #define TMPLPRO_API TMPLPRO_EXTERN_C TMPLPRO_EXPORT_SYM 51 #define API_IMPL TMPLPRO_EXPORT_SYM 52 #define TMPLPRO_LOCAL TMPLPRO_HIDDEN_SYM 53 54 #endif /* pabidecl.h */ 55