Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 1 | /* |
| 2 | * libxml.h: internal header only used during the compilation of libxml |
| 3 | * |
| 4 | * See COPYRIGHT for the status of this software |
| 5 | * |
| 6 | * Author: breese@users.sourceforge.net |
| 7 | */ |
| 8 | |
| 9 | #ifndef __XML_LIBXML_H__ |
| 10 | #define __XML_LIBXML_H__ |
| 11 | |
David Kilzer | 502f6a6 | 2016-05-23 14:58:41 +0800 | [diff] [blame] | 12 | #include <libxml/xmlstring.h> |
| 13 | |
Daniel Veillard | 3e59fc5 | 2003-04-18 12:34:58 +0000 | [diff] [blame] | 14 | #ifndef NO_LARGEFILE_SOURCE |
| 15 | #ifndef _LARGEFILE_SOURCE |
| 16 | #define _LARGEFILE_SOURCE |
| 17 | #endif |
| 18 | #ifndef _FILE_OFFSET_BITS |
| 19 | #define _FILE_OFFSET_BITS 64 |
| 20 | #endif |
| 21 | #endif |
| 22 | |
Igor Zlatkovic | a6ceeb4 | 2003-08-28 10:25:13 +0000 | [diff] [blame] | 23 | #if defined(macintosh) |
Daniel Veillard | d3b0882 | 2001-12-05 12:03:33 +0000 | [diff] [blame] | 24 | #include "config-mac.h" |
Daniel Veillard | 509ed2a | 2007-04-18 07:51:50 +0000 | [diff] [blame] | 25 | #elif defined(_WIN32_WCE) |
| 26 | /* |
| 27 | * Windows CE compatibility definitions and functions |
| 28 | * This is needed to compile libxml2 for Windows CE. |
| 29 | * At least I tested it with WinCE 5.0 for Emulator and WinCE 4.2/SH4 target |
| 30 | */ |
| 31 | #include <win32config.h> |
| 32 | #include <libxml/xmlversion.h> |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 33 | #else |
Roumen Petrov | 1f0453f | 2012-08-13 16:56:11 +0800 | [diff] [blame] | 34 | /* |
| 35 | * Currently supported platforms use either autoconf or |
| 36 | * copy to config.h own "preset" configuration file. |
| 37 | * As result ifdef HAVE_CONFIG_H is omited here. |
| 38 | */ |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 39 | #include "config.h" |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 40 | #include <libxml/xmlversion.h> |
Daniel Veillard | 87ee914 | 2001-06-28 12:54:16 +0000 | [diff] [blame] | 41 | #endif |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 42 | |
Daniel Veillard | f79fbfc | 2006-05-31 13:35:28 +0000 | [diff] [blame] | 43 | #if defined(__Lynx__) |
| 44 | #include <stdio.h> /* pull definition of size_t */ |
| 45 | #include <varargs.h> |
| 46 | int snprintf(char *, size_t, const char *, ...); |
| 47 | int vfprintf(FILE *, const char *, va_list); |
| 48 | #endif |
| 49 | |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 50 | #ifndef WITH_TRIO |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 51 | #include <stdio.h> |
| 52 | #else |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 53 | /** |
| 54 | * TRIO_REPLACE_STDIO: |
| 55 | * |
| 56 | * This macro is defined if teh trio string formatting functions are to |
| 57 | * be used instead of the default stdio ones. |
| 58 | */ |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 59 | #define TRIO_REPLACE_STDIO |
| 60 | #include "trio.h" |
| 61 | #endif |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 62 | |
Daniel Veillard | a880b12 | 2003-04-21 21:36:41 +0000 | [diff] [blame] | 63 | /* |
| 64 | * Internal variable indicating if a callback has been registered for |
| 65 | * node creation/destruction. It avoids spending a lot of time in locking |
| 66 | * function while checking if the callback exists. |
| 67 | */ |
| 68 | extern int __xmlRegisterCallbacks; |
Daniel Veillard | e8039df | 2003-10-27 11:25:13 +0000 | [diff] [blame] | 69 | /* |
| 70 | * internal error reporting routines, shared but not partof the API. |
| 71 | */ |
Daniel Veillard | 2b0f879 | 2003-10-10 19:36:36 +0000 | [diff] [blame] | 72 | void __xmlIOErr(int domain, int code, const char *extra); |
David Kilzer | 4472c3a | 2016-05-13 15:13:17 +0800 | [diff] [blame] | 73 | void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0); |
Daniel Veillard | 499cc92 | 2006-01-18 17:22:35 +0000 | [diff] [blame] | 74 | #ifdef LIBXML_HTML_ENABLED |
| 75 | /* |
| 76 | * internal function of HTML parser needed for xmlParseInNodeContext |
| 77 | * but not part of the API |
| 78 | */ |
| 79 | void __htmlParseContent(void *ctx); |
| 80 | #endif |
| 81 | |
Daniel Veillard | fde5b0b | 2007-02-12 17:31:53 +0000 | [diff] [blame] | 82 | /* |
| 83 | * internal global initialization critical section routines. |
| 84 | */ |
| 85 | void __xmlGlobalInitMutexLock(void); |
| 86 | void __xmlGlobalInitMutexUnlock(void); |
Rob Richards | 91eb560 | 2007-11-16 10:54:59 +0000 | [diff] [blame] | 87 | void __xmlGlobalInitMutexDestroy(void); |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 88 | |
Daniel Veillard | 5fe9e9e | 2013-04-05 23:10:41 +0800 | [diff] [blame] | 89 | int __xmlInitializeDict(void); |
| 90 | |
Daniel Veillard | 379ebc1 | 2012-05-18 15:41:31 +0800 | [diff] [blame] | 91 | #if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME) |
| 92 | /* |
| 93 | * internal thread safe random function |
| 94 | */ |
| 95 | int __xmlRandom(void); |
| 96 | #endif |
| 97 | |
David Kilzer | 502f6a6 | 2016-05-23 14:58:41 +0800 | [diff] [blame] | 98 | XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg); |
Daniel Veillard | 153cf15 | 2012-10-26 13:50:47 +0800 | [diff] [blame] | 99 | int xmlNop(void); |
| 100 | |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 101 | #ifdef IN_LIBXML |
| 102 | #ifdef __GNUC__ |
Daniel Veillard | be3eb20 | 2004-07-09 12:05:25 +0000 | [diff] [blame] | 103 | #ifdef PIC |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 104 | #ifdef linux |
Daniel Veillard | c0c6ce2 | 2005-03-10 09:22:07 +0000 | [diff] [blame] | 105 | #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 106 | #include "elfgcchack.h" |
| 107 | #endif |
| 108 | #endif |
| 109 | #endif |
Daniel Veillard | be3eb20 | 2004-07-09 12:05:25 +0000 | [diff] [blame] | 110 | #endif |
Daniel Veillard | c0c6ce2 | 2005-03-10 09:22:07 +0000 | [diff] [blame] | 111 | #endif |
Rob Richards | a295fbc | 2010-03-19 06:31:55 -0400 | [diff] [blame] | 112 | #if !defined(PIC) && !defined(NOLIBTOOL) |
Roumen Petrov | 120a269 | 2010-03-10 10:07:49 +0100 | [diff] [blame] | 113 | # define LIBXML_STATIC |
| 114 | #endif |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 115 | #endif /* ! __XML_LIBXML_H__ */ |