Page MenuHome GnuPG

No OneTemporary

diff --git a/ChangeLog b/ChangeLog
index cb847bd..6c42443 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,383 +1,388 @@
+2010-08-19 Werner Koch <wk@g10code.com>
+
+ * configure.ac (AH_TOP, AH_BOTTOM): New. Define
+ GPG_ERR_ENABLE_ERRNO_MACROS.
+
2010-08-09 Werner Koch <wk@g10code.com>
Release 2.0.1
* configure.ac: Set LT version to C1/A1/R0.
2010-04-20 Werner Koch <wk@g10code.com>
* configure.ac: Change wording of the no-funopen warning.
2010-03-22 Werner Koch <wk@g10code.com>
* configure.ac (CC_FOR_BUILD): Add test.
2010-03-17 Werner Koch <wk@g10code.com>
* tests/ChangeLog: New. Move all relevant entries to there.
2010-02-25 Werner Koch <wk@g10code.com>
* m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): Fix for non x86 mingw
targets.
2010-02-11 Werner Koch <wk@g10code.com>
* configure.ac (inet_pton): Check for it.
2010-02-04 Werner Koch <wk@g10code.com>
* configure.ac (AC_TYPE_UINT16_T): New.
2010-01-26 Werner Koch <wk@g10code.com>
* configure.ac (NETLIBS) [W32CE]: Use -lws2.
2010-01-22 Werner Koch <wk@g10code.com>
* configure.ac: Require libgpg-error 1.8.
(HAVE_W32CE_SYSTEM): New am_defines and am_conditionals.
* ltmain.sh (wrappers_required): Don't set for mingw32ce.
* autogen.sh: Add option --build-w32ce. Remove --disable-shared
from --build-w32.
2010-01-08 Marcus Brinkmann <marcus@g10code.de>
Released 2.0.0.
2010-01-05 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (_DARWIN_C_SOURCE): Define on frapple.
2009-12-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Do not use echo -n.
2009-12-15 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Bump version to 2.0.0.
2009-10-16 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh: Remove --with-pth-prefix from configure invocation.
* configure.ac (_ASSUAN_IN_LIBASSUAN, PTH_SYSCALL_SOFT): Do not
set anymore.
(GNUPG_PATH_PTH): Don't invoke.
(HAVE_PTH): Remove conditional.
(LIBASSUAN_CONFIG_THREAD_MODULES): Removed.
2009-10-08 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: AC_REPLACE_FUNCS for vasprintf.
2009-09-19 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Check for stdint.h and inttypes.h. Invoke
AC_TYPE_UINTPTR_T.
2009-09-08 Marcus Brinkmann <marcus@g10code.de>
* m4/gpg-error.m4: New file.
2009-09-01 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Set BUILD_REVISION and update calculation of data
for build info. Update libtool macros. Set NETLIBS for W32
targets.
2009-08-26 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Test for versioned symbols support.
(LIBASSUAN_LT_CURRENT, LIBASSUAN_LT_AGE)
(LIBASSUAN_LT_REVISION): New, set to 0.
(LIBASSUAN_CONFIG_API_VERSION): Bump to 2.
(AC_CONFIG_MACRO_DIR, AC_DISABLE_STATIC, AC_LIBTOOL_WIN32_DLL)
(AC_LIBTOOL_RC, AC_PROG_LIBTOOL, AM_PATH_GPG_ERROR): Invoke.
(AC_PROG_RANLIB): Don't invoke.
(HAVE_W32_SYSTEM): New AM conditional.
(AC_CONFIG_FILES): Add src/versioninfo.rc.
* ltmain.sh, m4/libtool.m4, m4/ltoptions.m4, m4/ltsugar.m4,
m4/ltversion.m4, m4/lt~obsolete.m4: New files from libtool 2.2.6.
2009-01-22 Werner Koch <wk@g10code.com>
* configure.ac: Check for nanoleep only in libc.
2008-05-25 Werner Koch <wk@g10code.com>
Released 1.0.5.
2008-05-23 Werner Koch <wk@g10code.com>
* configure.ac: Use -fPIC with GCC under Linux.
2007-12-12 Werner Koch <wk@g10code.com>
Released 1.0.4.
* config.sub, config.guess: Update to version 2007-11-19.
2007-08-24 Werner Koch <wk@g10code.com>
Released 1.0.3.
Switched license of the library code back to LGPLv2.1. See NEWS.
* COPYING.LIB: Replaced by LPGLv2.1
2007-07-05 Werner Koch <wk@g10code.com>
Released 1.0.2.
Relicensed to LGPLv3.
* COPYING: Replaced by GPLv3.
* COPYING.LESSER: Removed.
* COPYING.LIB: New.
* Makefile.am (ACLOCAL_AMFLAGS): Do not create gzipped tarball.
2007-07-03 Werner Koch <wk@g10code.com>
* configure.ac (NETLIBS): Use ws2_32 instead of wsock32.
2007-06-15 Werner Koch <wk@g10code.com>
* autogen.sh: Use = and not == in test to be POSIXly correct.
Change shell back to /bin/sh.
2007-06-15 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh: Require bash.
2007-05-30 Werner Koch <wk@g10code.com>
* autogen.sh <--build-w32>: Modernize.
2007-05-29 Werner Koch <wk@g10code.com>
* configure.ac: Require automake 1.10 and autoconf 2.61.
(AM_PROG_CC_C_O): New. Error out if no C-89 cc is installed.
(gl_HEADER_SYS_SOCKET): Explicitly add this for documentation.
2007-05-24 Werner Koch <wk@g10code.com>
* configure.ac: Use -Wpointer-arith is possible.
2006-11-22 Werner Koch <wk@g10code.com>
Released 1.0.1.
2006-11-21 Werner Koch <wk@g10code.com>
* configure.ac (AH_BOTTOM): Define PTH_SYSCALL_SOFT to 0.
(AC_INIT): Use the SVN magic.
* m4/gnupg-pth.m4 (GNUPG_PTH_VERSION_CHECK): Use --all with
pth-config.
2006-11-15 Werner Koch <wk@g10code.com>
* autogen.sh: Add convenience option --build-amd64.
2006-10-31 Werner Koch <wk@g10code.com>
Released 1.0.0.
2006-10-20 Werner Koch <wk@g10code.com>
* Makefile.am (stowinstall): New convenience target.
2006-10-10 Werner Koch <wk@g10code.com>
Released 0.9.3.
* configure.ac: Check for cmsghdr.
(USE_DESCRIPTOR_PASSING): Define it then.
2006-10-09 Werner Koch <wk@g10code.com>
* m4/gnupg-pth.m4: New. Taked from GnuPG.
2006-10-04 Werner Koch <wk@g10code.com>
Released 0.9.2.
2006-10-04 Werner Koch <wk@g10code.com>
Released 0.9.1.
* configure.ac (AB_INIT): New.
* m4/autobuild.m4: New.
2006-09-14 Werner Koch <wk@g10code.com>
Released 0.9.0.
* configure.ac: Check for S_PEERCRED. Include check for socklen_t.
* m4/sys_socket_h.m4, m4/onceonly.m4, m4/socklen.m4: New.
* m4/Makefile.am: New.
2006-09-05 Werner Koch <wk@g10code.com>
* configure.ac (AH_BOTTOM): Define _ASSUAN_IN_LIBASSUAN.
2005-10-24 Werner Koch <wk@g10code.com>
* COPYING.LESSER: Added.
* README.CVS: Renamed to ..
* README.SVN: .. this.
2005-10-08 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Check for socket library and add it to
LIBASSUAN_CONFIG_LIBS if necessary.
2005-10-07 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Invoke AC_CANONICAL_HOST. Define _XOPEN_SOURCE,
_XOPEN_SOURCE_EXTENDED and __EXTENSIONS__ on Solaris.
Add stpcy as replacement function.
Add setenv as replacement function (and check for unistd.h).
2005-06-20 Werner Koch <wk@g10code.com>
Released 0.6.10.
2004-12-22 Werner Koch <wk@g10code.com>
Released 0.6.9.
For security reasons switched to automake 1.9.
2004-12-18 Werner Koch <wk@g10code.com>
* autogen.sh: Add Option --build-w32.
2004-12-07 Werner Koch <wk@g10code.com>
* configure.ac: Define HAVE_W32_SYSTEM and HAVE_DOSISH_SYSTEM.
Add -lwsock2 to the config lib flags for W32.
2004-11-25 Werner Koch <wk@g10code.com>
Released 0.6.8.
2004-09-27 Werner Koch <wk@g10code.com>
* config.sub, config.guess: Updated.
2004-06-23 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Check for <sys/uio.h>.
2004-06-08 Werner Koch <wk@gnupg.org>
Released 0.6.6.
2004-04-02 Thomas Schwinge <schwinge@nic-nac-project.de>
* autogen.sh: Added ACLOCAL_FLAGS.
2004-02-20 Werner Koch <wk@gnupg.org>
Released 0.6.4.
2004-02-11 Werner Koch <wk@gnupg.org>
* autogen.sh (check_version): Removed bashism and simplified.
2004-01-29 Werner Koch <wk@gnupg.org>
Released 0.6.3.
2003-12-18 Werner Koch <wk@gnupg.org>
Released 0.6.2.
2003-12-08 Werner Koch <wk@gnupg.org>
* TODO: New.
* Makefile.am: Add README.CVS and autogen.sh. Removed m4/Makefile.
* README.CVS: New.
* autogen.sh: Revamped.
* configure.ac: Add automake version number for autogen.sh use.
2003-11-17 Werner Koch <wk@gnupg.org>
Released 0.6.1.
2003-08-06 Werner Koch <wk@gnupg.org>
Released 0.6.0.
2003-07-29 Werner Koch <wk@gnupg.org>
* configure.ac: Cleanups for newer autoconf.
2003-07-29 gettextize <bug-gnu-gettext@gnu.org>
* Makefile.am (EXTRA_DIST): Add config.rpath.
* configure.ac (AC_CONFIG_FILES): Add po/Makefile.in,
2003-04-28 gettextize <bug-gnu-gettext@gnu.org>
* Makefile.am (SUBDIRS): Add m4.
(ACLOCAL_AMFLAGS): New variable.
(EXTRA_DIST): New variable.
* configure.ac (AC_CONFIG_FILES): Add po/Makefile.in,
2003-02-18 Neal H. Walfield <neal@g10code.de>
* COPYING: New file.
2003-02-18 Neal H. Walfield <neal@g10code.de>
* configure.ac: Fix typo.
(AC_CONFIG_FILES): Remove common/Makefile.am.
* common: Remove directory.
2003-02-18 Neal H. Walfield <neal@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@g10code.de>
* configure.ac (AC_CONFIG_FILES): Add src/libassuan-config.
(LIBASSUAN_CONFIG_LIBS, LIBASSUAN_CONFIG_CFLAGS): New variables.
AC_SUBST them.
2003-02-17 Neal H. Walfield <neal@g10code.de>
* AUTHORS: New file.
* INSTALL: New file.
* Makefile.am: New file.
* NEWS: New file.
* README: New file.
* autogen.sh: New file, copied from newpg.
* configure.ac: New file, imported from newpg.
* depcomp: New file.
* install-sh: New file.
* missing: New file.
* mkinstalldirs: New file.
* doc: New directory.
* src: New directory.
* tests: New directory.
Copyright 2003, 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/configure.ac b/configure.ac
index 81de1b8..c1bdfc2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,352 +1,365 @@
# configure.ac - for libassuan
# Copyright (C) 2001-2003, 2006, 2007, 2009 Free Software Foundation, Inc.
#
# This file is part of Assuan.
#
# Assuan is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
#
# Assuan is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
min_automake_version="1.10"
# Remember to change the version number immediately *after* a release.
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
m4_define([my_version], [2.0.2])
m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \
|| echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
AC_INIT([libassuan], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
[bug-libassuan@gnupg.org])
# LT Version numbers, remember to change them just *before* a release.
# (Code changed: REVISION++)
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
# (Interfaces added: AGE++)
# (Interfaces removed/changed: AGE=0)
#
LIBASSUAN_LT_CURRENT=1
LIBASSUAN_LT_AGE=1
LIBASSUAN_LT_REVISION=0
# If the API is changed in an incompatible way: increment the next counter.
LIBASSUAN_CONFIG_API_VERSION=2
##############################################
AC_SUBST(LIBASSUAN_LT_CURRENT)
AC_SUBST(LIBASSUAN_LT_AGE)
AC_SUBST(LIBASSUAN_LT_REVISION)
BUILD_REVISION=svn_revision
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR(src/assuan.h.in)
AC_CONFIG_MACRO_DIR(m4)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
AB_INIT
AC_GNU_SOURCE
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
[Bug report address])
# Don't default to build static libs.
LT_PREREQ([2.2.6])
LT_INIT([win32-dll disable-static])
LT_LANG([Windows Resource])
# For now we hardcode the use of version scripts. It would be better
# to write a test for this or even implement this within libtool.
have_ld_version_script=no
case "${host}" in
*-*-linux*)
have_ld_version_script=yes
;;
*-*-gnu*)
have_ld_version_script=yes
;;
*-apple-darwin*)
AC_DEFINE(_XOPEN_SOURCE, 500, Activate POSIX interface on MacOS X)
AC_DEFINE(_DARWIN_C_SOURCE, 1, Activate CMSG_LEN/CMSG_SPACE on MacOS X)
;;
esac
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+AH_TOP([
+#ifndef _ASSUAN_CONFIG_H_INCLUDED
+#define _ASSUAN_CONFIG_H_INCLUDED
+
+/* Enable gpg-error's strerror macro under W32CE. */
+#define GPG_ERR_ENABLE_ERRNO_MACROS 1
+])
+
+AH_BOTTOM([
+
+#endif /*_ASSUAN_CONFIG_H_INCLUDED*/
+])
+
# Checks for programs.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AM_PROG_CC_C_O
if test "x$ac_cv_prog_cc_c89" = "xno" ; then
AC_MSG_ERROR([[No C-89 compiler found]])
fi
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
#AC_ARG_PROGRAM
# We need to compile and run a program on the build machine. A
# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
# the AC archive is broken for autoconf 2.57. Given that there is no
# newer version of that macro, we assume that it is also broken for
# autoconf 2.61 and thus we use a simple but usually sufficient
# approach.
AC_MSG_CHECKING(for cc for build)
if test "$cross_compiling" = "yes"; then
CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
else
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
fi
AC_MSG_RESULT($CC_FOR_BUILD)
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
_gcc_cflags_save=$CFLAGS
CFLAGS="-Wpointer-arith"
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
AC_MSG_RESULT($_gcc_wopt)
CFLAGS=$_gcc_cflags_save;
if test x"$_gcc_wopt" = xyes ; then
CFLAGS="$CFLAGS -Wpointer-arith"
fi
fi
#
# Options depending on the host OS.
#
have_dosish_system=no
have_w32_system=no
have_w32ce_system=no
case "${host}" in
*-linux*)
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -fPIC -DPIC"
fi
;;
*-mingw32ce*)
have_dosish_system=yes
have_w32_system=yes
have_w32ce_system=yes
;;
*-mingw32*)
have_dosish_system=yes
have_w32_system=yes
;;
*-solaris*)
AC_DEFINE(_XOPEN_SOURCE, 500, Activate extensions on Solaris)
AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Activate extensions on Solaris)
AC_DEFINE(__EXTENSIONS__, 1, Activate extensions on Solaris)
;;
esac
if test "$have_dosish_system" = yes; then
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
[Defined if we run on some of the PCDOS like systems
(DOS, Windoze. OS/2) with special properties like
no file modes])
fi
dnl AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
if test "$have_w32_system" = yes; then
AC_DEFINE(HAVE_W32_SYSTEM,1,[Defined if we run on a W32 API based system])
if test "$have_w32ce_system" = yes; then
AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE])
fi
BUILD_TIMESTAMP=`date --iso-8601=minutes`
AC_SUBST(BUILD_TIMESTAMP)
changequote(,)dnl
BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
changequote([,])dnl
case "$VERSION" in
*-svn*) BUILD_FILEVERSION="${BUILD_FILEVERSION}0" ;;
*-cvs) BUILD_FILEVERSION="${BUILD_FILEVERSION}0" ;;
*-rc*) BUILD_FILEVERSION="${BUILD_FILEVERSION}1" ;;
*) BUILD_FILEVERSION="${BUILD_FILEVERSION}2" ;;
esac
fi
AC_SUBST(BUILD_REVISION)
AC_SUBST(BUILD_TIMESTAMP)
AC_SUBST(BUILD_FILEVERSION)
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
# Check for network libraries. They are needed for tests.
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
[NETLIBS="-lsocket $NETLIBS"]))
AC_SUBST(NETLIBS)
if test "$have_w32_system" = yes; then
if test "$have_w32ce_system" = yes; then
NETLIBS="-lws2 $NETLIBS"
else
# FIXME: Check why we need to use ws2_32 and document that.
NETLIBS="-lws2_32 $NETLIBS"
fi
fi
# For src/libassuan-config.in
LIBASSUAN_CONFIG_LIB="-lassuan"
LIBASSUAN_CONFIG_CFLAGS=""
LIBASSUAN_CONFIG_EXTRA_LIBS=
if test x"$NETLIBS" != x; then
LIBASSUAN_CONFIG_EXTRA_LIBS="$LIBASSUAN_CONFIG_EXTRA_LIBS $NETLIBS"
fi
AC_SUBST(LIBASSUAN_CONFIG_LIB)
AC_SUBST(LIBASSUAN_CONFIG_CFLAGS)
AC_SUBST(LIBASSUAN_CONFIG_API_VERSION)
AC_SUBST(LIBASSUAN_CONFIG_EXTRA_LIBS)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h locale.h sys/uio.h stdint.h inttypes.h])
AC_TYPE_UINTPTR_T
AC_TYPE_UINT16_T
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_DECL_SYS_SIGLIST
gl_HEADER_SYS_SOCKET
gl_TYPE_SOCKLEN_T
AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
[use_descriptor_passing=yes],
[use_descriptor_passing=no
AC_MSG_WARN([
***
*** Data structure for sending ancillary data missing.
*** Descriptor passing won't work.
***])],[
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#if HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#include <unistd.h>
])
if test "$use_descriptor_passing" = "yes"; then
AC_DEFINE(USE_DESCRIPTOR_PASSING, 1,
[Defined if descriptor passing is supported])
fi
AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
# Checking for libgpg-error.
AM_PATH_GPG_ERROR(1.8,, AC_MSG_ERROR([libgpg-error was not found]))
#
# Checks for library functions.
#
AC_CHECK_FUNCS([flockfile funlockfile inet_pton])
# On some systems (e.g. Solaris) nanosleep requires linking to librl.
# Given that we use nanosleep only as an optimization over a select
# based wait function we want it only if it is available in libc.
_save_libs="$LIBS"
AC_SEARCH_LIBS([nanosleep], [],
[AC_DEFINE(HAVE_NANOSLEEP,1,
[Define to 1 if you have the `nanosleep' function in libc.])])
LIBS="$_save_libs"
# 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)
if test $ac_cv_func_fopencookie = yes; then
AC_LIBOBJ([funopen])
else
AC_MSG_WARN([
***
*** No implementation of fopencookie or funopen available.
*** The assuan_get_data_fp function won't work; see the
*** manual for details. GnuPG does not require this feature.
***])
fi
fi
AC_REPLACE_FUNCS(isascii)
AC_REPLACE_FUNCS(putc_unlocked)
AC_REPLACE_FUNCS(memrchr)
AC_REPLACE_FUNCS(stpcpy)
AC_CHECK_HEADERS(unistd.h)
AC_REPLACE_FUNCS(setenv)
AC_REPLACE_FUNCS(vasprintf)
#
# Check for the getsockopt SO_PEERCRED
#
AC_MSG_CHECKING(for SO_PEERCRED)
AC_CACHE_VAL(assuan_cv_sys_so_peercred,
[AC_TRY_COMPILE([#include <sys/socket.h>],
[struct ucred cr;
int cl = sizeof cr;
getsockopt (1, SOL_SOCKET, SO_PEERCRED, &cr, &cl);],
assuan_cv_sys_so_peercred=yes,
assuan_cv_sys_so_peercred=no)
])
AC_MSG_RESULT($assuan_cv_sys_so_peercred)
if test $assuan_cv_sys_so_peercred = yes; then
AC_DEFINE(HAVE_SO_PEERCRED, 1,
[Defined if SO_PEERCRED is supported (Linux specific)])
fi
# Create the config files.
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
AC_CONFIG_FILES([src/versioninfo.rc])
AC_OUTPUT
diff --git a/src/assuan.h.in b/src/assuan.h.in
index 86733a3..8e1982d 100644
--- a/src/assuan.h.in
+++ b/src/assuan.h.in
@@ -1,503 +1,503 @@
/* assuan.h - Definitions for the Assuan IPC library -*- c -*-
Copyright (C) 2001, 2002, 2003, 2005, 2007, 2008, 2009,
2010 Free Software Foundation, Inc.
This file is part of Assuan.
Assuan is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
Assuan is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, see <http://www.gnu.org/licenses/>.
@configure_input@
*/
#ifndef ASSUAN_H
#define ASSUAN_H
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdarg.h>
#ifndef _ASSUAN_NO_SOCKET_WRAPPER
@include:includes@
#endif /*!_ASSUAN_NO_SOCKET_WRAPPER*/
@include:types@
#include <gpg-error.h>
/* Compile time configuration:
#define _ASSUAN_NO_SOCKET_WRAPPER
Do not include the definitions for the socket wrapper feature. */
#ifdef __cplusplus
extern "C"
{
#if 0
}
#endif
#endif
/* Check for compiler features. */
#if __GNUC__
#define _ASSUAN_GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if _ASSUAN_GCC_VERSION > 30100
#define _ASSUAN_DEPRECATED __attribute__ ((__deprecated__))
#endif
#endif
#ifndef _ASSUAN_DEPRECATED
#define _ASSUAN_DEPRECATED
#endif
#define ASSUAN_LINELENGTH 1002 /* 1000 + [CR,]LF */
struct assuan_context_s;
typedef struct assuan_context_s *assuan_context_t;
@include:fd-t@
assuan_fd_t assuan_fdopen (int fd);
@include:sock-nonce@
/* Global interface. */
struct assuan_malloc_hooks
{
void *(*malloc) (size_t cnt);
void *(*realloc) (void *ptr, size_t cnt);
void (*free) (void *ptr);
};
typedef struct assuan_malloc_hooks *assuan_malloc_hooks_t;
/* Categories for log messages. */
#define ASSUAN_LOG_INIT 1
#define ASSUAN_LOG_CTX 2
#define ASSUAN_LOG_ENGINE 3
#define ASSUAN_LOG_DATA 4
#define ASSUAN_LOG_SYSIO 5
#define ASSUAN_LOG_CONTROL 8
/* If MSG is NULL, return true/false depending on if this category is
logged. This is used to probe before expensive log message
generation (buffer dumps). */
typedef int (*assuan_log_cb_t) (assuan_context_t ctx, void *hook,
unsigned int cat, const char *msg);
/* Set the default gpg error source. */
void assuan_set_gpg_err_source (gpg_err_source_t errsource);
/* Get the default gpg error source. */
gpg_err_source_t assuan_get_gpg_err_source (void);
/* Set the default malloc hooks. */
void assuan_set_malloc_hooks (assuan_malloc_hooks_t malloc_hooks);
/* Get the default malloc hooks. */
assuan_malloc_hooks_t assuan_get_malloc_hooks (void);
/* Set the default log callback handler. */
void assuan_set_log_cb (assuan_log_cb_t log_cb, void *log_cb_data);
/* Get the default log callback handler. */
void assuan_get_log_cb (assuan_log_cb_t *log_cb, void **log_cb_data);
/* Create a new Assuan context. The initial parameters are all needed
in the creation of the context. */
gpg_error_t assuan_new_ext (assuan_context_t *ctx, gpg_err_source_t errsource,
assuan_malloc_hooks_t malloc_hooks,
assuan_log_cb_t log_cb, void *log_cb_data);
/* Create a new context with default arguments. */
gpg_error_t assuan_new (assuan_context_t *ctx);
/* Release all resources associated with the given context. */
void assuan_release (assuan_context_t ctx);
/* Release the memory at PTR using the allocation handler of the
context CTX. This is a convenience function. */
void assuan_free (assuan_context_t ctx, void *ptr);
/* Set user-data in a context. */
void assuan_set_pointer (assuan_context_t ctx, void *pointer);
/* Get user-data in a context. */
void *assuan_get_pointer (assuan_context_t ctx);
/* Definitions of flags for assuan_set_flag(). */
typedef unsigned int assuan_flag_t;
/* When using a pipe server, by default Assuan will wait for the
forked process to die in assuan_release. In certain cases this
is not desirable. By setting this flag, the waitpid will be
skipped and the caller is responsible to cleanup a forked
process. */
#define ASSUAN_NO_WAITPID 1
/* This flag indicates whether Assuan logging is in confidential mode.
You can use assuan_{begin,end}_condidential to change the mode. */
#define ASSUAN_CONFIDENTIAL 2
/* This flag suppresses fix up of signal handlers for pipes. */
#define ASSUAN_NO_FIXSIGNALS 3
/* This flag changes assuan_transact to return comment lines via the
status callback. The default is to skip comment lines. */
#define ASSUAN_CONVEY_COMMENTS 4
/* For context CTX, set the flag FLAG to VALUE. Values for flags
are usually 1 or 0 but certain flags might allow for other values;
see the description of the type assuan_flag_t for details. */
void assuan_set_flag (assuan_context_t ctx, assuan_flag_t flag, int value);
/* Return the VALUE of FLAG in context CTX. */
int assuan_get_flag (assuan_context_t ctx, assuan_flag_t flag);
/* Same as assuan_set_flag (ctx, ASSUAN_CONFIDENTIAL, 1). */
void assuan_begin_confidential (assuan_context_t ctx);
/* Same as assuan_set_flag (ctx, ASSUAN_CONFIDENTIAL, 0). */
void assuan_end_confidential (assuan_context_t ctx);
/* Direction values for assuan_set_io_monitor. */
#define ASSUAN_IO_FROM_PEER 0
#define ASSUAN_IO_TO_PEER 1
/* Return flags of I/O monitor. */
#define ASSUAN_IO_MONITOR_NOLOG 1
#define ASSUAN_IO_MONITOR_IGNORE 2
/* The IO monitor gets to see all I/O on the context, and can return
ASSUAN_IO_MONITOR_* bits to control actions on it. */
typedef unsigned int (*assuan_io_monitor_t) (assuan_context_t ctx, void *hook,
int inout, const char *line,
size_t linelen);
/* Set the IO monitor function. */
void assuan_set_io_monitor (assuan_context_t ctx,
assuan_io_monitor_t io_monitor, void *hook_data);
#define ASSUAN_SYSTEM_HOOKS_VERSION 1
#define ASSUAN_SPAWN_DETACHED 128
struct assuan_system_hooks
{
/* Always set to ASSUAN_SYTEM_HOOKS_VERSION. */
int version;
/* Sleep for the given number of microseconds. */
void (*usleep) (assuan_context_t ctx, unsigned int usec);
/* Create a pipe with an inheritable end. */
int (*pipe) (assuan_context_t ctx, assuan_fd_t fd[2], int inherit_idx);
/* Close the given file descriptor, created with _assuan_pipe or one
of the socket functions. */
int (*close) (assuan_context_t ctx, assuan_fd_t fd);
ssize_t (*read) (assuan_context_t ctx, assuan_fd_t fd, void *buffer,
size_t size);
ssize_t (*write) (assuan_context_t ctx, assuan_fd_t fd,
const void *buffer, size_t size);
int (*recvmsg) (assuan_context_t ctx, assuan_fd_t fd, assuan_msghdr_t msg,
int flags);
int (*sendmsg) (assuan_context_t ctx, assuan_fd_t fd,
const assuan_msghdr_t msg, int flags);
/* If NAME is NULL, don't exec, just fork. FD_CHILD_LIST is
modified to reflect the value of the FD in the peer process (on
Windows). */
int (*spawn) (assuan_context_t ctx, pid_t *r_pid, const char *name,
const char **argv,
assuan_fd_t fd_in, assuan_fd_t fd_out,
assuan_fd_t *fd_child_list,
void (*atfork) (void *opaque, int reserved),
void *atforkvalue, unsigned int flags);
/* If action is 0, like waitpid. If action is 1, just release the PID? */
pid_t (*waitpid) (assuan_context_t ctx, pid_t pid,
int action, int *status, int options);
int (*socketpair) (assuan_context_t ctx, int _namespace, int style,
int protocol, assuan_fd_t filedes[2]);
};
typedef struct assuan_system_hooks *assuan_system_hooks_t;
/* Configuration of the default log handler. */
/* Set the prefix to be used at the start of a line emitted by assuan
on the log stream. The default is the empty string. Note, that
this function is not thread-safe and should in general be used
right at startup. */
void assuan_set_assuan_log_prefix (const char *text);
/* Return a prefix to be used at the start of a line emitted by assuan
on the log stream. The default implementation returns the empty
string, i.e. "" */
const char *assuan_get_assuan_log_prefix (void);
/* Global default log stream. */
void assuan_set_assuan_log_stream (FILE *fp);
/* Set the per context log stream for the default log handler. */
void assuan_set_log_stream (assuan_context_t ctx, FILE *fp);
typedef gpg_error_t (*assuan_handler_t) (assuan_context_t, char *);
/*-- assuan-handler.c --*/
gpg_error_t assuan_register_command (assuan_context_t ctx,
const char *cmd_string,
assuan_handler_t handler,
const char *help_string);
gpg_error_t assuan_register_post_cmd_notify (assuan_context_t ctx,
void (*fnc)(assuan_context_t,
gpg_error_t));
gpg_error_t assuan_register_bye_notify (assuan_context_t ctx,
assuan_handler_t handler);
gpg_error_t assuan_register_reset_notify (assuan_context_t ctx,
assuan_handler_t handler);
gpg_error_t assuan_register_cancel_notify (assuan_context_t ctx,
assuan_handler_t handler);
gpg_error_t assuan_register_input_notify (assuan_context_t ctx,
assuan_handler_t handler);
gpg_error_t assuan_register_output_notify (assuan_context_t ctx,
assuan_handler_t handler);
gpg_error_t assuan_register_option_handler (assuan_context_t ctx,
gpg_error_t (*fnc)(assuan_context_t,
const char*,
const char*));
gpg_error_t assuan_process (assuan_context_t ctx);
gpg_error_t assuan_process_next (assuan_context_t ctx, int *done);
gpg_error_t assuan_process_done (assuan_context_t ctx, gpg_error_t rc);
int assuan_get_active_fds (assuan_context_t ctx, int what,
assuan_fd_t *fdarray, int fdarraysize);
const char *assuan_get_command_name (assuan_context_t ctx);
FILE *assuan_get_data_fp (assuan_context_t ctx);
gpg_error_t assuan_set_okay_line (assuan_context_t ctx, const char *line);
gpg_error_t assuan_write_status (assuan_context_t ctx,
const char *keyword, const char *text);
/* Negotiate a file descriptor. If LINE contains "FD=N", returns N
assuming a local file descriptor. If LINE contains "FD" reads a
file descriptor via CTX and stores it in *RDF (the CTX must be
capable of passing file descriptors). Under W32 the returned FD is
a libc-type one. */
gpg_error_t assuan_command_parse_fd (assuan_context_t ctx, char *line,
assuan_fd_t *rfd);
/*-- assuan-listen.c --*/
gpg_error_t assuan_set_hello_line (assuan_context_t ctx, const char *line);
gpg_error_t assuan_accept (assuan_context_t ctx);
assuan_fd_t assuan_get_input_fd (assuan_context_t ctx);
assuan_fd_t assuan_get_output_fd (assuan_context_t ctx);
gpg_error_t assuan_close_input_fd (assuan_context_t ctx);
gpg_error_t assuan_close_output_fd (assuan_context_t ctx);
/*-- assuan-pipe-server.c --*/
gpg_error_t assuan_init_pipe_server (assuan_context_t ctx,
assuan_fd_t filedes[2]);
/*-- assuan-socket-server.c --*/
#define ASSUAN_SOCKET_SERVER_FDPASSING 1
#define ASSUAN_SOCKET_SERVER_ACCEPTED 2
gpg_error_t assuan_init_socket_server (assuan_context_t ctx,
assuan_fd_t listen_fd,
unsigned int flags);
void assuan_set_sock_nonce (assuan_context_t ctx, assuan_sock_nonce_t *nonce);
/*-- assuan-pipe-connect.c --*/
#define ASSUAN_PIPE_CONNECT_FDPASSING 1
#define ASSUAN_PIPE_CONNECT_DETACHED 128
gpg_error_t assuan_pipe_connect (assuan_context_t ctx,
const char *name,
const char *argv[],
assuan_fd_t *fd_child_list,
void (*atfork) (void *, int),
void *atforkvalue,
unsigned int flags);
/*-- assuan-socket-connect.c --*/
#define ASSUAN_SOCKET_CONNECT_FDPASSING 1
gpg_error_t assuan_socket_connect (assuan_context_t ctx, const char *name,
pid_t server_pid, unsigned int flags);
-/*-- assuan-connect.c --*/
+/*-- context.c --*/
pid_t assuan_get_pid (assuan_context_t ctx);
struct _assuan_peercred
{
#ifdef _WIN32
/* Empty struct not allowed on some compilers. */
unsigned int _dummy;
#else
pid_t pid;
uid_t uid;
gid_t gid;
#endif
};
typedef struct _assuan_peercred *assuan_peercred_t;
gpg_error_t assuan_get_peercred (assuan_context_t ctx,
assuan_peercred_t *peercred);
/* Client interface. */
#define ASSUAN_RESPONSE_ERROR 0
#define ASSUAN_RESPONSE_OK 1
#define ASSUAN_RESPONSE_DATA 2
#define ASSUAN_RESPONSE_INQUIRE 3
#define ASSUAN_RESPONSE_STATUS 4
#define ASSUAN_RESPONSE_END 5
#define ASSUAN_RESPONSE_COMMENT 6
typedef int assuan_response_t;
/* This already de-escapes data lines. */
gpg_error_t assuan_client_read_response (assuan_context_t ctx,
char **line, int *linelen);
gpg_error_t assuan_client_parse_response (assuan_context_t ctx,
char *line, int linelen,
assuan_response_t *response,
int *off);
/*-- assuan-client.c --*/
gpg_error_t
assuan_transact (assuan_context_t ctx,
const char *command,
gpg_error_t (*data_cb)(void *, const void *, size_t),
void *data_cb_arg,
gpg_error_t (*inquire_cb)(void*, const char *),
void *inquire_cb_arg,
gpg_error_t (*status_cb)(void*, const char *),
void *status_cb_arg);
/*-- assuan-inquire.c --*/
gpg_error_t assuan_inquire (assuan_context_t ctx, const char *keyword,
unsigned char **r_buffer, size_t *r_length,
size_t maxlen);
gpg_error_t assuan_inquire_ext (assuan_context_t ctx, const char *keyword,
size_t maxlen,
gpg_error_t (*cb) (void *cb_data,
gpg_error_t rc,
unsigned char *buf,
size_t buf_len),
void *cb_data);
/*-- assuan-buffer.c --*/
gpg_error_t assuan_read_line (assuan_context_t ctx,
char **line, size_t *linelen);
int assuan_pending_line (assuan_context_t ctx);
gpg_error_t assuan_write_line (assuan_context_t ctx, const char *line);
gpg_error_t assuan_send_data (assuan_context_t ctx,
const void *buffer, size_t length);
/* The file descriptor must be pending before assuan_receivefd is
called. This means that assuan_sendfd should be called *before* the
trigger is sent (normally via assuan_write_line ("INPUT FD")). */
gpg_error_t assuan_sendfd (assuan_context_t ctx, assuan_fd_t fd);
gpg_error_t assuan_receivefd (assuan_context_t ctx, assuan_fd_t *fd);
/*-- assuan-util.c --*/
gpg_error_t assuan_set_error (assuan_context_t ctx, gpg_error_t err,
const char *text);
/*-- assuan-socket.c --*/
/* These are socket wrapper functions to support an emulation of Unix
domain sockets on Windows W32. */
gpg_error_t assuan_sock_init (void);
void assuan_sock_deinit (void);
int assuan_sock_close (assuan_fd_t fd);
assuan_fd_t assuan_sock_new (int domain, int type, int proto);
int assuan_sock_connect (assuan_fd_t sockfd,
struct sockaddr *addr, int addrlen);
int assuan_sock_bind (assuan_fd_t sockfd, struct sockaddr *addr, int addrlen);
int assuan_sock_get_nonce (struct sockaddr *addr, int addrlen,
assuan_sock_nonce_t *nonce);
int assuan_sock_check_nonce (assuan_fd_t fd, assuan_sock_nonce_t *nonce);
/* Set the default or per context system callbacks. This is
irreversible. */
void assuan_set_system_hooks (assuan_system_hooks_t system_hooks);
void assuan_ctx_set_system_hooks (assuan_context_t ctx,
assuan_system_hooks_t system_hooks);
void __assuan_usleep (assuan_context_t ctx, unsigned int usec);
int __assuan_pipe (assuan_context_t ctx, assuan_fd_t fd[2], int inherit_idx);
int __assuan_close (assuan_context_t ctx, assuan_fd_t fd);
int __assuan_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
const char **argv, assuan_fd_t fd_in, assuan_fd_t fd_out,
assuan_fd_t *fd_child_list,
void (*atfork) (void *opaque, int reserved),
void *atforkvalue, unsigned int flags);
int __assuan_socketpair (assuan_context_t ctx, int _namespace, int style,
int protocol, assuan_fd_t filedes[2]);
#define ASSUAN_SYSTEM_PTH_IMPL \
static void _assuan_pth_usleep (assuan_context_t ctx, unsigned int usec) \
{ (void) ctx; pth_usleep (usec); } \
static ssize_t _assuan_pth_read (assuan_context_t ctx, assuan_fd_t fd, \
void *buffer, size_t size) \
{ (void) ctx; return pth_read (fd, buffer, size); } \
static ssize_t _assuan_pth_write (assuan_context_t ctx, assuan_fd_t fd, \
const void *buffer, size_t size) \
{ (void) ctx; return pth_write (fd, buffer, size); } \
@include:sys-pth-impl@
static pid_t _assuan_pth_waitpid (assuan_context_t ctx, pid_t pid, \
int nowait, int *status, int options) \
{ (void) ctx; \
if (!nowait) return pth_waitpid (pid, status, options); \
else return 0; } \
\
struct assuan_system_hooks _assuan_system_pth = \
{ ASSUAN_SYSTEM_HOOKS_VERSION, _assuan_pth_usleep, __assuan_pipe, \
__assuan_close, _assuan_pth_read, _assuan_pth_write, \
_assuan_pth_recvmsg, _assuan_pth_sendmsg, \
__assuan_spawn, _assuan_pth_waitpid, __assuan_socketpair }
extern struct assuan_system_hooks _assuan_system_pth;
#define ASSUAN_SYSTEM_PTH &_assuan_system_pth
@include:w32ce-add@
#ifdef __cplusplus
}
#endif
#endif /* ASSUAN_H */

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 8, 2:33 PM (1 d, 1 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
80/7d/7c6379f0aedf5722681e6123d41a

Event Timeline