diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-07-29 23:11:56 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-07-31 13:28:47 +0300 |
commit | d7ed5335b90175300349669fd102c4d44b05c381 (patch) | |
tree | 700e84d023d25c82dd75931eae2b1a1312e96947 /libexpat/libexpat/expat_config.h | |
parent | 2a98ae9d1b795b398d53996e35ae50b63aba3774 (diff) |
Add implementation
Diffstat (limited to 'libexpat/libexpat/expat_config.h')
-rw-r--r-- | libexpat/libexpat/expat_config.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/libexpat/libexpat/expat_config.h b/libexpat/libexpat/expat_config.h new file mode 100644 index 0000000..38ae39b --- /dev/null +++ b/libexpat/libexpat/expat_config.h @@ -0,0 +1,88 @@ +/* file : libexpat/expat_config.h -*- C -*- + * license : MIT; see accompanying COPYING file + */ + +#ifndef LIBEXPAT_EXPAT_CONFIG_H +#define LIBEXPAT_EXPAT_CONFIG_H + +/* Note that on Windows the library source files include winconfig.h that + * includes this header, additionally adding the Windows-specific definitions. + */ + +/* Endianess. + */ +#ifdef __FreeBSD__ +# include <sys/endian.h> /* BYTE_ORDER */ +#else +# if defined(_WIN32) +# ifndef BYTE_ORDER +# define BIG_ENDIAN 4321 +# define LITTLE_ENDIAN 1234 +# define BYTE_ORDER LITTLE_ENDIAN +# endif +# else +# include <sys/param.h> /* BYTE_ORDER/__BYTE_ORDER */ +# ifndef BYTE_ORDER +# ifdef __BYTE_ORDER +# define BYTE_ORDER __BYTE_ORDER +# define BIG_ENDIAN __BIG_ENDIAN +# define LITTLE_ENDIAN __LITTLE_ENDIAN +# else +# error no BYTE_ORDER/__BYTE_ORDER define +# endif +# endif +# endif +#endif + +#if BYTE_ORDER == BIG_ENDIAN +# define BYTEORDER 4321 +#else +# define BYTEORDER 1234 +#endif + +#define UNUSED(x) (void)x; + +/* Specific for FreeBSD. + */ +#if defined(__FreeBSD__) + +/* Note that sys/random.h is not available for older versions of glibc. Thus, + * we don't define this macro on Linux. + */ +# define HAVE_GETRANDOM 1 + +/* Note that the getrandom system call is not available in older Linux + * kernels. Thus, we don't define this macro on Linux. + */ +# define HAVE_SYSCALL_GETRANDOM 1 +#endif + +/* Specific for FreeBSD and Mac OS. + */ +#if defined(__FreeBSD__) || defined(__APPLE__) +# define HAVE_ARC4RANDOM_BUF 1 +#endif + +/* Specific for (non-) VC. + */ +#ifndef _MSC_VER +# define XML_DEV_URANDOM 1 +#endif + +/* Common for all supported OSes/compilers. + */ +#define XML_NS 1 +#define XML_DTD 1 +#define XML_CONTEXT_BYTES 1024 + +#undef XML_ATTR_INFO +#undef HAVE_LIBBSD +#undef HAVE_ARC4RANDOM + +/* We can probably assume that on platforms we build for, these keywords/types + * don't require definition. + +#undef size_t +*/ + +#endif /* LIBEXPAT_EXPAT_CONFIG_H */ |