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 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 21 #if defined(macintosh) 22 #include "config-mac.h" 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> 31 #else 32 /* 33 * Currently supported platforms use either autoconf or 34 * copy to config.h own "preset" configuration file. 35 * As result ifdef HAVE_CONFIG_H is omited here. 36 */ 37 #include "config.h" 38 #include <libxml/xmlversion.h> 39 #endif 40 41 #if defined(__Lynx__) 42 #include <stdio.h> /* pull definition of size_t */ 43 #include <varargs.h> 44 int snprintf(char *, size_t, const char *, ...); 45 int vfprintf(FILE *, const char *, va_list); 46 #endif 47 48 #ifndef WITH_TRIO 49 #include <stdio.h> 50 #else 51 /** 52 * TRIO_REPLACE_STDIO: 53 * 54 * This macro is defined if teh trio string formatting functions are to 55 * be used instead of the default stdio ones. 56 */ 57 #define TRIO_REPLACE_STDIO 58 #include "trio.h" 59 #endif 60 61 /* 62 * Internal variable indicating if a callback has been registered for 63 * node creation/destruction. It avoids spending a lot of time in locking 64 * function while checking if the callback exists. 65 */ 66 extern int __xmlRegisterCallbacks; 67 /* 68 * internal error reporting routines, shared but not partof the API. 69 */ 70 void __xmlIOErr(int domain, int code, const char *extra); 71 void __xmlLoaderErr(void *ctx, const char *msg, const char *filename); 72 #ifdef LIBXML_HTML_ENABLED 73 /* 74 * internal function of HTML parser needed for xmlParseInNodeContext 75 * but not part of the API 76 */ 77 void __htmlParseContent(void *ctx); 78 #endif 79 80 /* 81 * internal global initialization critical section routines. 82 */ 83 void __xmlGlobalInitMutexLock(void); 84 void __xmlGlobalInitMutexUnlock(void); 85 void __xmlGlobalInitMutexDestroy(void); 86 87 int __xmlInitializeDict(void); 88 89 #if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME) 90 /* 91 * internal thread safe random function 92 */ 93 int __xmlRandom(void); 94 #endif 95 96 int xmlNop(void); 97 98 #ifdef IN_LIBXML 99 #ifdef __GNUC__ 100 #ifdef PIC 101 #ifdef linux 102 #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) 103 #include "elfgcchack.h" 104 #endif 105 #endif 106 #endif 107 #endif 108 #endif 109 #if !defined(PIC) && !defined(NOLIBTOOL) 110 # define LIBXML_STATIC 111 #endif 112 #endif /* ! __XML_LIBXML_H__ */ 113