aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-07-21 13:24:09 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-07-21 13:24:09 +0000
commitffa3c74933baa45bef5e0d7f15473c38a4c3f9e8 (patch)
tree84f52d5e52e95e317df8141643359a563107409d /include
parent0a119ebe61fd211b5dd11ecac83020481999a3b2 (diff)
downloadandroid_external_libxml2-ffa3c74933baa45bef5e0d7f15473c38a4c3f9e8.tar.gz
android_external_libxml2-ffa3c74933baa45bef5e0d7f15473c38a4c3f9e8.tar.bz2
android_external_libxml2-ffa3c74933baa45bef5e0d7f15473c38a4c3f9e8.zip
applied a patch from Marcus Boerger to fix problems with calling
* error.c globals.c parser.c runtest.c testHTML.c testSAX.c threads.c valid.c xmllint.c xmlreader.c xmlschemas.c xmlstring.c xmlwriter.c include/libxml/parser.h include/libxml/relaxng.h include/libxml/valid.h include/libxml/xmlIO.h include/libxml/xmlerror.h include/libxml/xmlexports.h include/libxml/xmlschemas.h: applied a patch from Marcus Boerger to fix problems with calling conventions on Windows this should fix #309757 Daniel
Diffstat (limited to 'include')
-rw-r--r--include/libxml/parser.h6
-rw-r--r--include/libxml/relaxng.h4
-rw-r--r--include/libxml/valid.h4
-rw-r--r--include/libxml/xmlIO.h16
-rw-r--r--include/libxml/xmlerror.h12
-rw-r--r--include/libxml/xmlexports.h21
-rw-r--r--include/libxml/xmlschemas.h4
7 files changed, 43 insertions, 24 deletions
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index 7203ca3c..6e750e71 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -591,7 +591,7 @@ typedef void (*cdataBlockSAXFunc) (
*
* Display and format a warning messages, callback.
*/
-typedef void (*warningSAXFunc) (void *ctx,
+typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
const char *msg, ...);
/**
* errorSAXFunc:
@@ -601,7 +601,7 @@ typedef void (*warningSAXFunc) (void *ctx,
*
* Display and format an error messages, callback.
*/
-typedef void (*errorSAXFunc) (void *ctx,
+typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
const char *msg, ...);
/**
* fatalErrorSAXFunc:
@@ -613,7 +613,7 @@ typedef void (*errorSAXFunc) (void *ctx,
* Note: so far fatalError() SAX callbacks are not used, error()
* get all the callbacks for errors.
*/
-typedef void (*fatalErrorSAXFunc) (void *ctx,
+typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
const char *msg, ...);
/**
* isStandaloneSAXFunc:
diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h
index cd753982..c75aba29 100644
--- a/include/libxml/relaxng.h
+++ b/include/libxml/relaxng.h
@@ -27,8 +27,8 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
/**
* A schemas validation context
*/
-typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
-typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
diff --git a/include/libxml/valid.h b/include/libxml/valid.h
index 86e3fce4..d13e4eb1 100644
--- a/include/libxml/valid.h
+++ b/include/libxml/valid.h
@@ -39,7 +39,7 @@ typedef xmlValidState *xmlValidStatePtr;
* Callback called when a validity error is found. This is a message
* oriented function similar to an *printf function.
*/
-typedef void (*xmlValidityErrorFunc) (void *ctx,
+typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
const char *msg,
...);
@@ -54,7 +54,7 @@ typedef void (*xmlValidityErrorFunc) (void *ctx,
* Callback called when a validity warning is found. This is a message
* oriented function similar to an *printf function.
*/
-typedef void (*xmlValidityWarningFunc) (void *ctx,
+typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
const char *msg,
...);
diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h
index 0f7b8a8c..e67b6e55 100644
--- a/include/libxml/xmlIO.h
+++ b/include/libxml/xmlIO.h
@@ -31,7 +31,7 @@ extern "C" {
*
* Returns 1 if yes and 0 if another Input module should be used
*/
-typedef int (*xmlInputMatchCallback) (char const *filename);
+typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
/**
* xmlInputOpenCallback:
* @filename: the filename or URI
@@ -40,7 +40,7 @@ typedef int (*xmlInputMatchCallback) (char const *filename);
*
* Returns an Input context or NULL in case or error
*/
-typedef void * (*xmlInputOpenCallback) (char const *filename);
+typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
/**
* xmlInputReadCallback:
* @context: an Input context
@@ -51,7 +51,7 @@ typedef void * (*xmlInputOpenCallback) (char const *filename);
*
* Returns the number of bytes read or -1 in case of error
*/
-typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
+typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
/**
* xmlInputCloseCallback:
* @context: an Input context
@@ -60,7 +60,7 @@ typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
*
* Returns 0 or -1 in case of error
*/
-typedef int (*xmlInputCloseCallback) (void * context);
+typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
#ifdef LIBXML_OUTPUT_ENABLED
/*
@@ -77,7 +77,7 @@ typedef int (*xmlInputCloseCallback) (void * context);
*
* Returns 1 if yes and 0 if another Output module should be used
*/
-typedef int (*xmlOutputMatchCallback) (char const *filename);
+typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
/**
* xmlOutputOpenCallback:
* @filename: the filename or URI
@@ -86,7 +86,7 @@ typedef int (*xmlOutputMatchCallback) (char const *filename);
*
* Returns an Output context or NULL in case or error
*/
-typedef void * (*xmlOutputOpenCallback) (char const *filename);
+typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
/**
* xmlOutputWriteCallback:
* @context: an Output context
@@ -97,7 +97,7 @@ typedef void * (*xmlOutputOpenCallback) (char const *filename);
*
* Returns the number of bytes written or -1 in case of error
*/
-typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
+typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
int len);
/**
* xmlOutputCloseCallback:
@@ -107,7 +107,7 @@ typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
*
* Returns 0 or -1 in case of error
*/
-typedef int (*xmlOutputCloseCallback) (void * context);
+typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef __cplusplus
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index 04da1a60..1d028298 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -815,7 +815,7 @@ typedef enum {
* Signature of the function to use when there is an error and
* no parsing or validity context available .
*/
-typedef void (*xmlGenericErrorFunc) (void *ctx,
+typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
const char *msg,
...);
/**
@@ -826,7 +826,7 @@ typedef void (*xmlGenericErrorFunc) (void *ctx,
* Signature of the function to use when there is an error and
* the module handles the new error reporting mechanism.
*/
-typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
+typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
/*
* Use the following function to reset the two global variables
@@ -845,19 +845,19 @@ XMLPUBFUN void XMLCALL
* Default message routines used by SAX and Valid context for error
* and warning reporting.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCDECL
xmlParserError (void *ctx,
const char *msg,
...);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCDECL
xmlParserWarning (void *ctx,
const char *msg,
...);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCDECL
xmlParserValidityError (void *ctx,
const char *msg,
...);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCDECL
xmlParserValidityWarning (void *ctx,
const char *msg,
...);
diff --git a/include/libxml/xmlexports.h b/include/libxml/xmlexports.h
index ee03cad1..500f1954 100644
--- a/include/libxml/xmlexports.h
+++ b/include/libxml/xmlexports.h
@@ -40,6 +40,13 @@
* Macros which declare the called convention for exported functions
*/
#define XMLCALL
+/**
+ * XMLCALL:
+ *
+ * Macro which declares the calling convention for exported functions that
+ * use '...'.
+ */
+#define XMLCDECL
/** DOC_DISABLE */
@@ -48,6 +55,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
+ #undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
@@ -59,7 +67,12 @@
#define XMLPUBVAR extern
#endif
#endif
- #define XMLCALL __cdecl
+ #if defined(LIBXML_FASTCALL)
+ #define XMLCALL __fastcall
+ #else
+ #define XMLCALL __cdecl
+ #endif
+ #define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
@@ -70,6 +83,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
+ #undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport) extern
@@ -82,6 +96,7 @@
#endif
#endif
#define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
@@ -92,6 +107,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
+ #undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
@@ -104,6 +120,7 @@
#endif
#endif
#define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
@@ -114,6 +131,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
+ #undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
@@ -126,6 +144,7 @@
#endif
#endif
#define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
#endif
/* Compatibility */
diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h
index 89fc4b4c..ab470914 100644
--- a/include/libxml/xmlschemas.h
+++ b/include/libxml/xmlschemas.h
@@ -87,8 +87,8 @@ typedef xmlSchema *xmlSchemaPtr;
/**
* A schemas validation context
*/
-typedef void (*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
-typedef void (*xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;