From 85d9e2e2124ccf43d35d1aac642379ad349929c8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 12 Feb 2002 20:42:25 +0000 Subject: * fopencookie.c: Dummy function. * vasprintf.c: New. Taken from binutils-2.9.1 and dropped all non ANSI-C stuff. Merged with asprintf version. * no-pth.c: New. --- common/util.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'common/util.h') diff --git a/common/util.h b/common/util.h index fa22b1571..ff20bfe15 100644 --- a/common/util.h +++ b/common/util.h @@ -55,8 +55,30 @@ int map_kbx_err (int err); int map_assuan_err (int err); int map_to_assuan_status (int rc); - -/* some macros to replace ctype ones and avoid locale problems */ +/*-- replacement functions from funcname.c --*/ +#if !HAVE_VASPRINTF +#include +int vasprintf (char **result, const char *format, va_list *args); +int asprintf (char **result, const char *format, ...); +#endif + +#if !HAVE_FOPENCOOKIE +typedef struct +{ + ssize_t (*read)(void*,char*,size_t); + ssize_t (*write)(void*,const char*,size_t); + int (*seek)(void*,off_t*,int); + int (*close)(coid*); +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; +FILE *fopencookie (void *cookie, const char *opentype, + cookie_io_functions_t funclist); +#endif /*!HAVE_FOPENCOOKIE*/ + + + + +/*-- some macros to replace ctype ones and avoid locale problems --*/ #define spacep(p) (*(p) == ' ' || *(p) == '\t') #define digitp(p) (*(p) >= '0' && *(p) <= '9') #define hexdigitp(a) (digitp (a) \ -- cgit v1.2.3