xsltexports.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. * Summary: macros for marking symbols as exportable/importable.
  3. * Description: macros for marking symbols as exportable/importable.
  4. *
  5. * Copy: See Copyright for the status of this software.
  6. *
  7. * Author: Igor Zlatkovic <igor@zlatkovic.com>
  8. */
  9. #ifndef __XSLT_EXPORTS_H__
  10. #define __XSLT_EXPORTS_H__
  11. /**
  12. * XSLTPUBFUN:
  13. * XSLTPUBFUN, XSLTPUBVAR, XSLTCALL
  14. *
  15. * Macros which declare an exportable function, an exportable variable and
  16. * the calling convention used for functions.
  17. *
  18. * Please use an extra block for every platform/compiler combination when
  19. * modifying this, rather than overlong #ifdef lines. This helps
  20. * readability as well as the fact that different compilers on the same
  21. * platform might need different definitions.
  22. */
  23. /**
  24. * XSLTPUBFUN:
  25. *
  26. * Macros which declare an exportable function
  27. */
  28. #define XSLTPUBFUN
  29. /**
  30. * XSLTPUBVAR:
  31. *
  32. * Macros which declare an exportable variable
  33. */
  34. #define XSLTPUBVAR extern
  35. /**
  36. * XSLTCALL:
  37. *
  38. * Macros which declare the called convention for exported functions
  39. */
  40. #define XSLTCALL
  41. /** DOC_DISABLE */
  42. /* Windows platform with MS compiler */
  43. #if defined(_WIN32) && defined(_MSC_VER)
  44. #undef XSLTPUBFUN
  45. #undef XSLTPUBVAR
  46. #undef XSLTCALL
  47. #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
  48. #define XSLTPUBFUN __declspec(dllexport)
  49. #define XSLTPUBVAR __declspec(dllexport)
  50. #else
  51. #define XSLTPUBFUN
  52. #if !defined(LIBXSLT_STATIC)
  53. #define XSLTPUBVAR __declspec(dllimport) extern
  54. #else
  55. #define XSLTPUBVAR extern
  56. #endif
  57. #endif
  58. #define XSLTCALL __cdecl
  59. #if !defined _REENTRANT
  60. #define _REENTRANT
  61. #endif
  62. #endif
  63. /* Windows platform with Borland compiler */
  64. #if defined(_WIN32) && defined(__BORLANDC__)
  65. #undef XSLTPUBFUN
  66. #undef XSLTPUBVAR
  67. #undef XSLTCALL
  68. #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
  69. #define XSLTPUBFUN __declspec(dllexport)
  70. #define XSLTPUBVAR __declspec(dllexport) extern
  71. #else
  72. #define XSLTPUBFUN
  73. #if !defined(LIBXSLT_STATIC)
  74. #define XSLTPUBVAR __declspec(dllimport) extern
  75. #else
  76. #define XSLTPUBVAR extern
  77. #endif
  78. #endif
  79. #define XSLTCALL __cdecl
  80. #if !defined _REENTRANT
  81. #define _REENTRANT
  82. #endif
  83. #endif
  84. /* Windows platform with GNU compiler (Mingw) */
  85. #if defined(_WIN32) && defined(__MINGW32__)
  86. #undef XSLTPUBFUN
  87. #undef XSLTPUBVAR
  88. #undef XSLTCALL
  89. /*
  90. #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
  91. */
  92. #if !defined(LIBXSLT_STATIC)
  93. #define XSLTPUBFUN __declspec(dllexport)
  94. #define XSLTPUBVAR __declspec(dllexport) extern
  95. #else
  96. #define XSLTPUBFUN
  97. #if !defined(LIBXSLT_STATIC)
  98. #define XSLTPUBVAR __declspec(dllimport) extern
  99. #else
  100. #define XSLTPUBVAR extern
  101. #endif
  102. #endif
  103. #define XSLTCALL __cdecl
  104. #if !defined _REENTRANT
  105. #define _REENTRANT
  106. #endif
  107. #endif
  108. /* Cygwin platform (does not define _WIN32), GNU compiler */
  109. #if defined(__CYGWIN__)
  110. #undef XSLTPUBFUN
  111. #undef XSLTPUBVAR
  112. #undef XSLTCALL
  113. #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
  114. #define XSLTPUBFUN __declspec(dllexport)
  115. #define XSLTPUBVAR __declspec(dllexport)
  116. #else
  117. #define XSLTPUBFUN
  118. #if !defined(LIBXSLT_STATIC)
  119. #define XSLTPUBVAR __declspec(dllimport) extern
  120. #else
  121. #define XSLTPUBVAR extern
  122. #endif
  123. #endif
  124. #define XSLTCALL __cdecl
  125. #endif
  126. /* Compatibility */
  127. #if !defined(LIBXSLT_PUBLIC)
  128. #define LIBXSLT_PUBLIC XSLTPUBVAR
  129. #endif
  130. #endif /* __XSLT_EXPORTS_H__ */