Page MenuHome GnuPG

No OneTemporary

This document is not UTF8. It was detected as Shift JIS and converted to UTF8 for display.
diff --git a/AUTHORS b/AUTHORS
index 04dc987..4d0596c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,73 +1,59 @@
Package: libassuan
Maintainer: Werner Koch <wk@gnupg.org>
Bug reports: gnupg-devel@gnupg.org
Security related bug reports: security@gnupg.org
License (library): LGPLv2.1+
License (manual): GPLv3+
Libassuan is free software. See below for details. License copyright
years may be listed using range notation, e.g., 2000-2013, indicating
that every year in the range, inclusive, is a copyrightable year that
would otherwise be listed individually.
Authors with a FSF copyright assignment
=======================================
Werner Koch <wk@gnupg.org>
- Initial code.
Neal H. Walfield <neal@g10code.de>
- Code cleanup, descriptor passing and bug fixes.
Marcus Brinkmann <marcus@g10code.de>
- Shared library version, bug fixes.
g10 Code GmbH <info@g10code.com>
- all work indicated by mail addresses in ChangeLogs
Ben Kibbey <bjk@luxsci.net> Assigns Past and Future Changes For GnuPG.
- Fixes and new features
Authors with a DCO
==================
Notes:
======
Libassuan was orginally part of NewPG, a temporary fork of GnuPG, and
later split of into a separate library.
Copyright
=========
The Libassuan code is distributed under the GNU Lesser General Public
License, version 2.1 or later. The manual is distributed under the
GNU General Public License, Version 3 or later.
List of Copyright holders
=========================
Copyright (C) 1992-2013 Free Software Foundation, Inc.
Copyright (C) 1994 X Consortium
Copyright (C) 2000 Werner Koch (dd9jn)
- Copyright (C) 2001-2021,2023-2024 g10 Code GmbH
+ Copyright (C) 2001-2021,2023-2025 g10 Code GmbH
Copyright (C) 2004 Simon Josefsson
-
-
-==========
-
- Copyright 2003-2013 Free Software Foundation, Inc.
- Copyright (C) 2013-2016 g10 Code GmbH
-
- 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/README b/README
index 3b84975..fe012aa 100644
--- a/README
+++ b/README
@@ -1,33 +1,33 @@
Libassuan
===========
Copyright (C) 2001-2013 Free Software Foundation, Inc.
- Copyright (C) 2001-2021,2023-2024 g10 Code GmbH
+ Copyright (C) 2001-2021,2023-2025 g10 Code GmbH
This is a general purpose IPC library which is for example used
GnuPG, GPGME and some other software.
See COPYING.LIB on how to share, modify and distribute the
software itself (LGPLv2.1+) and COPYING for the documentation
(GPLv3+).
Please send bug report to the gnupg-devel mailing list or enter
them into the gnupg bug tracker at https://bugs.gnupg.org using the
tag "libassuan".
The primary FTP site is https://gnupg.org/ftp/gcrypt/libassuan.
Contact
-------
See the file AUTHORS.
Commercial grade support for Libassuan and GnuPG is available; for
a listing of offers see https://www.gnupg.org/service.html .
Maintaining and improving this software is costly. Since 2001,
g10 Code GmbH, a German company owned and headed by GnuPG's
principal author Werner Koch, is bearing the majority of these
costs. To help them carry on this work, they need your support.
See https://gnupg.org/donate/ .
diff --git a/autogen.sh b/autogen.sh
index 9b36158..0b08e8b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,513 +1,544 @@
#! /bin/sh
# autogen.sh
-# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH
+# Copyright (C) 2003, 2014, 2017, 2018, 2022 g10 Code GmbH
#
# 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 program 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.
#
# This is a generic script to create the configure script and handle cross
# build environments. It requires the presence of a autogen.rc file to
# configure it for the respective package. It is maintained as part of
# GnuPG and source copied by other packages.
#
-# Version: 2018-07-10
+# Version: 2024-12-03
configure_ac="configure.ac"
cvtver () {
awk 'NR==1 {split($NF,A,".");X=1000000*A[1]+1000*A[2]+A[3];print X;exit 0}'
}
check_version () {
if [ $(( `("$1" --version || echo "0") | cvtver` >= $2 )) = 1 ]; then
return 0
fi
echo "**Error**: "\`$1\'" not installed or too old." >&2
echo ' Version '$3' or newer is required.' >&2
[ -n "$4" ] && echo ' Note that this is part of '\`$4\''.' >&2
DIE="yes"
return 1
}
fatal () {
echo "autogen.sh:" "$*" >&2
DIE=yes
}
info () {
if [ -z "${SILENT}" ]; then
echo "autogen.sh:" "$*" >&2
fi
}
die_p () {
if [ "$DIE" = "yes" ]; then
echo "autogen.sh: Stop." >&2
exit 1
fi
}
replace_sysroot () {
configure_opts=$(echo $configure_opts | sed "s#@SYSROOT@#${w32root}#g")
extraoptions=$(echo $extraoptions | sed "s#@SYSROOT@#${w32root}#g")
}
# Allow to override the default tool names
AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX}
AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX}
AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX}
ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX}
GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX}
MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
DIE=no
FORCE=
SILENT=
PRINT_HOST=no
PRINT_BUILD=no
+PRINT_TSDIR=no
tmp=$(dirname "$0")
tsdir=$(cd "${tmp}"; pwd)
if [ -n "${AUTOGEN_SH_SILENT}" ]; then
SILENT=" --silent"
fi
if test x"$1" = x"--help"; then
echo "usage: ./autogen.sh [OPTIONS] [ARGS]"
echo " Options:"
echo " --silent Silent operation"
echo " --force Pass --force to autoconf"
echo " --find-version Helper for configure.ac"
- echo " --git-build Run all commands to build from a Git"
+ echo " --git-build Run all commands to build from a Git"
echo " --print-host Print only the host triplet"
echo " --print-build Print only the build platform triplet"
+ echo " --print-tsdir Print only the dir of this script"
echo " --build-TYPE Configure to cross build for TYPE"
echo ""
echo " ARGS are passed to configure in --build-TYPE mode."
echo " Configuration for this script is expected in autogen.rc"
exit 0
fi
if test x"$1" = x"--silent"; then
SILENT=" --silent"
shift
fi
if test x"$1" = x"--force"; then
FORCE=" --force"
shift
fi
if test x"$1" = x"--print-host"; then
PRINT_HOST=yes
shift
fi
if test x"$1" = x"--print-build"; then
PRINT_BUILD=yes
shift
fi
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
# as unsafe because it is too easy to get scripts wrong in this regard.
am_lf='
'
case `pwd` in
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
fatal "unsafe working directory name" ;;
esac
case $tsdir in
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
fatal "unsafe source directory: \`$tsdir'" ;;
esac
case $HOME in
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
fatal "unsafe home directory: \`$HOME'" ;;
esac
die_p
# List of variables sourced from autogen.rc. The strings '@SYSROOT@' in
# these variables are replaced by the actual system root.
configure_opts=
extraoptions=
# List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc
+maintainer_mode_option=
w32_toolprefixes=
w32_extraoptions=
-w32ce_toolprefixes=
-w32ce_extraoptions=
w64_toolprefixes=
w64_extraoptions=
amd64_toolprefixes=
+disable_gettext_checks=
# End list of optional variables sourced from ~/.gnupg-autogen.rc
# What follows are variables which are sourced but default to
# environment variables or lacking them hardcoded values.
#w32root=
-#w32ce_root=
#w64root=
#amd64root=
# Convenience option to use certain configure options for some hosts.
myhost=""
myhostsub=""
case "$1" in
--find-version)
myhost="find-version"
SILENT=" --silent"
shift
;;
+ --print-tsdir)
+ myhost="print-tsdir"
+ SILENT=" --silent"
+ shift
+ ;;
--git-build)
myhost="git-build"
shift
;;
--build-w32)
myhost="w32"
shift
;;
- --build-w32ce)
- myhost="w32"
- myhostsub="ce"
- shift
- ;;
--build-w64)
myhost="w32"
myhostsub="64"
shift
;;
--build-amd64)
myhost="amd64"
shift
;;
--build*)
fatal "**Error**: invalid build option $1"
shift
;;
*)
;;
esac
die_p
# **** GIT BUILD ****
# This is a helper to build from git.
if [ "$myhost" = "git-build" ]; then
tmp="$(pwd)"
cd "$tsdir" || fatal "error cd-ing to $tsdir"
./autogen.sh || fatal "error running ./autogen.sh"
cd "$tmp" || fatal "error cd-ing back to $tmp"
die_p
"$tsdir"/configure || fatal "error running $tsdir/configure"
die_p
make || fatal "error running make"
die_p
- make check || fatal "error running male check"
+ make check || fatal "error running make check"
die_p
exit 0
fi
# **** end GIT BUILD ****
# Source our configuration
if [ -f "${tsdir}/autogen.rc" ]; then
. "${tsdir}/autogen.rc"
fi
# Source optional site specific configuration
if [ -f "$HOME/.gnupg-autogen.rc" ]; then
info "sourcing extra definitions from $HOME/.gnupg-autogen.rc"
. "$HOME/.gnupg-autogen.rc"
fi
+# Disable the --enable-maintainer_mode option.
+if [ "${maintainer_mode_option}" = off ]; then
+ maintainer_mode_option=
+elif [ -z "${maintainer_mode_option}" ]; then
+ maintainer_mode_option=--enable-maintainer-mode
+fi
# **** FIND VERSION ****
# This is a helper for the configure.ac M4 magic
# Called
# ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]
# returns a complete version string with automatic beta numbering.
if [ "$myhost" = "find-version" ]; then
package="$1"
major="$2"
minor="$3"
micro="$4"
if [ -z "$package" -o -z "$major" -o -z "$minor" ]; then
echo "usage: ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]" >&2
exit 1
fi
if [ -z "$micro" ]; then
matchstr1="$package-$major.[0-9]*"
matchstr2="$package-$major-base"
+ matchstr3=""
vers="$major.$minor"
else
matchstr1="$package-$major.$minor.[0-9]*"
- matchstr2="$package-$major.$minor-base"
+ matchstr2="$package-$major.[0-9]*-base"
+ matchstr3="$package-$major-base"
vers="$major.$minor.$micro"
fi
beta=no
if [ -e .git ]; then
ingit=yes
tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
- tmp=$(echo "$tmp" | sed s/^"$package"//)
if [ -n "$tmp" ]; then
- tmp=$(echo "$tmp" | sed s/^"$package"// \
- | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
+ tmp=$(echo "$tmp" | sed s/^"$package"// \
+ | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
else
- tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null \
- | awk -F- '$4!=0{print"-beta"$4}')
+ # (due tof "-base" in the tag we need to take the 4th field)
+ tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null)
+ if [ -n "$tmp" ]; then
+ tmp=$(echo "$tmp" | sed s/^"$package"// \
+ | awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}')
+ elif [ -n "${matchstr3}" ]; then
+ tmp=$(git describe --match "${matchstr3}" --long 2>/dev/null)
+ if [ -n "$tmp" ]; then
+ tmp=$(echo "$tmp" | sed s/^"$package"// \
+ | awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}')
+ fi
+ fi
fi
[ -n "$tmp" ] && beta=yes
+ cid=$(git rev-parse --verify HEAD | tr -d '\n\r')
rev=$(git rev-parse --short HEAD | tr -d '\n\r')
rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
else
ingit=no
beta=yes
tmp="-unknown"
+ cid="0000000"
rev="0000000"
rvd="0"
fi
- echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:"
+ echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:$cid:"
exit 0
fi
# **** end FIND VERSION ****
+# **** PRINT TSDIR VERSION ****
+# This is a helper used by some configure.ac M4 magic
+if [ "$myhost" = "print-tsdir" ]; then
+ echo "$tsdir"
+ exit 0
+fi
+# **** end PRINT TSDIR ****
+
if [ ! -f "$tsdir/build-aux/config.guess" ]; then
fatal "$tsdir/build-aux/config.guess not found"
exit 1
fi
build=`$tsdir/build-aux/config.guess`
if [ $PRINT_BUILD = yes ]; then
echo "$build"
exit 0
fi
# ******************
# W32 build script
# ******************
if [ "$myhost" = "w32" ]; then
case $myhostsub in
- ce)
- w32root="$w32ce_root"
- [ -z "$w32root" ] && w32root="$HOME/w32ce_root"
- toolprefixes="$w32ce_toolprefixes arm-mingw32ce"
- extraoptions="$extraoptions $w32ce_extraoptions"
- ;;
64)
w32root="$w64root"
[ -z "$w32root" ] && w32root="$HOME/w64root"
toolprefixes="$w64_toolprefixes x86_64-w64-mingw32"
extraoptions="$extraoptions $w64_extraoptions"
;;
*)
[ -z "$w32root" ] && w32root="$HOME/w32root"
toolprefixes="$w32_toolprefixes i686-w64-mingw32 i586-mingw32msvc"
toolprefixes="$toolprefixes i386-mingw32msvc mingw32"
extraoptions="$extraoptions $w32_extraoptions"
;;
esac
+ w32root=$(echo "$w32root" | sed s,^//,/,)
info "Using $w32root as standard install directory"
replace_sysroot
# Locate the cross compiler
crossbindir=
for host in $toolprefixes; do
if ${host}-gcc --version >/dev/null 2>&1 ; then
crossbindir=/usr/${host}/bin
conf_CC="CC=${host}-gcc"
break;
fi
done
if [ -z "$crossbindir" ]; then
fatal "cross compiler kit not installed"
if [ -z "$myhostsub" ]; then
info "Under Debian GNU/Linux, you may install it using"
info " apt-get install mingw32 mingw32-runtime mingw32-binutils"
fi
die_p
fi
if [ $PRINT_HOST = yes ]; then
echo "$host"
exit 0
fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
fatal "Please run a 'make distclean' first"
die_p
fi
fi
- $tsdir/configure --enable-maintainer-mode ${SILENT} \
+ $tsdir/configure "${maintainer_mode_option}" ${SILENT} \
--prefix=${w32root} \
--host=${host} --build=${build} SYSROOT=${w32root} \
PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \
${configure_opts} ${extraoptions} "$@"
rc=$?
exit $rc
fi
# ***** end W32 build script *******
# ***** AMD64 cross build script *******
# Used to cross-compile for AMD64 (for testing)
if [ "$myhost" = "amd64" ]; then
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
info "Using $amd64root as standard install directory"
replace_sysroot
toolprefixes="$amd64_toolprefixes x86_64-linux-gnu amd64-linux-gnu"
# Locate the cross compiler
crossbindir=
for host in $toolprefixes ; do
if ${host}-gcc --version >/dev/null 2>&1 ; then
crossbindir=/usr/${host}/bin
conf_CC="CC=${host}-gcc"
break;
fi
done
if [ -z "$crossbindir" ]; then
echo "Cross compiler kit not installed" >&2
echo "Stop." >&2
exit 1
fi
if [ $PRINT_HOST = yes ]; then
echo "$host"
exit 0
fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
echo "Please run a 'make distclean' first" >&2
exit 1
fi
fi
- $tsdir/configure --enable-maintainer-mode ${SILENT} \
+ $tsdir/configure "${maintainer_mode_option}" ${SILENT} \
--prefix=${amd64root} \
--host=${host} --build=${build} \
${configure_opts} ${extraoptions} "$@"
rc=$?
exit $rc
fi
# ***** end AMD64 cross build script *******
# Grep the required versions from configure.ac
autoconf_vers=`sed -n '/^AC_PREREQ(/ {
s/^.*(\(.*\))/\1/p
q
}' ${configure_ac}`
autoconf_vers_num=`echo "$autoconf_vers" | cvtver`
automake_vers=`sed -n '/^min_automake_version=/ {
s/^.*="\(.*\)"/\1/p
q
}' ${configure_ac}`
automake_vers_num=`echo "$automake_vers" | cvtver`
+gettext_vers="n/a"
if [ -d "${tsdir}/po" ]; then
gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ {
s/^.*\[\(.*\)])/\1/p
q
}' ${configure_ac}`
gettext_vers_num=`echo "$gettext_vers" | cvtver`
-else
- gettext_vers="n/a"
fi
-if [ -z "$autoconf_vers" -o -z "$automake_vers" -o -z "$gettext_vers" ]
+if [ -z "$autoconf_vers" -o -z "$automake_vers" ]
then
echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2
exit 1
fi
if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then
check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf
fi
if check_version $AUTOMAKE $automake_vers_num $automake_vers; then
check_version $ACLOCAL $automake_vers_num $autoconf_vers automake
fi
if [ "$gettext_vers" != "n/a" ]; then
if check_version $GETTEXT $gettext_vers_num $gettext_vers; then
check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext
fi
fi
if [ "$DIE" = "yes" ]; then
cat <<EOF
Note that you may use alternative versions of the tools by setting
the corresponding environment variables; see README.GIT for details.
EOF
die_p
fi
# Check the git setup.
if [ -d .git ]; then
CP="cp -p"
# If we have a GNU cp we can add -v
if cp --version >/dev/null 2>/dev/null; then
[ -z "${SILENT}" ] && CP="$CP -v"
fi
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
[ -z "${SILENT}" ] && cat <<EOF
*** Activating trailing whitespace git pre-commit hook. ***
For more information see this thread:
https://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084.html
To deactivate this pre-commit hook again move .git/hooks/pre-commit
and .git/hooks/pre-commit.sample out of the way.
EOF
$CP .git/hooks/pre-commit.sample .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
fi
if [ "$gettext_vers" != "n/a" ]; then
tmp=$(git config --get filter.cleanpo.clean)
if [ "$tmp" != \
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" ]
then
info "*** Adding GIT filter.cleanpo.clean configuration."
git config --add filter.cleanpo.clean \
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'"
fi
fi
if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then
[ -z "${SILENT}" ] && cat <<EOF
*** Activating commit log message check hook. ***
EOF
$CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg
chmod +x .git/hooks/commit-msg
if [ x"${display_name}" != x ]; then
git config format.subjectPrefix "PATCH ${display_name}"
git config sendemail.to "${patches_to}"
fi
fi
fi
aclocal_flags="-I m4"
if [ -n "${extra_aclocal_flags}" ]; then
aclocal_flags="${aclocal_flags} ${extra_aclocal_flags}"
fi
if [ -n "${ACLOCAL_FLAGS}" ]; then
aclocal_flags="${aclocal_flags} ${ACLOCAL_FLAGS}"
fi
+
+automake_flags="--gnu"
+if [ -n "${extra_automake_flags}" ]; then
+ automake_flags="${automake_flags} ${extra_automake_flags}"
+fi
+if [ -n "${AUTOMAKE_FLAGS}" ]; then
+ automake_flags="${automake_flags} ${AUTOMAKE_FLAGS}"
+fi
+
info "Running $ACLOCAL ${aclocal_flags} ..."
$ACLOCAL ${aclocal_flags}
info "Running autoheader..."
$AUTOHEADER
-info "Running automake --gnu ..."
-$AUTOMAKE --gnu;
+info "Running $AUTOMAKE ${automake_flags} ..."
+$AUTOMAKE ${automake_flags};
info "Running autoconf${FORCE} ..."
$AUTOCONF${FORCE}
info "You may now run:${am_lf} ${final_info}"
diff --git a/configure.ac b/configure.ac
index 5dc2dc3..6ede460 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,507 +1,512 @@
# configure.ac - for libassuan
# Copyright (C) 2001, 2002, 2003, 2006, 2007, 2009,
# 2011, 2012, 2013 Free Software Foundation, Inc.
# Copyright (C) 2013, 2014, 2015 g10 Code GmbH
#
# 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/>.
# SPDX-License-Identifier: LGPL-2.1+
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
min_automake_version="1.14"
# To build a release you need to create a tag with the version number
# (git tag -s libassuan-n.m.k) and run "./autogen.sh --force". Please
# bump the version number immediately after the release and do another
# commit and push so that the git magic is able to work. See below
# for the LT versions.
m4_define([mym4_package],[libassuan])
m4_define([mym4_major], [3])
m4_define([mym4_minor], [0])
m4_define([mym4_micro], [2])
# To start a new development series, i.e a new major or minor number
# you need to mark an arbitrary commit before the first beta release
# with an annotated tag. For example a 2.1 branch starts off with
# the tag "foo-2.1-base". This is used as the base for counting
# beta numbers before the first release of a series.
# Below is m4 magic to extract and compute the git revision number,
# the decimalized short revision number, a beta version string and a
# flag indicating a development version (mym4_isbeta). Note that the
# m4 processing is done by autoconf and not during the configure run.
m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \
mym4_package mym4_major mym4_minor mym4_micro),[:]))
m4_define([mym4_isbeta], m4_argn(2, mym4_verslist))
m4_define([mym4_version], m4_argn(4, mym4_verslist))
m4_define([mym4_revision], m4_argn(7, mym4_verslist))
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
+m4_define([mym4_commitid], m4_argn(9, mym4_verslist))
m4_esyscmd([echo ]mym4_version[>VERSION])
+m4_esyscmd([echo ]mym4_commitid[>>VERSION])
AC_INIT([mym4_package],[mym4_version],[https://bugs.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=9
LIBASSUAN_LT_AGE=0
LIBASSUAN_LT_REVISION=1
# If the API is changed in an incompatible way: increment the next counter.
LIBASSUAN_CONFIG_API_VERSION=3
##############################################
AC_SUBST(LIBASSUAN_LT_CURRENT)
AC_SUBST(LIBASSUAN_LT_AGE)
AC_SUBST(LIBASSUAN_LT_REVISION)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR(src/assuan.h.in)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
AM_SILENT_RULES
AB_INIT
AC_USE_SYSTEM_EXTENSIONS
# Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE
dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH
dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has
dnl the precedence over the run path, so that if a compatible MPFR library
dnl is installed in some directory from $LD_LIBRARY_PATH, then the tested
dnl MPFR library will be this library instead of the MPFR library from the
dnl build tree. Other OS with the same issue might be added later.
dnl
dnl References:
dnl https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732
dnl http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html
dnl
dnl We need to check whether --disable-new-dtags is supported as alternate
dnl linkers may be used (e.g., with tcc: CC=tcc LD=tcc).
dnl
case $host in
*-*-linux*)
if test -n "$LD_LIBRARY_PATH"; then
saved_LDFLAGS="$LDFLAGS"
LDADD_FOR_TESTS_KLUDGE="-Wl,--disable-new-dtags"
LDFLAGS="$LDFLAGS $LDADD_FOR_TESTS_KLUDGE"
AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker)
AC_LINK_IFELSE([AC_LANG_SOURCE([[
int main (void) { return 0; }
]])],
[AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))],
[AC_MSG_RESULT(no)
LDADD_FOR_TESTS_KLUDGE=""
])
LDFLAGS="$saved_LDFLAGS"
fi
;;
esac
AC_SUBST([LDADD_FOR_TESTS_KLUDGE])
VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \
mym4_minor mym4_micro)
AC_SUBST(VERSION_NUMBER)
# 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,
Expose all libc features (__DARWIN_C_FULL))
;;
esac
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
#
# Specify how we support our local modification of libtool for Windows
# 64-bit. Options are:
#
# (1) apply: when appying patch fails, it results failure of entire build
# (2) never: never apply the patch (no try)
# (3) try: use patched if it goes well, use original if fails
#
AC_ARG_WITH([libtool-modification],
AS_HELP_STRING([--with-libtool-modification=apply|never|try],
[how to handle libtool modification (default=never)]),
build_libtool_modification=$withval,
build_libtool_modification=never)
#
# Apply a patch (locally maintained one of ours) to libtool
#
case $host in
x86_64-*mingw32*)
AC_CONFIG_COMMANDS([libtool-patch],[[
if test "$build_selection" = never; then
echo "patch not applied"
elif (mv -f libtool libtool.orig; \
sed -f $srcdir/build-aux/libtool-patch.sed libtool.orig >libtool); then
echo "applied successfully"
elif test "$build_selection" = try; then
mv -f libtool.orig libtool
echo "patch failed, thus, using original"
else
echo "patch failed"
as_fn_exit 1
fi
]],[build_selection=$build_libtool_modification])
;;
*)
;;
esac
AH_TOP([
#ifndef _ASSUAN_CONFIG_H_INCLUDED
#define _ASSUAN_CONFIG_H_INCLUDED
/* Provide the es_ macro for estream. */
#define GPGRT_ENABLE_ES_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.
AX_CC_FOR_BUILD
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_w64_system=no
case "${host}" in
*-linux*)
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -fPIC -DPIC"
fi
;;
x86_64-*mingw32*)
have_dosish_system=yes
have_w32_system=yes
have_w64_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
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_w64_system" = yes; then
AC_DEFINE(HAVE_W64_SYSTEM,1,
[Defined if we run on a 64 bit W32 API based system])
fi
AC_CHECK_HEADERS([winsock2.h])
fi
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes)
#
# Provide information about the build.
#
BUILD_REVISION="mym4_revision"
AC_SUBST(BUILD_REVISION)
AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
[GIT commit id revision used to build this package])
+BUILD_COMMITID="mym4_commitid"
+AC_DEFINE_UNQUOTED(BUILD_COMMITID, "$BUILD_COMMITID",
+ [Git commit id used to build this package])
changequote(,)dnl
BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
changequote([,])dnl
BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec"
AC_SUBST(BUILD_FILEVERSION)
AC_ARG_ENABLE([build-timestamp],
AS_HELP_STRING([--enable-build-timestamp],
[set an explicit build timestamp for reproducibility.
(default is the current time in ISO-8601 format)]),
[if test "$enableval" = "yes"; then
BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
else
BUILD_TIMESTAMP="$enableval"
fi],
[BUILD_TIMESTAMP="<none>"])
AC_SUBST(BUILD_TIMESTAMP)
AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
[The time this package was configured for a build])
#
# 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
# FIXME: Check why we need to use ws2_32 and document that.
NETLIBS="-lws2_32 $NETLIBS"
fi
#
# Provide info for src/libassuan-config.in
#
LIBASSUAN_CONFIG_LIBS="-lassuan"
LIBASSUAN_CONFIG_CFLAGS=""
LIBASSUAN_CONFIG_HOST="$host"
AC_SUBST(LIBASSUAN_CONFIG_LIBS)
AC_SUBST(LIBASSUAN_CONFIG_CFLAGS)
AC_SUBST(LIBASSUAN_CONFIG_HOST)
AC_SUBST(LIBASSUAN_CONFIG_API_VERSION)
#
# Checks for header files.
#
AC_CHECK_HEADERS([locale.h sys/uio.h stdint.h inttypes.h \
sys/types.h sys/stat.h unistd.h sys/time.h fcntl.h \
sys/select.h ucred.h sys/ucred.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
gl_TYPE_SOCKLEN_T
# Windows has different method for "descriptor passing" (actually,
# it's file handle passing), so, don't check the feature.
check_descriptor_passing=yes
case "${host}" in
*-*-cygwin*)
check_descriptor_passing=no
;;
*-mingw32*)
check_descriptor_passing=no
;;
esac
if test $check_descriptor_passing != yes; then
use_descriptor_passing=no
else
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>
])
fi
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.17,, AC_MSG_ERROR([libgpg-error was not found]))
AM_CONDITIONAL(USE_GPGRT_CONFIG, [test -n "$GPGRT_CONFIG" \
-a "$ac_cv_path_GPG_ERROR_CONFIG" = no])
#
# Checks for library functions.
#
AC_CHECK_FUNCS([flockfile funlockfile inet_pton stat getaddrinfo \
getrlimit ])
# If we didn't find inet_pton, it might be in -lsocket (which might
# require -lnsl)
if test X"$ac_cv_func_inet_pton" != X"yes" ; then
AC_SEARCH_LIBS([inet_pton],[socket],[],[],[-lnsl])
if test X"$ac_cv_search_inet_pton" != X"no" ; then
AC_DEFINE([HAVE_INET_PTON],1,[Define to 1 if you have `inet_pton'.])
fi
fi
# 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(memrchr)
AC_REPLACE_FUNCS(stpcpy)
AC_CHECK_HEADERS(unistd.h)
AC_REPLACE_FUNCS(setenv)
#
# Check for the getsockopt SO_PEERCRED, etc.
#
AC_CHECK_MEMBER(struct sockpeercred.pid,
[AC_DEFINE(HAVE_STRUCT_SOCKPEERCRED_PID, 1,
Define if struct sockpeercred contains the pid member.)],
[], [#include <sys/types.h>
#include <sys/socket.h> ])
# (Open)Solaris
AC_CHECK_FUNCS([getpeerucred])
# FreeBSD
AC_CHECK_FUNCS([getpeereid])
AC_CHECK_MEMBER(struct xucred.cr_pid,
[AC_DEFINE(HAVE_XUCRED_CR_PID, 1,
Define if struct xucred contains the cr_pid member.)],
[], [#include <sys/ucred.h>
#include <sys/ucred.h> ])
#
# Extra features
#
build_doc=yes
AC_ARG_ENABLE([doc], AS_HELP_STRING([--disable-doc],
[do not build the documentation]),
build_doc=$enableval, build_doc=yes)
AM_CONDITIONAL([BUILD_DOC], [test "x$build_doc" != xno])
#
# 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_CONFIG_FILES([src/libassuan.pc])
AC_OUTPUT
echo "
Libassuan v${VERSION} has been configured as follows:
Revision: mym4_revision (mym4_revision_dec)
Platform: $host
"
diff --git a/src/sysutils.c b/src/sysutils.c
index 4383888..657b527 100644
--- a/src/sysutils.c
+++ b/src/sysutils.c
@@ -1,53 +1,53 @@
/* sysutils.c - System utilities
* Copyright (C) 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/>.
* SPDX-License-Identifier: LGPL-2.1+
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#ifdef HAVE_W32_SYSTEM
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# endif
# include <windows.h>
#endif /*HAVE_W32_SYSTEM*/
#include "assuan-defs.h"
/* This is actually a dummy function to make sure that is module is
not empty. Some compilers barf on empty modules. */
const char *
_assuan_sysutils_blurb (void)
{
static const char blurb[] =
"\n\n"
"This is Libassuan " PACKAGE_VERSION " - The GnuPG IPC Library\n"
"Copyright 2001-2013 Free Software Foundation, Inc.\n"
- "Copyright 2001-2021,2023-2024 g10 Code GmbH\n"
+ "Copyright 2001-2021,2023-2025 g10 Code GmbH\n"
"\n"
"SPDX-License-Identifier: LGPL-2.1-or-later\n"
- "(" BUILD_REVISION " " BUILD_TIMESTAMP ")\n"
+ "(" BUILD_COMMITID " " BUILD_TIMESTAMP ")\n"
"\n\n";
return blurb;
}
diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in
index 1e96245..8aa3bbe 100644
--- a/src/versioninfo.rc.in
+++ b/src/versioninfo.rc.in
@@ -1,52 +1,52 @@
/* versioninfo.rc.in - for assuan
* Copyright (C) 2005 g10 Code GmbH
*
* 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 program 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.
* SPDX-License-Identifier: FSFULLR
*/
/* This file is processed by configure to create versioninfo.rc */
#line __LINE__ "versioninfo.rc.in"
#include <afxres.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @BUILD_FILEVERSION@
PRODUCTVERSION @BUILD_FILEVERSION@
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x21L
#else
FILEFLAGS 0x20L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "Provided under the terms of the GNU Lesser General Public License.\0"
VALUE "CompanyName", "g10 Code GmbH\0"
VALUE "FileDescription", "Assuan - GnuPG IPC\0"
VALUE "FileVersion", "@LIBASSUAN_LT_CURRENT@.@LIBASSUAN_LT_AGE@.@LIBASSUAN_LT_REVISION@.@BUILD_REVISION@\0"
VALUE "InternalName", "libassuan\0"
- VALUE "LegalCopyright", "Copyright ゥ 2001-2021 g10 Code GmbH\0"
+ VALUE "LegalCopyright", "Copyright ゥ 2001-2021,2023-2025 g10 Code GmbH\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "libassuan.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Assuan\0"
VALUE "ProductVersion", "@VERSION@\0"
VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0"
END
END
END

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 23, 7:16 PM (40 m, 30 s)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8b/21/2b0473b5d8083aeb7ce03618f0bc

Event Timeline