2001-04-21 16:57:29 +00:00
/*
* libxml . h : internal header only used during the compilation of libxml
*
* See COPYRIGHT for the status of this software
*
* Author : breese @ users . sourceforge . net
*/
# ifndef __XML_LIBXML_H__
# define __XML_LIBXML_H__
2016-05-23 14:58:41 +08:00
# include <libxml/xmlstring.h>
2003-04-18 12:34:58 +00:00
# ifndef NO_LARGEFILE_SOURCE
# ifndef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE
# endif
# ifndef _FILE_OFFSET_BITS
# define _FILE_OFFSET_BITS 64
# endif
# endif
2003-08-28 10:25:13 +00:00
# if defined(macintosh)
2001-12-05 12:03:33 +00:00
# include "config-mac.h"
2007-04-18 07:51:50 +00:00
# elif defined(_WIN32_WCE)
/*
* Windows CE compatibility definitions and functions
* This is needed to compile libxml2 for Windows CE .
* At least I tested it with WinCE 5.0 for Emulator and WinCE 4.2 / SH4 target
*/
# include <win32config.h>
# include <libxml/xmlversion.h>
2001-04-21 16:57:29 +00:00
# else
2012-08-13 16:56:11 +08:00
/*
* Currently supported platforms use either autoconf or
* copy to config . h own " preset " configuration file .
2019-09-30 17:04:54 +02:00
* As result ifdef HAVE_CONFIG_H is omitted here .
2012-08-13 16:56:11 +08:00
*/
2001-04-21 16:57:29 +00:00
# include "config.h"
# include <libxml/xmlversion.h>
2001-06-28 12:54:16 +00:00
# endif
2001-04-21 16:57:29 +00:00
2006-05-31 13:35:28 +00:00
# if defined(__Lynx__)
# include <stdio.h> /* pull definition of size_t */
# include <varargs.h>
int snprintf ( char * , size_t , const char * , . . . ) ;
int vfprintf ( FILE * , const char * , va_list ) ;
# endif
2001-09-10 20:16:32 +00:00
# ifndef WITH_TRIO
2001-04-21 16:57:29 +00:00
# include <stdio.h>
# else
2001-07-18 19:30:27 +00:00
/**
* TRIO_REPLACE_STDIO :
*
2019-09-30 17:04:54 +02:00
* This macro is defined if the trio string formatting functions are to
2001-07-18 19:30:27 +00:00
* be used instead of the default stdio ones .
*/
2001-04-21 16:57:29 +00:00
# define TRIO_REPLACE_STDIO
# include "trio.h"
# endif
2017-11-12 17:28:12 +01:00
# if defined(__clang__) || \
( defined ( __GNUC__ ) & & ( __GNUC__ * 100 + __GNUC_MINOR__ > = 406 ) )
# define XML_IGNORE_PEDANTIC_WARNINGS \
_Pragma ( " GCC diagnostic push " ) \
_Pragma ( " GCC diagnostic ignored \" -Wpedantic \" " )
# define XML_POP_WARNINGS \
_Pragma ( " GCC diagnostic pop " )
# else
# define XML_IGNORE_PEDANTIC_WARNINGS
# define XML_POP_WARNINGS
# endif
2019-05-16 21:17:28 +02:00
# if defined(__clang__) || \
( defined ( __GNUC__ ) & & ( __GNUC__ > = 8 ) )
# define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
# else
# define ATTRIBUTE_NO_SANITIZE(arg)
# endif
2003-04-21 21:36:41 +00:00
/*
* Internal variable indicating if a callback has been registered for
* node creation / destruction . It avoids spending a lot of time in locking
* function while checking if the callback exists .
*/
extern int __xmlRegisterCallbacks ;
2003-10-27 11:25:13 +00:00
/*
2019-09-30 17:04:54 +02:00
* internal error reporting routines , shared but not part of the API .
2003-10-27 11:25:13 +00:00
*/
2003-10-10 19:36:36 +00:00
void __xmlIOErr ( int domain , int code , const char * extra ) ;
2016-05-13 15:13:17 +08:00
void __xmlLoaderErr ( void * ctx , const char * msg , const char * filename ) LIBXML_ATTR_FORMAT ( 2 , 0 ) ;
2006-01-18 17:22:35 +00:00
# ifdef LIBXML_HTML_ENABLED
/*
* internal function of HTML parser needed for xmlParseInNodeContext
* but not part of the API
*/
void __htmlParseContent ( void * ctx ) ;
# endif
2007-02-12 17:31:53 +00:00
/*
* internal global initialization critical section routines .
*/
void __xmlGlobalInitMutexLock ( void ) ;
void __xmlGlobalInitMutexUnlock ( void ) ;
2007-11-16 10:54:59 +00:00
void __xmlGlobalInitMutexDestroy ( void ) ;
2004-06-27 12:08:10 +00:00
2013-04-05 23:10:41 +08:00
int __xmlInitializeDict ( void ) ;
2012-05-18 15:41:31 +08:00
# if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
/*
* internal thread safe random function
*/
int __xmlRandom ( void ) ;
# endif
2016-05-23 14:58:41 +08:00
XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString ( xmlChar * * msg ) ;
2017-08-10 15:08:48 -07:00
int xmlInputReadCallbackNop ( void * context , char * buffer , int len ) ;
2012-10-26 13:50:47 +08:00
2004-06-27 12:08:10 +00:00
# ifdef IN_LIBXML
# ifdef __GNUC__
2004-07-09 12:05:25 +00:00
# ifdef PIC
2017-09-14 21:30:51 +02:00
# ifdef __linux__
2005-03-10 09:22:07 +00:00
# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
2004-06-27 12:08:10 +00:00
# include "elfgcchack.h"
# endif
# endif
# endif
2004-07-09 12:05:25 +00:00
# endif
2005-03-10 09:22:07 +00:00
# endif
2017-10-21 13:57:44 +02:00
# if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
2010-03-10 10:07:49 +01:00
# define LIBXML_STATIC
# endif
2001-04-21 16:57:29 +00:00
# endif /* ! __XML_LIBXML_H__ */