summaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2002-02-12 21:42:25 +0100
committerWerner Koch <wk@gnupg.org>2002-02-12 21:42:25 +0100
commit85d9e2e2124ccf43d35d1aac642379ad349929c8 (patch)
tree7473a2c1e19680265cd0953b55cd133213dd87fa /common/util.h
parent* assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write. (diff)
downloadgnupg2-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.h26
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) \