|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __XML_LIBXML_H__ |
|
|
#define __XML_LIBXML_H__ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef NO_LARGEFILE_SOURCE |
|
|
#ifndef _LARGEFILE_SOURCE |
|
|
#define _LARGEFILE_SOURCE |
|
|
#endif |
|
|
#ifndef _FILE_OFFSET_BITS |
|
|
#define _FILE_OFFSET_BITS 64 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "config.h" |
|
|
#include <libxml/xmlversion.h> |
|
|
|
|
|
#if !defined(_WIN32) && \ |
|
|
!defined(__CYGWIN__) && \ |
|
|
(defined(__clang__) || \ |
|
|
(defined(__GNUC__) && (__GNUC__ >= 4))) |
|
|
#define XML_HIDDEN __attribute__((visibility("hidden"))) |
|
|
#else |
|
|
#define XML_HIDDEN |
|
|
#endif |
|
|
|
|
|
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207 || defined(__clang__) |
|
|
#define ATTRIBUTE_UNUSED __attribute__((unused)) |
|
|
#else |
|
|
#define ATTRIBUTE_UNUSED |
|
|
#endif |
|
|
|
|
|
#ifdef HAVE_FUNC_ATTRIBUTE_DESTRUCTOR |
|
|
#define ATTRIBUTE_DESTRUCTOR __attribute__((destructor)) |
|
|
#endif |
|
|
|
|
|
#if (defined(__clang__) && __clang_major__ >= 18) || \ |
|
|
(defined(__GNUC__) && __GNUC__ >= 15) |
|
|
#define ATTRIBUTE_COUNTED_BY(c) __attribute__((__counted_by__(c))) |
|
|
#else |
|
|
#define ATTRIBUTE_COUNTED_BY(c) |
|
|
#endif |
|
|
|
|
|
#if defined(__clang__) || \ |
|
|
(defined(__GNUC__) && (__GNUC__ >= 8) && !defined(__EDG__)) |
|
|
#define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg))) |
|
|
#else |
|
|
#define ATTRIBUTE_NO_SANITIZE(arg) |
|
|
#endif |
|
|
|
|
|
#ifdef __clang__ |
|
|
#if (!defined(__apple_build_version__) && __clang_major__ >= 12) || \ |
|
|
(defined(__apple_build_version__) && __clang_major__ >= 13) |
|
|
#define ATTRIBUTE_NO_SANITIZE_INTEGER \ |
|
|
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \ |
|
|
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base") |
|
|
#else |
|
|
#define ATTRIBUTE_NO_SANITIZE_INTEGER \ |
|
|
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") |
|
|
#endif |
|
|
#else |
|
|
#define ATTRIBUTE_NO_SANITIZE_INTEGER |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|