1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00
libxml2/libxml.h
Nick Wellnhofer 0f568c0b73 Consolidate private header files
Private functions were previously declared

- in header files in the root directory
- in public headers guarded with IN_LIBXML
- in libxml.h
- redundantly in source files that used them.

Consolidate all private header files in include/private.
2022-08-26 02:11:56 +02:00

80 lines
1.9 KiB
C

/*
* 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__
/*
* These macros must be defined before including system headers.
* Do not add any #include directives above this block.
*/
#ifndef NO_LARGEFILE_SOURCE
#ifndef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
#endif
/*
* Currently supported platforms use either autoconf or
* copy to config.h own "preset" configuration file.
* As result ifdef HAVE_CONFIG_H is omitted here.
*/
#include "config.h"
#include <libxml/xmlversion.h>
#ifndef SYSCONFDIR
#define SYSCONFDIR "/etc"
#endif
#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
#ifndef WITH_TRIO
#include <stdio.h>
#else
/**
* TRIO_REPLACE_STDIO:
*
* This macro is defined if the trio string formatting functions are to
* be used instead of the default stdio ones.
*/
#define TRIO_REPLACE_STDIO
#include "trio.h"
#endif
#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
#if defined(__clang__) || \
(defined(__GNUC__) && (__GNUC__ >= 8))
#define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
#else
#define ATTRIBUTE_NO_SANITIZE(arg)
#endif
#if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
# define LIBXML_STATIC
#endif
#endif /* ! __XML_LIBXML_H__ */