diff options
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 26 |
1 files changed, 24 insertions, 2 deletions
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 <stdarg.h> +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) \ |