epoc32/include/stdapis/libxml2/libxml2_xmlexports.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     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 Zlatovic <igor@zlatkovic.com>
       
     8  * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
       
     9  */
       
    10 
       
    11 /** @file
       
    12 @publishedAll
       
    13 @released
       
    14 */
       
    15 
       
    16 #ifndef XML_EXPORTS_H
       
    17 #define XML_EXPORTS_H
       
    18 
       
    19 /**
       
    20  * XMLPUBFUN, XMLPUBVAR, XMLCALL
       
    21  *
       
    22  * Macros which declare an exportable function, an exportable variable and
       
    23  * the calling convention used for functions.
       
    24  *
       
    25  * Please use an extra block for every platform/compiler combination when
       
    26  * modifying this, rather than overlong #ifdef lines. This helps
       
    27  * readability as well as the fact that different compilers on the same
       
    28  * platform might need different definitions.
       
    29  */
       
    30 
       
    31 /**
       
    32  * XMLPUBFUN:
       
    33  *
       
    34  * Macros which declare an exportable function
       
    35  */
       
    36 #define XMLPUBFUN
       
    37 /**
       
    38  * XMLPUBVAR:
       
    39  *
       
    40  * Macros which declare an exportable variable
       
    41  */
       
    42 #define XMLPUBVAR extern
       
    43 /**
       
    44  * XMLCALL:
       
    45  *
       
    46  * Macros which declare the called convention for exported functions
       
    47  */
       
    48 #define XMLCALL
       
    49 #define XMLPUBFUNEXPORT __declspec(dllexport)
       
    50 
       
    51 /** DOC_DISABLE */
       
    52 
       
    53 /* Windows platform with MS compiler */
       
    54 #if defined(_WIN32) && defined(_MSC_VER)
       
    55   #undef XMLPUBFUN
       
    56   #undef XMLPUBVAR
       
    57   #undef XMLCALL
       
    58   #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
       
    59     #define XMLPUBFUN __declspec(dllexport)
       
    60     #define XMLPUBVAR __declspec(dllexport)
       
    61   #else
       
    62     #define XMLPUBFUN
       
    63     #if !defined(LIBXML_STATIC)
       
    64       #define XMLPUBVAR __declspec(dllimport) extern
       
    65     #else
       
    66       #define XMLPUBVAR extern
       
    67     #endif
       
    68   #endif
       
    69   #define XMLCALL __cdecl
       
    70   #if !defined _REENTRANT
       
    71     #define _REENTRANT
       
    72   #endif
       
    73 #endif
       
    74 
       
    75 /* Windows platform with Borland compiler */
       
    76 #if defined(_WIN32) && defined(__BORLANDC__)
       
    77   #undef XMLPUBFUN
       
    78   #undef XMLPUBVAR
       
    79   #undef XMLCALL
       
    80   #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
       
    81     #define XMLPUBFUN __declspec(dllexport)
       
    82     #define XMLPUBVAR __declspec(dllexport) extern
       
    83   #else
       
    84     #define XMLPUBFUN
       
    85     #if !defined(LIBXML_STATIC)
       
    86       #define XMLPUBVAR __declspec(dllimport) extern
       
    87     #else
       
    88       #define XMLPUBVAR extern
       
    89     #endif
       
    90   #endif
       
    91   #define XMLCALL __cdecl
       
    92   #if !defined _REENTRANT
       
    93     #define _REENTRANT
       
    94   #endif
       
    95 #endif
       
    96 
       
    97 /* Windows platform with GNU compiler (Mingw) */
       
    98 #if defined(_WIN32) && defined(__MINGW32__)
       
    99   #undef XMLPUBFUN
       
   100   #undef XMLPUBVAR
       
   101   #undef XMLCALL
       
   102   #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
       
   103     #define XMLPUBFUN __declspec(dllexport)
       
   104     #define XMLPUBVAR __declspec(dllexport)
       
   105   #else
       
   106     #define XMLPUBFUN
       
   107     #if !defined(LIBXML_STATIC)
       
   108       #define XMLPUBVAR __declspec(dllimport) extern
       
   109     #else
       
   110       #define XMLPUBVAR extern
       
   111     #endif
       
   112   #endif
       
   113   #define XMLCALL __cdecl
       
   114   #if !defined _REENTRANT
       
   115     #define _REENTRANT
       
   116   #endif
       
   117 #endif
       
   118 
       
   119 /* Cygwin platform, GNU compiler */
       
   120 #if defined(_WIN32) && defined(__CYGWIN__)
       
   121   #undef XMLPUBFUN
       
   122   #undef XMLPUBVAR
       
   123   #undef XMLCALL
       
   124   #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
       
   125     #define XMLPUBFUN __declspec(dllexport)
       
   126     #define XMLPUBVAR __declspec(dllexport)
       
   127   #else
       
   128     #define XMLPUBFUN
       
   129     #if !defined(LIBXML_STATIC)
       
   130       #define XMLPUBVAR __declspec(dllimport) extern
       
   131     #else
       
   132       #define XMLPUBVAR
       
   133     #endif
       
   134   #endif
       
   135   #define XMLCALL __cdecl
       
   136 #endif
       
   137 
       
   138 /* Symbian: WINS/WINSCW/WINC/ARMI/ARMv5 */
       
   139 #if defined(__SYMBIAN32__) && (__ARMCC_VERSION > 230000)
       
   140 #  define XMLPUBFUN __declspec(dllimport)
       
   141 #  define XMLPUBVAR __declspec(dllimport) extern
       
   142 #else
       
   143 
       
   144 #  undef  XMLPUBFUN
       
   145 #ifdef IN_LIBXML
       
   146 #  define XMLPUBFUN __declspec(dllexport)
       
   147 #else
       
   148 #  define XMLPUBFUN __declspec(dllimport)
       
   149 #endif
       
   150 
       
   151 #  undef  XMLPUBVAR
       
   152 #  if defined(IN_LIBXML) 
       
   153 #    define XMLPUBVAR __declspec(dllexport) extern
       
   154 #  else
       
   155 #    define XMLPUBVAR __declspec(dllimport) extern
       
   156 #endif
       
   157 
       
   158 #endif
       
   159 
       
   160 /* Compatibility */
       
   161 #if !defined(LIBXML_DLL_IMPORT)
       
   162 #define LIBXML_DLL_IMPORT XMLPUBVAR
       
   163 #endif
       
   164 
       
   165 #endif /* XML_EXPORTS_H */
       
   166