mirror of
				https://gitlab.gnome.org/GNOME/libxslt
				synced 2025-10-30 14:45:36 +03:00 
			
		
		
		
	Simplify xsltexports.h and exsltexports.h
Port the following libxml2 commit to libxslt:
acdc2ff360
Fixes #71.
			
			
This commit is contained in:
		| @@ -2,133 +2,56 @@ | ||||
|  * 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__ | ||||
|  | ||||
| /** | ||||
|  * 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 */ | ||||
|  | ||||
| /** | ||||
|  * EXSLTPUBFUN: | ||||
|  * EXSLTPUBLIC: | ||||
|  * | ||||
|  * Macros which declare an exportable function | ||||
|  * Macro which declares a public symbol | ||||
|  */ | ||||
| #define EXSLTPUBFUN | ||||
| /** | ||||
|  * EXSLTPUBVAR: | ||||
|  * | ||||
|  * Macros which declare an exportable variable | ||||
|  */ | ||||
| #define EXSLTPUBVAR extern | ||||
| #define EXSLTPUBLIC | ||||
|  | ||||
| /** | ||||
|  * EXSLTCALL: | ||||
|  * | ||||
|  * Macros which declare the called convention for exported functions | ||||
|  * Macro which declares the calling convention for exported functions | ||||
|  */ | ||||
| #define EXSLTCALL | ||||
|  | ||||
| /** DOC_DISABLE */ | ||||
| #endif /* platform switch */ | ||||
|  | ||||
| /* 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 | ||||
|  | ||||
| /* 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 | ||||
|  | ||||
| /* 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 | ||||
|  * EXSLTPUBFUN: | ||||
|  * | ||||
|  * Macro which declares an exportable function | ||||
|  */ | ||||
| #define EXSLTPUBFUN EXSLTPUBLIC | ||||
|  | ||||
| /* 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) | ||||
|   | ||||
| @@ -3,134 +3,56 @@ | ||||
|  * 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__ | ||||
|  | ||||
| /** | ||||
|  * 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 */ | ||||
|  | ||||
| /** | ||||
|  * XSLTPUBFUN: | ||||
|  * XSLTPUBLIC: | ||||
|  * | ||||
|  * Macros which declare an exportable function | ||||
|  * Macro which declares a public symbol | ||||
|  */ | ||||
| #define XSLTPUBFUN | ||||
| /** | ||||
|  * XSLTPUBVAR: | ||||
|  * | ||||
|  * Macros which declare an exportable variable | ||||
|  */ | ||||
| #define XSLTPUBVAR extern | ||||
| #define XSLTPUBLIC | ||||
|  | ||||
| /** | ||||
|  * XSLTCALL: | ||||
|  * | ||||
|  * Macros which declare the called convention for exported functions | ||||
|  * Macro which declares the calling convention for exported functions | ||||
|  */ | ||||
| #define XSLTCALL | ||||
|  | ||||
| /** DOC_DISABLE */ | ||||
| #endif /* platform switch */ | ||||
|  | ||||
| /* 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 | ||||
|  | ||||
| /* 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 | ||||
|  | ||||
| /* 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 | ||||
|  * XSLTPUBFUN: | ||||
|  * | ||||
|  * Macro which declares an exportable function | ||||
|  */ | ||||
| #define XSLTPUBFUN XSLTPUBLIC | ||||
|  | ||||
| /* 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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user