diff options
author | Neal Walfield <[email protected]> | 2003-02-18 20:48:52 +0000 |
---|---|---|
committer | Neal Walfield <[email protected]> | 2003-02-18 20:48:52 +0000 |
commit | a234d2e994399e3c8228ee0f840b93516e93cc6f (patch) | |
tree | 68cb8a79aa3524bf4f64ce813dd25f711329a7cd | |
parent | / (diff) | |
download | libassuan-a234d2e994399e3c8228ee0f840b93516e93cc6f.tar.gz libassuan-a234d2e994399e3c8228ee0f840b93516e93cc6f.zip |
/
2003-02-18 Neal H. Walfield <[email protected]>
* common: New directory.
* Makefile.am (SUBDIRS): Add common.
* configure.ac: Check for funopen. If not present, check for
fopencookie and implement it in terms of that. Otherwise, fail.
(AC_CONFIG_FILES): Add common/Makefile.
src/
2003-02-18 Neal H. Walfield <[email protected]>
* assuan-handler.c (_IO_cookie_io_functions_t): Remove.
(cookie_io_functions_t): Remove.
(fopencookie): Remove prototype.
(assuan_get_data_fp): Use funopen, not fopencookie.
common/
2003-02-18 Neal H. Walfield <[email protected]>
* Makefile.am: New file.
* funopen.c: New file.
* isascii.c: Imported from newpg.
* memrchr.c: Likewise.
* putc_unlocked.c: Likewise.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/assuan-handler.c | 31 |
5 files changed, 30 insertions, 30 deletions
@@ -1,5 +1,14 @@ 2003-02-18 Neal H. Walfield <[email protected]> + * common: New directory. + * Makefile.am (SUBDIRS): Add common. + + * configure.ac: Check for funopen. If not present, check for + fopencookie and implement it in terms of that. Otherwise, fail. + (AC_CONFIG_FILES): Add common/Makefile. + +2003-02-18 Neal H. Walfield <[email protected]> + * configure.ac (AC_CONFIG_FILES): Add src/libassuan-config. (LIBASSUAN_CONFIG_LIBS, LIBASSUAN_CONFIG_CFLAGS): New variables. AC_SUBST them. diff --git a/Makefile.am b/Makefile.am index a5cd5a4..2c1cc76 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = src doc tests
\ No newline at end of file +SUBDIRS = common src doc tests
\ No newline at end of file diff --git a/configure.ac b/configure.ac index a499407..a0e4381 100644 --- a/configure.ac +++ b/configure.ac @@ -128,14 +128,21 @@ AC_DECL_SYS_SIGLIST AC_CHECK_FUNCS(flockfile funlockfile) -AC_REPLACE_FUNCS(fopencookie) -# FIXME: Print a warning when fopencookie is not available. +# Check for funopen +AC_CHECK_FUNCS(funopen) +if test $ac_cv_func_funopen != yes; then + # No funopen but we can implement that in terms of fopencookie. + AC_CHECK_FUNCS(fopencookie, AC_LIBOBJ(funopen), AC_MSG_ERROR([[ +No implementation of fopencookie or funopen available. +]])) + AC_REPLACE_FUNCS(isascii) AC_REPLACE_FUNCS(putc_unlocked) AC_REPLACE_FUNCS(memrchr) AC_CONFIG_FILES([ Makefile +common/Makefile src/Makefile src/libassuan-config doc/Makefile diff --git a/src/ChangeLog b/src/ChangeLog index 06e331c..688bcf0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2003-02-18 Neal H. Walfield <[email protected]> + * assuan-handler.c (_IO_cookie_io_functions_t): Remove. + (cookie_io_functions_t): Remove. + (fopencookie): Remove prototype. + (assuan_get_data_fp): Use funopen, not fopencookie. + +2003-02-18 Neal H. Walfield <[email protected]> + * libassuan-config.in: New file. * Makefile.am (bin_PROGRAMS): New variable. diff --git a/src/assuan-handler.c b/src/assuan-handler.c index 532cafa..9d73e0e 100644 --- a/src/assuan-handler.c +++ b/src/assuan-handler.c @@ -1,5 +1,5 @@ /* assuan-handler.c - dispatch commands - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -28,27 +28,6 @@ #define spacep(p) (*(p) == ' ' || *(p) == '\t') #define digitp(a) ((a) >= '0' && (a) <= '9') - -#if !HAVE_FOPENCOOKIE -/* Provide structure for our dummy replacement function. Usually this - is defined in ../common/util.h but assuan should be self - contained. */ -/* Fixme: Remove fopencoookie :-(( */ -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)(void*); -} _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*/ - - - - static int dummy_handler (ASSUAN_CONTEXT ctx, char *line) { @@ -636,12 +615,10 @@ assuan_get_data_fp (ASSUAN_CONTEXT ctx) if (ctx->outbound.data.fp) return ctx->outbound.data.fp; - cookie_fnc.read = NULL; - cookie_fnc.write = _assuan_cookie_write_data; - cookie_fnc.seek = NULL; - cookie_fnc.close = _assuan_cookie_write_flush; - ctx->outbound.data.fp = fopencookie (ctx, "wb", cookie_fnc); + ctx->outbound.data.fp = funopen (ctx, 0, + _assuan_cookie_write_data, + 0, _assuan_cookie_write_flush); ctx->outbound.data.error = 0; return ctx->outbound.data.fp; } |