From 35a201cc8ef0c3f5b2df88d2e528aabee1048348 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 18:47:09 +0200 Subject: Initial/Final commit --- libxml2-2.9.10/os400/wrappers.h | 70 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 libxml2-2.9.10/os400/wrappers.h (limited to 'libxml2-2.9.10/os400/wrappers.h') diff --git a/libxml2-2.9.10/os400/wrappers.h b/libxml2-2.9.10/os400/wrappers.h new file mode 100644 index 0000000..6f3e6c9 --- /dev/null +++ b/libxml2-2.9.10/os400/wrappers.h @@ -0,0 +1,70 @@ +/** +*** Replace system/C library calls by EBCDIC wrappers. +*** This is a layer inserted between libxml2 itself and the EBCDIC +*** environment. +*** +*** See Copyright for the status of this software. +*** +*** Author: Patrick Monnerat , DATASPHERE S.A. +**/ + +#ifndef __WRAPPERS_H_ +#define __WRAPPERS_H_ + +/** +*** OS/400 specific defines. +**/ + +#define __cplusplus__strings__ + +/** +*** Force header inclusions before renaming procedures to UTF-8 wrappers. +**/ + +#include +#include +#include +#include + +#include "dlfcn.h" + + +/** +*** UTF-8 wrappers prototypes. +**/ + +extern int _lx_getaddrinfo(const char * node, const char * service, + const struct addrinfo * hints, struct addrinfo * * res); +extern const char * + _lx_inet_ntop(int af, + const void * src, char * dst, socklen_t size); +extern void * _lx_dlopen(const char * filename, int flag); +extern void * _lx_dlsym(void * handle, const char * symbol); +extern char * _lx_dlerror(void); + + +#ifdef LIBXML_ZLIB_ENABLED + +#include + +extern gzFile _lx_gzopen(const char * path, const char * mode); +extern gzFile _lx_gzdopen(int fd, const char * mode); + +#endif + + +/** +*** Rename data/procedures to UTF-8 wrappers. +**/ + +#define getaddrinfo _lx_getaddrinfo +#define inet_ntop _lx_inet_ntop +#define dlopen _lx_dlopen +#define dlsym _lx_dlsym +#define dlerror _lx_dlerror +#define gzopen _lx_gzopen +#define gzdopen _lx_gzdopen +#define inflateInit2_ _lx_inflateInit2_ +#define deflateInit2_ _lx_deflateInit2_ + +#endif -- cgit v1.2.3