[Pkg-gnupg-commit] [libassuan] 71/437: /
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit a234d2e994399e3c8228ee0f840b93516e93cc6f
Author: Neal Walfield <neal at walfield.org>
Date: Tue Feb 18 20:48:52 2003 +0000
/
2003-02-18 Neal H. Walfield <neal at g10code.de>
* 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 <neal at g10code.de>
* 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 <neal at g10code.de>
* Makefile.am: New file.
* funopen.c: New file.
* isascii.c: Imported from newpg.
* memrchr.c: Likewise.
* putc_unlocked.c: Likewise.
---
ChangeLog | 9 +++++++++
Makefile.am | 2 +-
configure.ac | 11 +++++++++--
src/ChangeLog | 7 +++++++
src/assuan-handler.c | 31 ++++---------------------------
5 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c396c7a..793ad0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2003-02-18 Neal H. Walfield <neal at g10code.de>
+ * 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 <neal at g10code.de>
+
* 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 <neal at g10code.de>
+ * 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 <neal at g10code.de>
+
* 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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list