wineoss: Use dedicated macros to call interface functions.
[wine.git] / libs / xml2 / libxml.h
blob0b44dab0341a100781e06710391dafc4ff3bcbab
1 /*
2 * libxml.h: internal header only used during the compilation of libxml
4 * See COPYRIGHT for the status of this software
6 * Author: breese@users.sourceforge.net
7 */
9 #ifndef __XML_LIBXML_H__
10 #define __XML_LIBXML_H__
13 * These macros must be defined before including system headers.
14 * Do not add any #include directives above this block.
16 #ifndef NO_LARGEFILE_SOURCE
17 #ifndef _LARGEFILE_SOURCE
18 #define _LARGEFILE_SOURCE
19 #endif
20 #ifndef _FILE_OFFSET_BITS
21 #define _FILE_OFFSET_BITS 64
22 #endif
23 #endif
26 * Currently supported platforms use either autoconf or
27 * copy to config.h own "preset" configuration file.
28 * As result ifdef HAVE_CONFIG_H is omitted here.
30 #include "win32config.h"
31 #include <libxml/xmlversion.h>
32 #include <libxml/xmlstring.h>
34 #ifndef SYSCONFDIR
35 #define SYSCONFDIR "/etc"
36 #endif
38 #if defined(__Lynx__)
39 #include <stdio.h> /* pull definition of size_t */
40 #include <varargs.h>
41 int snprintf(char *, size_t, const char *, ...);
42 int vfprintf(FILE *, const char *, va_list);
43 #endif
45 #ifndef WITH_TRIO
46 #include <stdio.h>
47 #else
48 /**
49 * TRIO_REPLACE_STDIO:
51 * This macro is defined if the trio string formatting functions are to
52 * be used instead of the default stdio ones.
54 #define TRIO_REPLACE_STDIO
55 #include "trio.h"
56 #endif
58 #if defined(__clang__) || \
59 (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406))
60 #define XML_IGNORE_PEDANTIC_WARNINGS \
61 _Pragma("GCC diagnostic push") \
62 _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
63 #define XML_POP_WARNINGS \
64 _Pragma("GCC diagnostic pop")
65 #else
66 #define XML_IGNORE_PEDANTIC_WARNINGS
67 #define XML_POP_WARNINGS
68 #endif
70 #if defined(__clang__) || \
71 (defined(__GNUC__) && (__GNUC__ >= 8))
72 #define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
73 #else
74 #define ATTRIBUTE_NO_SANITIZE(arg)
75 #endif
78 * Internal variable indicating if a callback has been registered for
79 * node creation/destruction. It avoids spending a lot of time in locking
80 * function while checking if the callback exists.
82 extern int __xmlRegisterCallbacks;
84 * internal error reporting routines, shared but not part of the API.
86 void __xmlIOErr(int domain, int code, const char *extra);
87 void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0);
88 #ifdef LIBXML_HTML_ENABLED
90 * internal function of HTML parser needed for xmlParseInNodeContext
91 * but not part of the API
93 void __htmlParseContent(void *ctx);
94 #endif
97 * internal global initialization critical section routines.
99 void __xmlGlobalInitMutexLock(void);
100 void __xmlGlobalInitMutexUnlock(void);
101 void __xmlGlobalInitMutexDestroy(void);
103 int __xmlInitializeDict(void);
106 * internal thread safe random function
108 int __xmlRandom(void);
110 XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
111 int xmlInputReadCallbackNop(void *context, char *buffer, int len);
113 #if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
114 # define LIBXML_STATIC
115 #endif
116 #endif /* ! __XML_LIBXML_H__ */