diff options
author | Werner Koch <wk@gnupg.org> | 2002-02-12 21:42:25 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-02-12 21:42:25 +0100 |
commit | 85d9e2e2124ccf43d35d1aac642379ad349929c8 (patch) | |
tree | 7473a2c1e19680265cd0953b55cd133213dd87fa /common/util.h | |
parent | * assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write. (diff) | |
download | gnupg2-85d9e2e2124ccf43d35d1aac642379ad349929c8.tar.xz gnupg2-85d9e2e2124ccf43d35d1aac642379ad349929c8.zip |
* 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.
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) \ |