blob: 7558b5f06295e77c00731836a7890073e47c6335 [file] [log] [blame]
Bjorn Reese70a9da52001-04-21 16:57:29 +00001/*
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 Veillard3e59fc52003-04-18 12:34:58 +000012#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 Zlatkovica6ceeb42003-08-28 10:25:13 +000021#if defined(macintosh)
Daniel Veillardd3b08822001-12-05 12:03:33 +000022#include "config-mac.h"
Daniel Veillard509ed2a2007-04-18 07:51:50 +000023#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 Reese70a9da52001-04-21 16:57:29 +000031#else
Roumen Petrov1f0453f2012-08-13 16:56:11 +080032/*
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 */
Bjorn Reese70a9da52001-04-21 16:57:29 +000037#include "config.h"
Bjorn Reese70a9da52001-04-21 16:57:29 +000038#include <libxml/xmlversion.h>
Daniel Veillard87ee9142001-06-28 12:54:16 +000039#endif
Bjorn Reese70a9da52001-04-21 16:57:29 +000040
Daniel Veillardf79fbfc2006-05-31 13:35:28 +000041#if defined(__Lynx__)
42#include <stdio.h> /* pull definition of size_t */
43#include <varargs.h>
44int snprintf(char *, size_t, const char *, ...);
45int vfprintf(FILE *, const char *, va_list);
46#endif
47
Daniel Veillard7cf5e442001-09-10 20:16:32 +000048#ifndef WITH_TRIO
Bjorn Reese70a9da52001-04-21 16:57:29 +000049#include <stdio.h>
50#else
Daniel Veillard5e2dace2001-07-18 19:30:27 +000051/**
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 */
Bjorn Reese70a9da52001-04-21 16:57:29 +000057#define TRIO_REPLACE_STDIO
58#include "trio.h"
59#endif
Bjorn Reese70a9da52001-04-21 16:57:29 +000060
Daniel Veillarda880b122003-04-21 21:36:41 +000061/*
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 */
66extern int __xmlRegisterCallbacks;
Daniel Veillarde8039df2003-10-27 11:25:13 +000067/*
68 * internal error reporting routines, shared but not partof the API.
69 */
Daniel Veillard2b0f8792003-10-10 19:36:36 +000070void __xmlIOErr(int domain, int code, const char *extra);
Daniel Veillarde8039df2003-10-27 11:25:13 +000071void __xmlLoaderErr(void *ctx, const char *msg, const char *filename);
Daniel Veillard499cc922006-01-18 17:22:35 +000072#ifdef LIBXML_HTML_ENABLED
73/*
74 * internal function of HTML parser needed for xmlParseInNodeContext
75 * but not part of the API
76 */
77void __htmlParseContent(void *ctx);
78#endif
79
Daniel Veillardfde5b0b2007-02-12 17:31:53 +000080/*
81 * internal global initialization critical section routines.
82 */
83void __xmlGlobalInitMutexLock(void);
84void __xmlGlobalInitMutexUnlock(void);
Rob Richards91eb5602007-11-16 10:54:59 +000085void __xmlGlobalInitMutexDestroy(void);
Daniel Veillarda2351322004-06-27 12:08:10 +000086
Daniel Veillard379ebc12012-05-18 15:41:31 +080087#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
88/*
89 * internal thread safe random function
90 */
91int __xmlRandom(void);
92#endif
93
Daniel Veillard153cf152012-10-26 13:50:47 +080094int xmlNop(void);
95
Daniel Veillarda2351322004-06-27 12:08:10 +000096#ifdef IN_LIBXML
97#ifdef __GNUC__
Daniel Veillardbe3eb202004-07-09 12:05:25 +000098#ifdef PIC
Daniel Veillarda2351322004-06-27 12:08:10 +000099#ifdef linux
Daniel Veillardc0c6ce22005-03-10 09:22:07 +0000100#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
Daniel Veillarda2351322004-06-27 12:08:10 +0000101#include "elfgcchack.h"
102#endif
103#endif
104#endif
Daniel Veillardbe3eb202004-07-09 12:05:25 +0000105#endif
Daniel Veillardc0c6ce22005-03-10 09:22:07 +0000106#endif
Rob Richardsa295fbc2010-03-19 06:31:55 -0400107#if !defined(PIC) && !defined(NOLIBTOOL)
Roumen Petrov120a2692010-03-10 10:07:49 +0100108# define LIBXML_STATIC
109#endif
Bjorn Reese70a9da52001-04-21 16:57:29 +0000110#endif /* ! __XML_LIBXML_H__ */