diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-11-17 21:10:17 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-11-17 21:10:17 (GMT) |
commit | 8096d34300076a1aa9cb517de49fb920a051939f (patch) | |
tree | 5f2b1b7c41f89fedc31af973d6a747ca674cfd24 /libxml2/os400/wrappers.h | |
parent | fc7f7edd0b8011cb71573b15462ef83068d9e54b (diff) | |
parent | 574585fa78070b0cc6b5ad22543e21a3502a122b (diff) | |
download | blt-8096d34300076a1aa9cb517de49fb920a051939f.zip blt-8096d34300076a1aa9cb517de49fb920a051939f.tar.gz blt-8096d34300076a1aa9cb517de49fb920a051939f.tar.bz2 |
Merge commit '574585fa78070b0cc6b5ad22543e21a3502a122b' as 'libxml2'
Diffstat (limited to 'libxml2/os400/wrappers.h')
-rw-r--r-- | libxml2/os400/wrappers.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/libxml2/os400/wrappers.h b/libxml2/os400/wrappers.h new file mode 100644 index 0000000..388ec8c --- /dev/null +++ b/libxml2/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 <pm@datasphere.ch>, 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 <sys/types.h> +#include <sys/socket.h> +#include <arpa/inet.h> +#include <netdb.h> + +#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 HAVE_ZLIB_H + +#include <zlib.h> + +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 |