Vanilla.PDF  2.0.0
Cross-platform toolkit for creating and modifying PDF documents
c_export.h
Go to the documentation of this file.
1#ifndef _C_EXPORT_H
2#define _C_EXPORT_H
3
4#include "c_platform.h"
5
12/*
13* Calling convention extended explanation
14* GCC triggers a warning on arm processors "warning: 'cdecl' attribute directive ignored"
15* From the documentation they state it is only applicable for Intel 386
16* https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Function-Attributes.html
17* On the Intel 386, the cdecl attribute causes the compiler to assume that the calling function
18* will pop off the stack space used to pass arguments.This is useful to override the effects of the - mrtd switch.
19*/
20
21#if defined(COMPILER_MICROSOFT_VISUAL_STUDIO) && defined(PROCESSOR_X86)
22 #define CALLING_CONVENTION __cdecl
23#elif defined(COMPILER_GCC) && defined(PROCESSOR_X86)
24 #define CALLING_CONVENTION __attribute__ ((cdecl))
25#else
26 #define CALLING_CONVENTION
27#endif
28
29#if defined(VANILLAPDF_CONFIGURATION_DLL) && defined(COMPILER_MICROSOFT_VISUAL_STUDIO)
30 #if defined(VANILLAPDF_EXPORTS)
31 #define VANILLAPDF_API __declspec(dllexport)
32 #else
33 #define VANILLAPDF_API __declspec(dllimport)
34 #endif
35#else
36 #define VANILLAPDF_API
37#endif
38
39#endif /* _C_EXPORT_H */
This file contains macro declarations about current platform and compiler.