diff --git a/libexslt/exsltexports.h b/libexslt/exsltexports.h index 86ed8ac0e9968ac4f76c43f94316ebf930fa26bd_bGliZXhzbHQvZXhzbHRleHBvcnRzLmg=..124f4c3563bf2a5e5462b9789ae7c10f158fbe61_bGliZXhzbHQvZXhzbHRleHBvcnRzLmg= 100644 --- a/libexslt/exsltexports.h +++ b/libexslt/exsltexports.h @@ -2,10 +2,8 @@ * Summary: macros for marking symbols as exportable/importable. * * Copy: See Copyright for the status of this software. - * - * Author: Igor Zlatkovic <igor@zlatkovic.com> */ #ifndef __EXSLT_EXPORTS_H__ #define __EXSLT_EXPORTS_H__ @@ -7,18 +5,22 @@ */ #ifndef __EXSLT_EXPORTS_H__ #define __EXSLT_EXPORTS_H__ -/** - * EXSLTPUBFUN, EXSLTPUBVAR, EXSLTCALL - * - * Macros which declare an exportable function, an exportable variable and - * the calling convention used for functions. - * - * Please use an extra block for every platform/compiler combination when - * modifying this, rather than overlong #ifdef lines. This helps - * readability as well as the fact that different compilers on the same - * platform might need different definitions. - */ +#if defined(_WIN32) || defined(__CYGWIN__) +/** DOC_DISABLE */ + +#ifdef LIBEXSLT_STATIC + #define EXSLTPUBLIC +#elif defined(IN_LIBEXSLT) + #define EXSLTPUBLIC __declspec(dllexport) +#else + #define EXSLTPUBLIC __declspec(dllimport) +#endif + +#define EXSLTCALL __cdecl + +/** DOC_ENABLE */ +#else /* not Windows */ /** @@ -23,4 +25,4 @@ /** - * EXSLTPUBFUN: + * EXSLTPUBLIC: * @@ -26,3 +28,3 @@ * - * Macros which declare an exportable function + * Macro which declares a public symbol */ @@ -28,11 +30,6 @@ */ -#define EXSLTPUBFUN -/** - * EXSLTPUBVAR: - * - * Macros which declare an exportable variable - */ -#define EXSLTPUBVAR extern +#define EXSLTPUBLIC + /** * EXSLTCALL: * @@ -36,7 +33,7 @@ /** * EXSLTCALL: * - * Macros which declare the called convention for exported functions + * Macro which declares the calling convention for exported functions */ #define EXSLTCALL @@ -40,27 +37,5 @@ */ #define EXSLTCALL -/** DOC_DISABLE */ - -/* Windows platform with MS compiler */ -#if defined(_WIN32) && defined(_MSC_VER) - #undef EXSLTPUBFUN - #undef EXSLTPUBVAR - #undef EXSLTCALL - #if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC) - #define EXSLTPUBFUN __declspec(dllexport) - #define EXSLTPUBVAR __declspec(dllexport) - #else - #define EXSLTPUBFUN - #if !defined(LIBEXSLT_STATIC) - #define EXSLTPUBVAR __declspec(dllimport) extern - #else - #define EXSLTPUBVAR extern - #endif - #endif - #define EXSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif +#endif /* platform switch */ @@ -66,23 +41,8 @@ -/* Windows platform with Borland compiler */ -#if defined(_WIN32) && defined(__BORLANDC__) - #undef EXSLTPUBFUN - #undef EXSLTPUBVAR - #undef EXSLTCALL - #if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC) - #define EXSLTPUBFUN __declspec(dllexport) - #define EXSLTPUBVAR __declspec(dllexport) extern - #else - #define EXSLTPUBFUN - #if !defined(LIBEXSLT_STATIC) - #define EXSLTPUBVAR __declspec(dllimport) extern - #else - #define EXSLTPUBVAR extern - #endif - #endif - #define EXSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif +/* + * EXSLTPUBFUN: + * + * Macro which declares an exportable function + */ +#define EXSLTPUBFUN EXSLTPUBLIC @@ -88,47 +48,10 @@ -/* Windows platform with GNU compiler (Mingw) */ -#if defined(_WIN32) && defined(__MINGW32__) - #undef EXSLTPUBFUN - #undef EXSLTPUBVAR - #undef EXSLTCALL -/* - #if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC) -*/ - #if !defined(LIBEXSLT_STATIC) - #define EXSLTPUBFUN __declspec(dllexport) - #define EXSLTPUBVAR __declspec(dllexport) extern - #else - #define EXSLTPUBFUN - #if !defined(LIBEXSLT_STATIC) - #define EXSLTPUBVAR __declspec(dllimport) extern - #else - #define EXSLTPUBVAR extern - #endif - #endif - #define EXSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif - -/* Cygwin platform (does not define _WIN32), GNU compiler */ -#if defined(__CYGWIN__) - #undef EXSLTPUBFUN - #undef EXSLTPUBVAR - #undef EXSLTCALL - #if defined(IN_LIBEXSLT) && !defined(LIBEXSLT_STATIC) - #define EXSLTPUBFUN __declspec(dllexport) - #define EXSLTPUBVAR __declspec(dllexport) - #else - #define EXSLTPUBFUN - #if !defined(LIBEXSLT_STATIC) - #define EXSLTPUBVAR __declspec(dllimport) extern - #else - #define EXSLTPUBVAR extern - #endif - #endif - #define EXSLTCALL __cdecl -#endif +/** + * EXSLTPUBVAR: + * + * Macro which declares an exportable variable + */ +#define EXSLTPUBVAR EXSLTPUBLIC extern /* Compatibility */ #if !defined(LIBEXSLT_PUBLIC) diff --git a/libxslt/xsltexports.h b/libxslt/xsltexports.h index 86ed8ac0e9968ac4f76c43f94316ebf930fa26bd_bGlieHNsdC94c2x0ZXhwb3J0cy5o..124f4c3563bf2a5e5462b9789ae7c10f158fbe61_bGlieHNsdC94c2x0ZXhwb3J0cy5o 100644 --- a/libxslt/xsltexports.h +++ b/libxslt/xsltexports.h @@ -3,10 +3,8 @@ * Description: macros for marking symbols as exportable/importable. * * Copy: See Copyright for the status of this software. - * - * Author: Igor Zlatkovic <igor@zlatkovic.com> */ #ifndef __XSLT_EXPORTS_H__ #define __XSLT_EXPORTS_H__ @@ -8,19 +6,22 @@ */ #ifndef __XSLT_EXPORTS_H__ #define __XSLT_EXPORTS_H__ -/** - * XSLTPUBFUN: - * XSLTPUBFUN, XSLTPUBVAR, XSLTCALL - * - * Macros which declare an exportable function, an exportable variable and - * the calling convention used for functions. - * - * Please use an extra block for every platform/compiler combination when - * modifying this, rather than overlong #ifdef lines. This helps - * readability as well as the fact that different compilers on the same - * platform might need different definitions. - */ +#if defined(_WIN32) || defined(__CYGWIN__) +/** DOC_DISABLE */ + +#ifdef LIBXSLT_STATIC + #define XSLTPUBLIC +#elif defined(IN_LIBXSLT) + #define XSLTPUBLIC __declspec(dllexport) +#else + #define XSLTPUBLIC __declspec(dllimport) +#endif + +#define XSLTCALL __cdecl + +/** DOC_ENABLE */ +#else /* not Windows */ /** @@ -25,4 +26,4 @@ /** - * XSLTPUBFUN: + * XSLTPUBLIC: * @@ -28,3 +29,3 @@ * - * Macros which declare an exportable function + * Macro which declares a public symbol */ @@ -30,11 +31,6 @@ */ -#define XSLTPUBFUN -/** - * XSLTPUBVAR: - * - * Macros which declare an exportable variable - */ -#define XSLTPUBVAR extern +#define XSLTPUBLIC + /** * XSLTCALL: * @@ -38,7 +34,7 @@ /** * XSLTCALL: * - * Macros which declare the called convention for exported functions + * Macro which declares the calling convention for exported functions */ #define XSLTCALL @@ -42,27 +38,5 @@ */ #define XSLTCALL -/** DOC_DISABLE */ - -/* Windows platform with MS compiler */ -#if defined(_WIN32) && defined(_MSC_VER) - #undef XSLTPUBFUN - #undef XSLTPUBVAR - #undef XSLTCALL - #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) - #define XSLTPUBFUN __declspec(dllexport) - #define XSLTPUBVAR __declspec(dllexport) - #else - #define XSLTPUBFUN - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBVAR __declspec(dllimport) extern - #else - #define XSLTPUBVAR extern - #endif - #endif - #define XSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif +#endif /* platform switch */ @@ -68,23 +42,8 @@ -/* Windows platform with Borland compiler */ -#if defined(_WIN32) && defined(__BORLANDC__) - #undef XSLTPUBFUN - #undef XSLTPUBVAR - #undef XSLTCALL - #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) - #define XSLTPUBFUN __declspec(dllexport) - #define XSLTPUBVAR __declspec(dllexport) extern - #else - #define XSLTPUBFUN - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBVAR __declspec(dllimport) extern - #else - #define XSLTPUBVAR extern - #endif - #endif - #define XSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif +/* + * XSLTPUBFUN: + * + * Macro which declares an exportable function + */ +#define XSLTPUBFUN XSLTPUBLIC @@ -90,47 +49,10 @@ -/* Windows platform with GNU compiler (Mingw) */ -#if defined(_WIN32) && defined(__MINGW32__) - #undef XSLTPUBFUN - #undef XSLTPUBVAR - #undef XSLTCALL -/* - #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) -*/ - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBFUN __declspec(dllexport) - #define XSLTPUBVAR __declspec(dllexport) extern - #else - #define XSLTPUBFUN - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBVAR __declspec(dllimport) extern - #else - #define XSLTPUBVAR extern - #endif - #endif - #define XSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif - -/* Cygwin platform (does not define _WIN32), GNU compiler */ -#if defined(__CYGWIN__) - #undef XSLTPUBFUN - #undef XSLTPUBVAR - #undef XSLTCALL - #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) - #define XSLTPUBFUN __declspec(dllexport) - #define XSLTPUBVAR __declspec(dllexport) - #else - #define XSLTPUBFUN - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBVAR __declspec(dllimport) extern - #else - #define XSLTPUBVAR extern - #endif - #endif - #define XSLTCALL __cdecl -#endif +/** + * XSLTPUBVAR: + * + * Macro which declares an exportable variable + */ +#define XSLTPUBVAR XSLTPUBLIC extern /* Compatibility */ #if !defined(LIBXSLT_PUBLIC)