The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [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 | |
Xin Li | e742c3a | 2017-03-02 10:59:49 -0800 | [diff] [blame] | 12 | #include <libxml/xmlstring.h> |
| 13 | |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [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 | |
| 23 | #if defined(macintosh) |
| 24 | #include "config-mac.h" |
| 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> |
| 33 | #else |
Selim Gurun | 94442ad | 2013-12-30 18:23:42 -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 | */ |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 39 | #include "config.h" |
| 40 | #include <libxml/xmlversion.h> |
| 41 | #endif |
| 42 | |
| 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 | |
| 50 | #ifndef WITH_TRIO |
| 51 | #include <stdio.h> |
| 52 | #else |
| 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 | */ |
| 59 | #define TRIO_REPLACE_STDIO |
| 60 | #include "trio.h" |
| 61 | #endif |
| 62 | |
| 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; |
| 69 | /* |
| 70 | * internal error reporting routines, shared but not partof the API. |
| 71 | */ |
| 72 | void __xmlIOErr(int domain, int code, const char *extra); |
Xin Li | e742c3a | 2017-03-02 10:59:49 -0800 | [diff] [blame] | 73 | void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0); |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [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 | |
| 82 | /* |
| 83 | * internal global initialization critical section routines. |
| 84 | */ |
| 85 | void __xmlGlobalInitMutexLock(void); |
| 86 | void __xmlGlobalInitMutexUnlock(void); |
Patrick Scott | 60a4c35 | 2009-07-09 09:30:54 -0400 | [diff] [blame] | 87 | void __xmlGlobalInitMutexDestroy(void); |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 88 | |
Selim Gurun | 94442ad | 2013-12-30 18:23:42 -0800 | [diff] [blame] | 89 | int __xmlInitializeDict(void); |
| 90 | |
| 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 | |
Xin Li | e742c3a | 2017-03-02 10:59:49 -0800 | [diff] [blame] | 98 | XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg); |
Selim Gurun | 94442ad | 2013-12-30 18:23:42 -0800 | [diff] [blame] | 99 | int xmlNop(void); |
| 100 | |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 101 | #ifdef IN_LIBXML |
| 102 | #ifdef __GNUC__ |
| 103 | #ifdef PIC |
| 104 | #ifdef linux |
| 105 | #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) |
| 106 | #include "elfgcchack.h" |
| 107 | #endif |
| 108 | #endif |
| 109 | #endif |
| 110 | #endif |
| 111 | #endif |
Selim Gurun | df143a5 | 2012-03-05 14:35:53 -0800 | [diff] [blame] | 112 | #if !defined(PIC) && !defined(NOLIBTOOL) |
| 113 | # define LIBXML_STATIC |
| 114 | #endif |
The Android Open Source Project | ab4e2e9 | 2009-03-03 19:30:06 -0800 | [diff] [blame] | 115 | #endif /* ! __XML_LIBXML_H__ */ |