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 | |
Daniel Veillard | 3e59fc5 | 2003-04-18 12:34:58 +0000 | [diff] [blame] | 12 | #ifndef NO_LARGEFILE_SOURCE |
| 13 | #ifndef _LARGEFILE_SOURCE |
| 14 | #define _LARGEFILE_SOURCE |
| 15 | #endif |
| 16 | #ifndef _FILE_OFFSET_BITS |
| 17 | #define _FILE_OFFSET_BITS 64 |
| 18 | #endif |
| 19 | #endif |
| 20 | |
Igor Zlatkovic | a6ceeb4 | 2003-08-28 10:25:13 +0000 | [diff] [blame] | 21 | #if defined(macintosh) |
Daniel Veillard | d3b0882 | 2001-12-05 12:03:33 +0000 | [diff] [blame] | 22 | #include "config-mac.h" |
Daniel Veillard | 509ed2a | 2007-04-18 07:51:50 +0000 | [diff] [blame] | 23 | #elif defined(_WIN32_WCE) |
| 24 | /* |
| 25 | * Windows CE compatibility definitions and functions |
| 26 | * This is needed to compile libxml2 for Windows CE. |
| 27 | * At least I tested it with WinCE 5.0 for Emulator and WinCE 4.2/SH4 target |
| 28 | */ |
| 29 | #include <win32config.h> |
| 30 | #include <libxml/xmlversion.h> |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 31 | #else |
| 32 | #include "config.h" |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 33 | #include <libxml/xmlversion.h> |
Daniel Veillard | 87ee914 | 2001-06-28 12:54:16 +0000 | [diff] [blame] | 34 | #endif |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 35 | |
Daniel Veillard | f79fbfc | 2006-05-31 13:35:28 +0000 | [diff] [blame] | 36 | #if defined(__Lynx__) |
| 37 | #include <stdio.h> /* pull definition of size_t */ |
| 38 | #include <varargs.h> |
| 39 | int snprintf(char *, size_t, const char *, ...); |
| 40 | int vfprintf(FILE *, const char *, va_list); |
| 41 | #endif |
| 42 | |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 43 | #ifndef WITH_TRIO |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 44 | #include <stdio.h> |
| 45 | #else |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 46 | /** |
| 47 | * TRIO_REPLACE_STDIO: |
| 48 | * |
| 49 | * This macro is defined if teh trio string formatting functions are to |
| 50 | * be used instead of the default stdio ones. |
| 51 | */ |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 52 | #define TRIO_REPLACE_STDIO |
| 53 | #include "trio.h" |
| 54 | #endif |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 55 | |
Daniel Veillard | a880b12 | 2003-04-21 21:36:41 +0000 | [diff] [blame] | 56 | /* |
| 57 | * Internal variable indicating if a callback has been registered for |
| 58 | * node creation/destruction. It avoids spending a lot of time in locking |
| 59 | * function while checking if the callback exists. |
| 60 | */ |
| 61 | extern int __xmlRegisterCallbacks; |
Daniel Veillard | e8039df | 2003-10-27 11:25:13 +0000 | [diff] [blame] | 62 | /* |
| 63 | * internal error reporting routines, shared but not partof the API. |
| 64 | */ |
Daniel Veillard | 2b0f879 | 2003-10-10 19:36:36 +0000 | [diff] [blame] | 65 | void __xmlIOErr(int domain, int code, const char *extra); |
Daniel Veillard | e8039df | 2003-10-27 11:25:13 +0000 | [diff] [blame] | 66 | void __xmlLoaderErr(void *ctx, const char *msg, const char *filename); |
Daniel Veillard | 499cc92 | 2006-01-18 17:22:35 +0000 | [diff] [blame] | 67 | #ifdef LIBXML_HTML_ENABLED |
| 68 | /* |
| 69 | * internal function of HTML parser needed for xmlParseInNodeContext |
| 70 | * but not part of the API |
| 71 | */ |
| 72 | void __htmlParseContent(void *ctx); |
| 73 | #endif |
| 74 | |
Daniel Veillard | fde5b0b | 2007-02-12 17:31:53 +0000 | [diff] [blame] | 75 | /* |
| 76 | * internal global initialization critical section routines. |
| 77 | */ |
| 78 | void __xmlGlobalInitMutexLock(void); |
| 79 | void __xmlGlobalInitMutexUnlock(void); |
Rob Richards | 91eb560 | 2007-11-16 10:54:59 +0000 | [diff] [blame] | 80 | void __xmlGlobalInitMutexDestroy(void); |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 81 | |
| 82 | #ifdef IN_LIBXML |
| 83 | #ifdef __GNUC__ |
Daniel Veillard | be3eb20 | 2004-07-09 12:05:25 +0000 | [diff] [blame] | 84 | #ifdef PIC |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 85 | #ifdef linux |
Daniel Veillard | c0c6ce2 | 2005-03-10 09:22:07 +0000 | [diff] [blame] | 86 | #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 87 | #include "elfgcchack.h" |
| 88 | #endif |
| 89 | #endif |
| 90 | #endif |
Daniel Veillard | be3eb20 | 2004-07-09 12:05:25 +0000 | [diff] [blame] | 91 | #endif |
Daniel Veillard | c0c6ce2 | 2005-03-10 09:22:07 +0000 | [diff] [blame] | 92 | #endif |
Bjorn Reese | 70a9da5 | 2001-04-21 16:57:29 +0000 | [diff] [blame] | 93 | #endif /* ! __XML_LIBXML_H__ */ |