commit 69ee7c7351e5cc9de6d0de3f25525dd351156d03
parent 00e88ff08800142e0ed4fc9f1ce75ae231fe143d
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 16 Aug 2025 12:49:51 +0200
-fix misc warnings
Diffstat:
11 files changed, 716 insertions(+), 535 deletions(-)
diff --git a/INSTALL b/INSTALL
@@ -1,177 +1,177 @@
Installation Instructions
*************************
- Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
-Software Foundation, Inc.
-
- Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
-
Basic Installation
==================
- Briefly, the shell command './configure && make && make install'
-should configure, build, and install this package. The following
-more-detailed instructions are generic; see the 'README' file for
-instructions specific to this package. Some packages provide this
-'INSTALL' file but do not implement all of the features documented
-below. The lack of an optional feature in a given package is not
-necessarily a bug. More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
- The 'configure' shell script attempts to guess correct values for
+ The following shell commands:
+
+ test -f configure || ./bootstrap
+ ./configure
+ make
+ make install
+
+should configure, build, and install this package. The first line,
+which bootstraps, is intended for developers; when building from
+distribution tarballs it does nothing and can be skipped.
+
+ The following more-detailed instructions are generic; see the
+‘README’ file for instructions specific to this package. Some packages
+provide this ‘INSTALL’ file but do not implement all of the features
+documented below. The lack of an optional feature in a given package is
+not necessarily a bug. More recommendations for GNU packages can be
+found in the GNU Coding Standards.
+
+ Many packages have scripts meant for developers instead of ordinary
+builders, as they may use developer tools that are less commonly
+installed, or they may access the network, which has privacy
+implications. If the ‘bootstrap’ shell script exists, it attempts to
+build the ‘configure’ shell script and related files, possibly using
+developer tools or the network. Because the output of ‘bootstrap’ is
+system-independent, it is normally run by a package developer so that
+its output can be put into the distribution tarball and ordinary
+builders and users need not run ‘bootstrap’. Some packages have
+commands like ‘./autopull.sh’ and ‘./autogen.sh’ that you can run
+instead of ‘./bootstrap’, for more fine-grained control over
+bootstrapping.
+
+ The ‘configure’ shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
-those values to create a 'Makefile' in each directory of the package.
-It may also create one or more '.h' files containing system-dependent
-definitions. Finally, it creates a shell script 'config.status' that
+those values to create a ‘Makefile’ in each directory of the package.
+It may also create one or more ‘.h’ files containing system-dependent
+definitions. Finally, it creates a shell script ‘config.status’ that
you can run in the future to recreate the current configuration, and a
-file 'config.log' containing compiler output (useful mainly for
-debugging 'configure').
+file ‘config.log’ containing output useful for debugging ‘configure’.
- It can also use an optional file (typically called 'config.cache' and
-enabled with '--cache-file=config.cache' or simply '-C') that saves the
+ It can also use an optional file (typically called ‘config.cache’ and
+enabled with ‘--cache-file=config.cache’ or simply ‘-C’) that saves the
results of its tests to speed up reconfiguring. Caching is disabled by
default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
-to figure out how 'configure' could check whether to do them, and mail
-diffs or instructions to the address given in the 'README' so they can
+to figure out how ‘configure’ could check whether to do them, and mail
+diffs or instructions to the address given in the ‘README’ so they can
be considered for the next release. If you are using the cache, and at
-some point 'config.cache' contains results you don't want to keep, you
+some point ‘config.cache’ contains results you don’t want to keep, you
may remove or edit it.
- The file 'configure.ac' (or 'configure.in') is used to create
-'configure' by a program called 'autoconf'. You need 'configure.ac' if
-you want to change it or regenerate 'configure' using a newer version of
-'autoconf'.
+ The ‘autoconf’ program generates ‘configure’ from the file
+‘configure.ac’. Normally you should edit ‘configure.ac’ instead of
+editing ‘configure’ directly.
The simplest way to compile this package is:
- 1. 'cd' to the directory containing the package's source code and type
- './configure' to configure the package for your system.
+ 1. ‘cd’ to the directory containing the package’s source code.
+
+ 2. If this is a developer checkout and file ‘configure’ does not yet
+ exist, type ‘./bootstrap’ to create it. You may need special
+ developer tools and network access to bootstrap, and the network
+ access may have privacy implications.
- Running 'configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
+ 3. Type ‘./configure’ to configure the package for your system. This
+ might take a while. While running, ‘configure’ prints messages
+ telling which features it is checking for.
- 2. Type 'make' to compile the package.
+ 4. Type ‘make’ to compile the package.
- 3. Optionally, type 'make check' to run any self-tests that come with
+ 5. Optionally, type ‘make check’ to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
- 4. Type 'make install' to install the programs and any data files and
+ 6. Type ‘make install’ to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
- user, and only the 'make install' phase executed with root
+ user, and only the ‘make install’ phase executed with root
privileges.
- 5. Optionally, type 'make installcheck' to repeat any self-tests, but
+ 7. Optionally, type ‘make installcheck’ to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
- regular user, particularly if the prior 'make install' required
+ regular user, particularly if the prior ‘make install’ required
root privileges, verifies that the installation completed
correctly.
- 6. You can remove the program binaries and object files from the
- source code directory by typing 'make clean'. To also remove the
- files that 'configure' created (so you can compile the package for
- a different kind of computer), type 'make distclean'. There is
- also a 'make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
- 7. Often, you can also type 'make uninstall' to remove the installed
- files again. In practice, not all packages have tested that
- uninstallation works correctly, even though it is required by the
- GNU Coding Standards.
-
- 8. Some packages, particularly those that use Automake, provide 'make
- distcheck', which can by used by developers to test that all other
- targets like 'make install' and 'make uninstall' work correctly.
- This target is generally not run by end users.
+ 8. You can remove the program binaries and object files from the
+ source code directory by typing ‘make clean’. To also remove the
+ files that ‘configure’ created (so you can compile the package for
+ a different kind of computer), type ‘make distclean’. There is
+ also a ‘make maintainer-clean’ target, but that is intended mainly
+ for the package’s developers. If you use it, you may have to
+ bootstrap again.
+
+ 9. If the package follows the GNU Coding Standards, you can type ‘make
+ uninstall’ to remove the installed files.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
-the 'configure' script does not know about. Run './configure --help'
+the ‘configure’ script does not know about. Run ‘./configure --help’
for details on some of the pertinent environment variables.
- You can give 'configure' initial values for configuration parameters
+ You can give ‘configure’ initial values for configuration parameters
by setting variables in the command line or in the environment. Here is
an example:
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+ ./configure CC=gcc CFLAGS=-g LIBS=-lposix
- *Note Defining Variables::, for more details.
+ See “Defining Variables” for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU 'make'. 'cd' to the
-directory where you want the object files and executables to go and run
-the 'configure' script. 'configure' automatically checks for the source
-code in the directory that 'configure' is in and in '..'. This is known
-as a "VPATH" build.
-
- With a non-GNU 'make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use 'make distclean' before
-reconfiguring for another architecture.
-
- On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple '-arch' options to the
-compiler but only a single '-arch' option to the preprocessor. Like
-this:
-
- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CPP="gcc -E" CXXCPP="g++ -E"
-
- This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the 'lipo' tool if you have problems.
+same time, by placing the object files for each system in their own
+directory. To do this, you can use GNU ‘make’. ‘cd’ to the directory
+where you want the object files and executables to go and run the
+‘configure’ script. ‘configure’ automatically checks for the source
+code in the directory that ‘configure’ is in and in ‘..’. This is known
+as a “VPATH” build.
+
+ With a non-GNU ‘make’, it is safer to compile the package for one
+system at a time in the source code directory. After you have installed
+the package for one system, use ‘make distclean’ before reconfiguring
+for another system.
+
+ Some platforms, notably macOS, support “fat” or “universal” binaries,
+where a single binary can execute on different architectures. On these
+platforms you can configure and compile just once, with options specific
+to that platform.
Installation Names
==================
- By default, 'make install' installs the package's commands under
-'/usr/local/bin', include files under '/usr/local/include', etc. You
-can specify an installation prefix other than '/usr/local' by giving
-'configure' the option '--prefix=PREFIX', where PREFIX must be an
+ By default, ‘make install’ installs the package’s commands under
+‘/usr/local/bin’, include files under ‘/usr/local/include’, etc. You
+can specify an installation prefix other than ‘/usr/local’ by giving
+‘configure’ the option ‘--prefix=PREFIX’, where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
-pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
+pass the option ‘--exec-prefix=PREFIX’ to ‘configure’, the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
-options like '--bindir=DIR' to specify different values for particular
-kinds of files. Run 'configure --help' for a list of the directories
+options like ‘--bindir=DIR’ to specify different values for particular
+kinds of files. Run ‘configure --help’ for a list of the directories
you can set and what kinds of files go in them. In general, the default
-for these options is expressed in terms of '${prefix}', so that
-specifying just '--prefix' will affect all of the other directory
+for these options is expressed in terms of ‘${prefix}’, so that
+specifying just ‘--prefix’ will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
-correct locations to 'configure'; however, many packages provide one or
+correct locations to ‘configure’; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
-'make install' command line to change installation locations without
+‘make install’ command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
-affected directory. For example, 'make install
-prefix=/alternate/directory' will choose an alternate location for all
+affected directory. For example, ‘make install
+prefix=/alternate/directory’ will choose an alternate location for all
directory configuration variables that were expressed in terms of
-'${prefix}'. Any directories that were specified during 'configure',
-but not in terms of '${prefix}', must each be overridden at install time
+‘${prefix}’. Any directories that were specified during ‘configure’,
+but not in terms of ‘${prefix}’, must each be overridden at install time
for the entire installation to be relocated. The approach of makefile
variable overrides for each directory variable is required by the GNU
Coding Standards, and ideally causes no recompilation. However, some
@@ -179,190 +179,187 @@ platforms have known limitations with the semantics of shared libraries
that end up requiring recompilation when using this method, particularly
noticeable in packages that use GNU Libtool.
- The second method involves providing the 'DESTDIR' variable. For
-example, 'make install DESTDIR=/alternate/directory' will prepend
-'/alternate/directory' before all installation names. The approach of
-'DESTDIR' overrides is not required by the GNU Coding Standards, and
+ The second method involves providing the ‘DESTDIR’ variable. For
+example, ‘make install DESTDIR=/alternate/directory’ will prepend
+‘/alternate/directory’ before all installation names. The approach of
+‘DESTDIR’ overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of '${prefix}'
-at 'configure' time.
+when some directory options were not specified in terms of ‘${prefix}’
+at ‘configure’ time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving 'configure' the
-option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+with an extra prefix or suffix on their names by giving ‘configure’ the
+option ‘--program-prefix=PREFIX’ or ‘--program-suffix=SUFFIX’.
- Some packages pay attention to '--enable-FEATURE' options to
-'configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to '--with-PACKAGE' options, where PACKAGE
-is something like 'gnu-as' or 'x' (for the X Window System). The
-'README' should mention any '--enable-' and '--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, 'configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the 'configure' options '--x-includes=DIR' and
-'--x-libraries=DIR' to specify their locations.
+ Some packages pay attention to ‘--enable-FEATURE’ and
+‘--disable-FEATURE’ options to ‘configure’, where FEATURE indicates an
+optional part of the package. They may also pay attention to
+‘--with-PACKAGE’ and ‘--without-PACKAGE’ options, where PACKAGE is
+something like ‘gnu-ld’. ‘./configure --help’ should mention the
+‘--enable-...’ and ‘--with-...’ options that the package recognizes.
Some packages offer the ability to configure how verbose the
-execution of 'make' will be. For these packages, running './configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with 'make V=1'; while running './configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with 'make V=0'.
-
-Particular systems
-==================
-
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
-is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
- ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
- HP-UX 'make' updates targets which have the same timestamps as their
-prerequisites, which makes it generally unusable when shipped generated
-files such as 'configure' are involved. Use GNU 'make' instead.
-
- On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
-workaround. If GNU CC is not installed, it is therefore recommended to
-try
-
- ./configure CC="cc"
-
-and if that doesn't work, try
-
- ./configure CC="cc -nodtk"
-
- On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
-directory contains several dysfunctional programs; working variants of
-these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
-in your 'PATH', put it _after_ '/usr/bin'.
-
- On Haiku, software installed for all users goes in '/boot/common',
-not '/usr/local'. It is recommended to use the following options:
-
- ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
- There may be some features 'configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, 'configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-'--build=TYPE' option. TYPE can either be a short name for the system
-type, such as 'sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS
- KERNEL-OS
-
- See the file 'config.sub' for the possible values of each field. If
-'config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option '--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with '--host=TYPE'.
+execution of ‘make’ will be. For these packages, running ‘./configure
+--enable-silent-rules’ sets the default to minimal output, which can be
+overridden with ‘make V=1’; while running ‘./configure
+--disable-silent-rules’ sets the default to verbose, which can be
+overridden with ‘make V=0’.
+
+Specifying a System Type
+========================
+
+ By default ‘configure’ builds for the current system. To create
+binaries that can run on a different system type, specify a
+‘--host=TYPE’ option along with compiler variables that specify how to
+generate object code for TYPE. For example, to create binaries intended
+to run on a 64-bit ARM processor:
+
+ ./configure --host=aarch64-linux-gnu \
+ CC=aarch64-linux-gnu-gcc \
+ CXX=aarch64-linux-gnu-g++
+
+If done on a machine that can execute these binaries (e.g., via
+‘qemu-aarch64’, ‘$QEMU_LD_PREFIX’, and Linux’s ‘binfmt_misc’
+capability), the build behaves like a native build. Otherwise it is a
+cross-build: ‘configure’ will make cross-compilation guesses instead of
+running test programs, and ‘make check’ will not work.
+
+ A system type can either be a short name like ‘mingw64’, or a
+canonical name like ‘x86_64-pc-linux-gnu’. Canonical names have the
+form CPU-COMPANY-SYSTEM where SYSTEM is either OS or KERNEL-OS. To
+canonicalize and validate a system type, you can run the command
+‘config.sub’, which is often squirreled away in a subdirectory like
+‘build-aux’. For example:
+
+ $ build-aux/config.sub arm64-linux
+ aarch64-unknown-linux-gnu
+ $ build-aux/config.sub riscv-lnx
+ Invalid configuration 'riscv-lnx': OS 'lnx' not recognized
+
+You can look at the ‘config.sub’ file to see which types are recognized.
+If the file is absent, this package does not need the system type.
+
+ If ‘configure’ fails with the diagnostic “cannot guess build type”.
+‘config.sub’ did not recognize your system’s type. In this case, first
+fetch the newest versions of these files from the GNU config package
+(https://savannah.gnu.org/projects/config). If that fixes things,
+please report it to the maintainers of the package containing
+‘configure’. Otherwise, you can try the configure option ‘--build=TYPE’
+where TYPE comes close to your system type; also, please report the
+problem to <config-patches@gnu.org>.
+
+ For more details about configuring system types, see the Autoconf
+documentation.
Sharing Defaults
================
- If you want to set default values for 'configure' scripts to share,
-you can create a site shell script called 'config.site' that gives
-default values for variables like 'CC', 'cache_file', and 'prefix'.
-'configure' looks for 'PREFIX/share/config.site' if it exists, then
-'PREFIX/etc/config.site' if it exists. Or, you can set the
-'CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all 'configure' scripts look for a site script.
+ If you want to set default values for ‘configure’ scripts to share,
+you can create a site shell script called ‘config.site’ that gives
+default values for variables like ‘CC’, ‘cache_file’, and ‘prefix’.
+‘configure’ looks for ‘PREFIX/share/config.site’ if it exists, then
+‘PREFIX/etc/config.site’ if it exists. Or, you can set the
+‘CONFIG_SITE’ environment variable to the location of the site script.
+A warning: not all ‘configure’ scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
-environment passed to 'configure'. However, some packages may run
+environment passed to ‘configure’. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
-them in the 'configure' command line, using 'VAR=value'. For example:
+them in the ‘configure’ command line, using ‘VAR=value’. For example:
./configure CC=/usr/local2/bin/gcc
-causes the specified 'gcc' to be used as the C compiler (unless it is
+causes the specified ‘gcc’ to be used as the C compiler (unless it is
overridden in the site shell script).
-Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Unfortunately, this technique does not work for ‘CONFIG_SHELL’ due to an
Autoconf limitation. Until the limitation is lifted, you can use this
workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-'configure' Invocation
+‘configure’ Invocation
======================
- 'configure' recognizes the following options to control how it
+ ‘configure’ recognizes the following options to control how it
operates.
-'--help'
-'-h'
- Print a summary of all of the options to 'configure', and exit.
+‘--help’
+‘-h’
+ Print a summary of all of the options to ‘configure’, and exit.
-'--help=short'
-'--help=recursive'
- Print a summary of the options unique to this package's
- 'configure', and exit. The 'short' variant lists options used only
- in the top level, while the 'recursive' variant lists options also
+‘--help=short’
+‘--help=recursive’
+ Print a summary of the options unique to this package’s
+ ‘configure’, and exit. The ‘short’ variant lists options used only
+ in the top level, while the ‘recursive’ variant lists options also
present in any nested packages.
-'--version'
-'-V'
- Print the version of Autoconf used to generate the 'configure'
+‘--version’
+‘-V’
+ Print the version of Autoconf used to generate the ‘configure’
script, and exit.
-'--cache-file=FILE'
+‘--cache-file=FILE’
Enable the cache: use and save the results of the tests in FILE,
- traditionally 'config.cache'. FILE defaults to '/dev/null' to
+ traditionally ‘config.cache’. FILE defaults to ‘/dev/null’ to
disable caching.
-'--config-cache'
-'-C'
- Alias for '--cache-file=config.cache'.
-
-'--quiet'
-'--silent'
-'-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to '/dev/null' (any error
- messages will still be shown).
+‘--config-cache’
+‘-C’
+ Alias for ‘--cache-file=config.cache’.
-'--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- 'configure' can determine that directory automatically.
+‘--srcdir=DIR’
+ Look for the package’s source code in directory DIR. Usually
+ ‘configure’ can determine that directory automatically.
-'--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names:: for
+‘--prefix=DIR’
+ Use DIR as the installation prefix. See “Installation Names” for
more details, including other options available for fine-tuning the
installation locations.
-'--no-create'
-'-n'
+‘--host=TYPE’
+ Build binaries for system TYPE. See “Specifying a System Type”.
+
+‘--enable-FEATURE’
+‘--disable-FEATURE’
+ Enable or disable the optional FEATURE. See “Optional Features”.
+
+‘--with-PACKAGE’
+‘--without-PACKAGE’
+ Use or omit PACKAGE when building. See “Optional Features”.
+
+‘--quiet’
+‘--silent’
+‘-q’
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to ‘/dev/null’ (any error
+ messages will still be shown).
+
+‘--no-create’
+‘-n’
Run the configure checks, but stop before creating any output
files.
-'configure' also accepts some other, not widely useful, options. Run
-'configure --help' for more details.
+‘configure’ also recognizes several environment variables, and accepts
+some other, less widely useful, options. Run ‘configure --help’ for
+more details.
+
+Copyright notice
+================
+
+ Copyright © 1994–1996, 1999–2002, 2004–2017, 2020–2024 Free Software
+Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
diff --git a/aclocal.m4 b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.17 -*- Autoconf -*-
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,8 +14,8 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
-[m4_warning([this file was generated for autoconf 2.71.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
+[m4_warning([this file was generated for autoconf 2.72.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@@ -364,7 +364,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
])dnl PKG_HAVE_DEFINE_WITH_MODULES
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -376,10 +376,10 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.16'
+[am__api_version='1.17'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.16.5], [],
+m4_if([$1], [1.17], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -395,14 +395,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.5])dnl
+[AM_AUTOMAKE_VERSION([1.17])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -454,7 +454,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -485,7 +485,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -617,7 +617,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -676,7 +676,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -744,7 +744,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Copyright (C) 1996-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -878,7 +878,7 @@ if test -z "$CSCOPE"; then
fi
AC_SUBST([CSCOPE])
-AC_REQUIRE([AM_SILENT_RULES])dnl
+AC_REQUIRE([_AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
@@ -886,47 +886,9 @@ AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes. So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
- cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present. This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
+AC_REQUIRE([_AM_PROG_RM_F])
+AC_REQUIRE([_AM_PROG_XARGS_N])
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
- AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
- fi
-fi
dnl The trailing newline in this macro's definition is deliberate, for
dnl backward compatibility and to allow trailing 'dnl'-style comments
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
@@ -959,7 +921,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -980,7 +942,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1001,7 +963,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1044,7 +1006,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1078,7 +1040,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1107,7 +1069,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1154,7 +1116,23 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_RM_F
+# ---------------
+# Check whether 'rm -f' without any arguments works.
+# https://bugs.gnu.org/10828
+AC_DEFUN([_AM_PROG_RM_F],
+[am__rm_f_notfound=
+AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
+AC_SUBST(am__rm_f_notfound)
+])
+
+# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1173,16 +1151,169 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Copyright (C) 1996-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# _AM_SLEEP_FRACTIONAL_SECONDS
+# ----------------------------
+AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
+AC_CACHE_CHECK([whether sleep supports fractional seconds],
+ am_cv_sleep_fractional_seconds, [dnl
+AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
+ [am_cv_sleep_fractional_seconds=no])
+])])
+
+# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
+# -----------------------------------
+# Determine the filesystem's resolution for file modification
+# timestamps. The coarsest we know of is FAT, with a resolution
+# of only two seconds, even with the most recent "exFAT" extensions.
+# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
+# nanosecond, matching clock_gettime. However, it is probably not
+# possible to delay execution of a shell script for less than one
+# millisecond, due to process creation overhead and scheduling
+# granularity, so we don't check for anything finer than that. (See below.)
+AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
+AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
+AC_CACHE_CHECK([filesystem timestamp resolution],
+ am_cv_filesystem_timestamp_resolution, [dnl
+# Default to the worst case.
+am_cv_filesystem_timestamp_resolution=2
+
+# Only try to go finer than 1 sec if sleep can do it.
+# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
+# - 1 sec is not much of a win compared to 2 sec, and
+# - it takes 2 seconds to perform the test whether 1 sec works.
+#
+# Instead, just use the default 2s on platforms that have 1s resolution,
+# accept the extra 1s delay when using $sleep in the Automake tests, in
+# exchange for not incurring the 2s delay for running the test for all
+# packages.
+#
+am_try_resolutions=
+if test "$am_cv_sleep_fractional_seconds" = yes; then
+ # Even a millisecond often causes a bunch of false positives,
+ # so just try a hundredth of a second. The time saved between .001 and
+ # .01 is not terribly consequential.
+ am_try_resolutions="0.01 0.1 $am_try_resolutions"
+fi
+
+# In order to catch current-generation FAT out, we must *modify* files
+# that already exist; the *creation* timestamp is finer. Use names
+# that make ls -t sort them differently when they have equal
+# timestamps than when they have distinct timestamps, keeping
+# in mind that ls -t prints the *newest* file first.
+rm -f conftest.ts?
+: > conftest.ts1
+: > conftest.ts2
+: > conftest.ts3
+
+# Make sure ls -t actually works. Do 'set' in a subshell so we don't
+# clobber the current shell's arguments. (Outer-level square brackets
+# are removed by m4; they're present so that m4 does not expand
+# <dollar><star>; be careful, easy to get confused.)
+if (
+ set X `[ls -t conftest.ts[12]]` &&
+ {
+ test "$[]*" != "X conftest.ts1 conftest.ts2" ||
+ test "$[]*" != "X conftest.ts2 conftest.ts1";
+ }
+); then :; else
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ _AS_ECHO_UNQUOTED(
+ ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
+ [AS_MESSAGE_LOG_FD])
+ AC_MSG_FAILURE([ls -t produces unexpected output.
+Make sure there is not a broken ls alias in your environment.])
+fi
+
+for am_try_res in $am_try_resolutions; do
+ # Any one fine-grained sleep might happen to cross the boundary
+ # between two values of a coarser actual resolution, but if we do
+ # two fine-grained sleeps in a row, at least one of them will fall
+ # entirely within a coarse interval.
+ echo alpha > conftest.ts1
+ sleep $am_try_res
+ echo beta > conftest.ts2
+ sleep $am_try_res
+ echo gamma > conftest.ts3
+
+ # We assume that 'ls -t' will make use of high-resolution
+ # timestamps if the operating system supports them at all.
+ if (set X `ls -t conftest.ts?` &&
+ test "$[]2" = conftest.ts3 &&
+ test "$[]3" = conftest.ts2 &&
+ test "$[]4" = conftest.ts1); then
+ #
+ # Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
+ # because we don't need to test make.
+ make_ok=true
+ if test $am_try_res != 1; then
+ # But if we've succeeded so far with a subsecond resolution, we
+ # have one more thing to check: make. It can happen that
+ # everything else supports the subsecond mtimes, but make doesn't;
+ # notably on macOS, which ships make 3.81 from 2006 (the last one
+ # released under GPLv2). https://bugs.gnu.org/68808
+ #
+ # We test $MAKE if it is defined in the environment, else "make".
+ # It might get overridden later, but our hope is that in practice
+ # it does not matter: it is the system "make" which is (by far)
+ # the most likely to be broken, whereas if the user overrides it,
+ # probably they did so with a better, or at least not worse, make.
+ # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
+ #
+ # Create a Makefile (real tab character here):
+ rm -f conftest.mk
+ echo 'conftest.ts1: conftest.ts2' >conftest.mk
+ echo ' touch conftest.ts2' >>conftest.mk
+ #
+ # Now, running
+ # touch conftest.ts1; touch conftest.ts2; make
+ # should touch ts1 because ts2 is newer. This could happen by luck,
+ # but most often, it will fail if make's support is insufficient. So
+ # test for several consecutive successes.
+ #
+ # (We reuse conftest.ts[12] because we still want to modify existing
+ # files, not create new ones, per above.)
+ n=0
+ make=${MAKE-make}
+ until test $n -eq 3; do
+ echo one > conftest.ts1
+ sleep $am_try_res
+ echo two > conftest.ts2 # ts2 should now be newer than ts1
+ if $make -f conftest.mk | grep 'up to date' >/dev/null; then
+ make_ok=false
+ break # out of $n loop
+ fi
+ n=`expr $n + 1`
+ done
+ fi
+ #
+ if $make_ok; then
+ # Everything we know to check worked out, so call this resolution good.
+ am_cv_filesystem_timestamp_resolution=$am_try_res
+ break # out of $am_try_res loop
+ fi
+ # Otherwise, we'll go on to check the next resolution.
+ fi
+done
+rm -f conftest.ts?
+# (end _am_filesystem_timestamp_resolution)
+])])
+
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
+[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
+# This check should not be cached, as it may vary across builds of
+# different projects.
+AC_MSG_CHECKING([whether build environment is sane])
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -1201,49 +1332,40 @@ esac
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
-if (
- am_has_slept=no
- for am_try in 1 2; do
- echo "timestamp, slept: $am_has_slept" > conftest.file
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
- alias in your environment])
- fi
- if test "$[2]" = conftest.file || test $am_try -eq 2; then
- break
- fi
- # Just in case.
- sleep 1
- am_has_slept=yes
- done
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
+am_build_env_is_sane=no
+am_has_slept=no
+rm -f conftest.file
+for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ test "$[]2" = conftest.file
+ ); then
+ am_build_env_is_sane=yes
+ break
+ fi
+ # Just in case.
+ sleep "$am_cv_filesystem_timestamp_resolution"
+ am_has_slept=yes
+done
+
+AC_MSG_RESULT([$am_build_env_is_sane])
+if test "$am_build_env_is_sane" = no; then
+ AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT([yes])
+
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
- ( sleep 1 ) &
+AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
+ ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
am_sleep_pid=$!
-fi
+])
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
@@ -1254,18 +1376,18 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# ("yes" being less verbose, "no" or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules], [dnl
+# _AM_SILENT_RULES
+# ----------------
+# Enable less verbose build rules support.
+AC_DEFUN([_AM_SILENT_RULES],
+[AM_DEFAULT_VERBOSITY=1
+AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],
[less verbose build output (undo: "make V=1")])
@@ -1273,11 +1395,6 @@ AS_HELP_STRING(
[--disable-silent-rules],
[verbose build output (undo: "make V=0")])dnl
])
-case $enable_silent_rules in @%:@ (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
dnl
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
@@ -1296,14 +1413,6 @@ am__doit:
else
am_cv_make_support_nested_variables=no
fi])
-if test $am_cv_make_support_nested_variables = yes; then
- dnl Using '$V' instead of '$(V)' breaks IRIX make.
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
AC_SUBST([AM_V])dnl
AM_SUBST_NOTMAKE([AM_V])dnl
AC_SUBST([AM_DEFAULT_V])dnl
@@ -1312,9 +1421,33 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
+dnl to AM_SILENT_RULES to change the default value.
+AC_CONFIG_COMMANDS_PRE([dnl
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+esac
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+])dnl
])
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
+# empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_REQUIRE([_AM_SILENT_RULES])
+AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
+
+# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1342,7 +1475,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1361,7 +1494,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1407,15 +1540,19 @@ m4_if([$1], [v7],
am_uid=`id -u || echo unknown`
am_gid=`id -g || echo unknown`
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
- if test $am_uid -le $am_max_uid; then
- AC_MSG_RESULT([yes])
+ if test x$am_uid = xunknown; then
+ AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
+ elif test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no])
- _am_tools=none
+ AC_MSG_RESULT([no])
+ _am_tools=none
fi
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
- if test $am_gid -le $am_max_gid; then
- AC_MSG_RESULT([yes])
+ if test x$gm_gid = xunknown; then
+ AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
+ elif test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
@@ -1492,6 +1629,26 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_XARGS_N
+# ----------------
+# Check whether 'xargs -n' works. It should work everywhere, so the fallback
+# is not optimized at all as we never expect to use it.
+AC_DEFUN([_AM_PROG_XARGS_N],
+[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
+AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
+3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
+AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
+ am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
+])dnl
+AC_SUBST(am__xargs_n)
+])
+
m4_include([m4/ax_compare_version.m4])
m4_include([m4/ax_have_epoll.m4])
m4_include([m4/ax_lib_postgresql.m4])
diff --git a/doc/doxygen/Makefile.in b/doc/doxygen/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.17 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -69,6 +69,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -282,8 +284,10 @@ ac_ct_OBJC = @ac_ct_OBJC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -438,8 +442,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -544,3 +548,10 @@ clean:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/src/donau/donau-httpd_batch-issue.c b/src/donau/donau-httpd_batch-issue.c
@@ -77,7 +77,7 @@ parse_json_bkp (struct DONAU_BlindedUniqueDonorIdentifierKeyPair *bkp,
* is malformed.
*/
static void
-signatures_to_JSON (const size_t num_sig,
+signatures_to_json (const size_t num_sig,
struct DONAU_BlindedDonationUnitSignature *signatures,
json_t *j_signatures)
{
@@ -108,6 +108,9 @@ DH_handler_issue_receipts_post (struct DH_RequestContext *rc,
size_t num_bkps;
struct DONAU_BlindedUniqueDonorIdentifierKeyPair *bkps;
struct DONAUDB_CharityMetaData charity_meta;
+ json_t *blind_signatures;
+ struct DONAU_DonationReceiptHashP h_receipts;
+ struct TALER_Amount receipts_sum;
if ( (NULL == args[0]) ||
(1 != sscanf (args[0],
@@ -168,7 +171,10 @@ DH_handler_issue_receipts_post (struct DH_RequestContext *rc,
{
json_t *bkp_obj;
size_t index;
- json_array_foreach (budikeypairs, index, bkp_obj)
+
+ json_array_foreach (budikeypairs,
+ index,
+ bkp_obj)
{
if (GNUNET_SYSERR ==
parse_json_bkp (&bkps[index],
@@ -226,64 +232,68 @@ DH_handler_issue_receipts_post (struct DH_RequestContext *rc,
NULL);
}
- /* request already made? -> idempotent */
- enum GNUNET_DB_QueryStatus qs_check_receipts;
- struct DONAUDB_IssuedReceiptsMetaData check_receipts_meta;
- struct DONAU_DonationReceiptHashP h_receipts = {0};
- json_t *blind_signatures = json_array ();
- GNUNET_assert (NULL != blind_signatures);
-
- struct GNUNET_HashContext *hc;
- hc = GNUNET_CRYPTO_hash_context_start ();
- for (size_t i = 0; i < num_bkps; i++)
{
+ /* request already made? -> idempotent */
+ enum GNUNET_DB_QueryStatus qs_check_receipts;
+ struct DONAUDB_IssuedReceiptsMetaData check_receipts_meta;
+ struct GNUNET_HashContext *hc;
+
+ blind_signatures = json_array ();
+ GNUNET_assert (NULL != blind_signatures);
+ hc = GNUNET_CRYPTO_hash_context_start ();
+ for (size_t i = 0; i < num_bkps; i++)
+ {
+ GNUNET_CRYPTO_hash_context_read (hc,
+ &bkps[i].h_donation_unit_pub,
+ sizeof (bkps[i].h_donation_unit_pub));
+ // FIXME: sizeof on blinded_message? seems VERY wrong!
+ GNUNET_CRYPTO_hash_context_read (
+ hc,
+ bkps[i].blinded_udi.blinded_message,
+ sizeof (bkps[i].blinded_udi.blinded_message));
+ }
GNUNET_CRYPTO_hash_context_read (hc,
- &bkps[i].h_donation_unit_pub,
- sizeof (bkps[i].h_donation_unit_pub));
+ &charity_sig,
+ sizeof (struct DONAU_CharitySignatureP));
GNUNET_CRYPTO_hash_context_read (hc,
- bkps[i].blinded_udi.blinded_message,
- sizeof (bkps[i].blinded_udi.blinded_message
- ));
- }
- GNUNET_CRYPTO_hash_context_read (hc,
- &charity_sig,
- sizeof (struct DONAU_CharitySignatureP));
- GNUNET_CRYPTO_hash_context_read (hc,
- &year,
- sizeof (uint64_t));
- GNUNET_CRYPTO_hash_context_finish (hc,
- &h_receipts.hash);
+ &year,
+ sizeof (uint64_t));
+ GNUNET_CRYPTO_hash_context_finish (hc,
+ &h_receipts.hash);
start:
- qs_check_receipts = DH_plugin->lookup_issued_receipts (DH_plugin->cls,
- &h_receipts,
- &check_receipts_meta);
- switch (qs_check_receipts)
- {
- case GNUNET_DB_STATUS_HARD_ERROR:
- case GNUNET_DB_STATUS_SOFT_ERROR:
- GNUNET_break (0);
- return TALER_MHD_reply_with_error (rc->connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_GENERIC_DB_FETCH_FAILED,
- NULL);
- case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "request has not been made yet (first time)!\n");
- break; // it's the first request from the charity, we can proceed
- case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "request has been made already!\n");
- signatures_to_JSON (num_bkps, check_receipts_meta.blinded_sig,
- blind_signatures);
- return TALER_MHD_REPLY_JSON_PACK (
- rc->connection,
- MHD_HTTP_OK,
- GNUNET_JSON_pack_array_steal ("blind_signatures",
- blind_signatures));
+ qs_check_receipts
+ = DH_plugin->lookup_issued_receipts (DH_plugin->cls,
+ &h_receipts,
+ &check_receipts_meta);
+ switch (qs_check_receipts)
+ {
+ case GNUNET_DB_STATUS_HARD_ERROR:
+ case GNUNET_DB_STATUS_SOFT_ERROR:
+ GNUNET_break (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_GENERIC_DB_FETCH_FAILED,
+ NULL);
+ case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "request has not been made yet (first time)!\n");
+ break; // it's the first request from the charity, we can proceed
+ case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "request has been made already!\n");
+ signatures_to_json (num_bkps,
+ check_receipts_meta.blinded_sig,
+ blind_signatures);
+ return TALER_MHD_REPLY_JSON_PACK (
+ rc->connection,
+ MHD_HTTP_OK,
+ GNUNET_JSON_pack_array_steal ("blind_signatures",
+ blind_signatures));
+ }
}
+
/* calculate the sum of all receipts */
- struct TALER_Amount receipts_sum;
GNUNET_assert (GNUNET_OK ==
TALER_amount_set_zero (DH_currency,
@@ -310,71 +320,73 @@ start:
}
/* sign budis and send the signatures back */
- struct DONAU_BlindedDonationUnitSignature du_sigs[num_bkps];
- struct DONAU_BkpSignData bkps_sign_data[num_bkps];
-
- for (size_t i = 0; i < num_bkps; i++)
- {
- bkps_sign_data[i].h_donation_unit_pub = &bkps[i].h_donation_unit_pub;
- bkps_sign_data[i].budi = &bkps[i].blinded_udi;
- }
- enum TALER_ErrorCode batch_sign_ec;
- batch_sign_ec = DH_keys_donation_unit_batch_sign (num_bkps,
- bkps_sign_data,
- du_sigs);
- if (TALER_EC_NONE != batch_sign_ec)
- {
- GNUNET_break_op (0);
- return TALER_MHD_reply_with_error (rc->connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- batch_sign_ec,
- NULL);
- }
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "made blind signatures!\n");
-
- /* save new receipts to date and save receipts Request (blinded signatures,
- * charity id, amount, hash over bkps) to make it idempotent*/
- enum GNUNET_DB_QueryStatus qs_insert_ir;
- bool smaller_than_max_per_year = false;
- qs_insert_ir = DH_plugin->insert_issued_receipt (
- DH_plugin->cls,
- num_bkps,
- du_sigs,
- (uint64_t) charity_id,
- &h_receipts,
- &receipts_sum,
- &smaller_than_max_per_year);
- switch (qs_insert_ir)
{
- case GNUNET_DB_STATUS_HARD_ERROR:
- case GNUNET_DB_STATUS_SOFT_ERROR:
- GNUNET_break (0);
- return TALER_MHD_reply_with_error (rc->connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_GENERIC_DB_FETCH_FAILED,
- NULL);
- case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
- GNUNET_assert (! second_time);
- second_time = true;
- goto start;
- case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
- if (! smaller_than_max_per_year)
+ struct DONAU_BlindedDonationUnitSignature du_sigs[num_bkps];
+ struct DONAU_BkpSignData bkps_sign_data[num_bkps];
+ enum TALER_ErrorCode batch_sign_ec;
+ enum GNUNET_DB_QueryStatus qs_insert_ir;
+ bool smaller_than_max_per_year = false;
+
+ for (size_t i = 0; i < num_bkps; i++)
+ {
+ bkps_sign_data[i].h_donation_unit_pub = &bkps[i].h_donation_unit_pub;
+ bkps_sign_data[i].budi = &bkps[i].blinded_udi;
+ }
+ batch_sign_ec = DH_keys_donation_unit_batch_sign (num_bkps,
+ bkps_sign_data,
+ du_sigs);
+ if (TALER_EC_NONE != batch_sign_ec)
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (rc->connection,
- MHD_HTTP_BAD_REQUEST,
- TALER_EC_DONAU_EXCEEDING_DONATION_LIMIT,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ batch_sign_ec,
NULL);
}
- break;
- }
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "issue receipts request is saved! (idempotent)\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "made blind signatures!\n");
+
+ /* save new receipts to date and save receipts Request (blinded signatures,
+ * charity id, amount, hash over bkps) to make it idempotent*/
+ qs_insert_ir = DH_plugin->insert_issued_receipt (
+ DH_plugin->cls,
+ num_bkps,
+ du_sigs,
+ (uint64_t) charity_id,
+ &h_receipts,
+ &receipts_sum,
+ &smaller_than_max_per_year);
+ switch (qs_insert_ir)
+ {
+ case GNUNET_DB_STATUS_HARD_ERROR:
+ case GNUNET_DB_STATUS_SOFT_ERROR:
+ GNUNET_break (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_GENERIC_DB_FETCH_FAILED,
+ NULL);
+ case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_assert (! second_time);
+ second_time = true;
+ goto start;
+ case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
+ if (! smaller_than_max_per_year)
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_DONAU_EXCEEDING_DONATION_LIMIT,
+ NULL);
+ }
+ break;
+ }
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "issue receipts request is saved! (idempotent)\n");
- signatures_to_JSON (num_bkps,
- du_sigs,
- blind_signatures);
+ signatures_to_json (num_bkps,
+ du_sigs,
+ blind_signatures);
+ }
return TALER_MHD_REPLY_JSON_PACK (
rc->connection,
MHD_HTTP_CREATED,
diff --git a/src/donau/donau-httpd_batch-submit.c b/src/donau/donau-httpd_batch-submit.c
@@ -94,6 +94,7 @@ DH_handler_submit_receipts_post (struct DH_RequestContext *rc,
&irc.donation_year),
GNUNET_JSON_spec_end ()
};
+ size_t num_dr;
(void) args;
{
@@ -112,7 +113,7 @@ DH_handler_submit_receipts_post (struct DH_RequestContext *rc,
}
/* parse the donation receipts */
- const size_t num_dr = json_array_size (donation_receipts);
+ num_dr = json_array_size (donation_receipts);
if (0 == num_dr)
{
@@ -129,7 +130,9 @@ DH_handler_submit_receipts_post (struct DH_RequestContext *rc,
irc.donation_receipts = GNUNET_new_array (num_dr,
struct DONAU_DonationReceipt);
- json_array_foreach (donation_receipts, index, dr_obj)
+ json_array_foreach (donation_receipts,
+ index,
+ dr_obj)
{
if (GNUNET_SYSERR ==
parse_json_dr (&irc.donation_receipts[index], dr_obj))
@@ -195,24 +198,24 @@ DH_handler_submit_receipts_post (struct DH_RequestContext *rc,
}
}
- enum GNUNET_DB_QueryStatus qs;
-
- qs = DH_plugin->insert_submitted_receipts (
- DH_plugin->cls,
- &irc.h_donor_tax_id,
- num_dr,
- irc.donation_receipts,
- irc.donation_year);
-
- if (qs < 0)
{
- GNUNET_break (0);
- return TALER_MHD_reply_with_error (rc->connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_GENERIC_DB_FETCH_FAILED,
- NULL);
- }
+ enum GNUNET_DB_QueryStatus qs;
+ qs = DH_plugin->insert_submitted_receipts (
+ DH_plugin->cls,
+ &irc.h_donor_tax_id,
+ num_dr,
+ irc.donation_receipts,
+ irc.donation_year);
+ if (qs < 0)
+ {
+ GNUNET_break (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_GENERIC_DB_FETCH_FAILED,
+ NULL);
+ }
+ }
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"submitted receipts inserted!\n");
diff --git a/src/donau/donau-httpd_keys.c b/src/donau/donau-httpd_keys.c
@@ -1259,19 +1259,20 @@ DH_keys_donau_sign_ (
return TALER_EC_DONAU_GENERIC_KEYS_MISSING;
}
- /* need to "cast" because TALER_CRYPTO works with TALER_Exchange.. */
- struct TALER_ExchangePublicKeyP donau_pub;
- struct TALER_ExchangeSignatureP donau_sig;
-
- ec = TALER_CRYPTO_helper_esign_sign_ (esh,
- purpose,
- &donau_pub,
- &donau_sig);
- if (TALER_EC_NONE != ec)
- return ec;
- pub->eddsa_pub = donau_pub.eddsa_pub;
- sig->eddsa_sig = donau_sig.eddsa_signature;
-
+ {
+ /* need to "cast" because TALER_CRYPTO works with TALER_Exchange.. */
+ struct TALER_ExchangePublicKeyP donau_pub;
+ struct TALER_ExchangeSignatureP donau_sig;
+
+ ec = TALER_CRYPTO_helper_esign_sign_ (esh,
+ purpose,
+ &donau_pub,
+ &donau_sig);
+ if (TALER_EC_NONE != ec)
+ return ec;
+ pub->eddsa_pub = donau_pub.eddsa_pub;
+ sig->eddsa_sig = donau_sig.eddsa_signature;
+ }
return ec;
}
diff --git a/src/donaudb/pg_lookup_donation_unit_amount.c b/src/donaudb/pg_lookup_donation_unit_amount.c
@@ -26,6 +26,7 @@
#include "pg_template.h"
#include "pg_helper.h"
#include "donau_pq_lib.h"
+#include "pg_lookup_donation_unit_amount.h"
enum GNUNET_DB_QueryStatus
diff --git a/src/lib/donau_api_charities_get.c b/src/lib/donau_api_charities_get.c
@@ -218,6 +218,7 @@ DONAU_charities_get (
{
struct DONAU_CharitiesGetHandle *cgh;
CURL *eh;
+ const char *arg_str = "charities";
TALER_LOG_DEBUG ("Connecting to the donau (%s)\n",
url);
@@ -225,7 +226,6 @@ DONAU_charities_get (
cgh->url = GNUNET_strdup (url);
cgh->cb = cb;
cgh->cb_cls = cb_cls;
- char *arg_str = "charities";
cgh->url = TALER_url_join (url,
arg_str,
NULL);
diff --git a/src/lib/donau_api_charity_delete.c b/src/lib/donau_api_charity_delete.c
@@ -152,6 +152,7 @@ DONAU_charity_delete (
{
struct DONAU_CharityDeleteHandle *cdh;
CURL *eh;
+ char arg_str[sizeof (id) * 2 + 32];
TALER_LOG_DEBUG ("Connecting to the donau (%s)\n",
url);
@@ -160,7 +161,6 @@ DONAU_charity_delete (
cdh->cb = cb;
cdh->charity_id = id;
cdh->cb_cls = cb_cls;
- char arg_str[sizeof (id) * 2 + 32];
GNUNET_snprintf (arg_str,
sizeof (arg_str),
"charities/%llu",
diff --git a/src/lib/donau_api_charity_get.c b/src/lib/donau_api_charity_get.c
@@ -78,12 +78,6 @@ handle_charity_get_ok (const json_t *resp_obj,
struct DONAU_Charity *charity = &gcresp->details.ok.charity;
const char *name;
const char *url;
- if (JSON_OBJECT != json_typeof (resp_obj))
- {
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
-
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("charity_pub",
&charity->charity_pub),
@@ -98,6 +92,7 @@ handle_charity_get_ok (const json_t *resp_obj,
&charity->current_year),
GNUNET_JSON_spec_end ()
};
+
if (GNUNET_OK !=
GNUNET_JSON_parse (resp_obj,
spec,
@@ -109,7 +104,6 @@ handle_charity_get_ok (const json_t *resp_obj,
}
charity->name = GNUNET_strdup (name);
charity->charity_url = GNUNET_strdup (url);
-
cgh->cb (cgh->cb_cls,
gcresp);
cgh->cb = NULL;
@@ -211,6 +205,7 @@ DONAU_charity_get (
{
struct DONAU_CharityGetHandle *cgh;
CURL *eh;
+ char arg_str[sizeof (id) * 2 + 32];
TALER_LOG_DEBUG ("Connecting to the donau (%s)\n",
url);
@@ -219,7 +214,6 @@ DONAU_charity_get (
cgh->cb = cb;
cgh->charity_id = id;
cgh->cb_cls = cb_cls;
- char arg_str[sizeof (id) * 2 + 32];
GNUNET_snprintf (arg_str,
sizeof (arg_str),
"charities/%llu",
diff --git a/src/lib/donau_api_handle.c b/src/lib/donau_api_handle.c
@@ -71,7 +71,7 @@
* how long do we assume the reply to be valid at least?
*/
#define MINIMUM_EXPIRATION GNUNET_TIME_relative_multiply ( \
- GNUNET_TIME_UNIT_MINUTES, 2)
+ GNUNET_TIME_UNIT_MINUTES, 2)
/**
@@ -121,9 +121,9 @@ struct DONAU_GetKeysHandle
#define EXITIF(cond) \
- do { \
- if (cond) { GNUNET_break (0); goto EXITIF_exit; } \
- } while (0)
+ do { \
+ if (cond) { GNUNET_break (0); goto EXITIF_exit; } \
+ } while (0)
/**
* Parse a donau's signing key encoded in JSON.
@@ -547,6 +547,8 @@ DONAU_compute_salted_tax_id_hash (const char *donor_tax_id,
const char *salt,
unsigned char out_hash[512 / 8])
{
+ crypto_hash_sha512_state st;
+
if ( (NULL == donor_tax_id) ||
(NULL == salt) ||
(NULL == out_hash) )
@@ -554,8 +556,7 @@ DONAU_compute_salted_tax_id_hash (const char *donor_tax_id,
GNUNET_break (0);
return false;
}
-
- crypto_hash_sha512_state st;
+ /* FIXME: use GNUnet wrapper */
crypto_hash_sha512_init (&st);
crypto_hash_sha512_update (&st,
(const unsigned char *) donor_tax_id,
@@ -563,7 +564,8 @@ DONAU_compute_salted_tax_id_hash (const char *donor_tax_id,
crypto_hash_sha512_update (&st,
(const unsigned char *) salt,
strlen (salt));
- crypto_hash_sha512_final (&st, out_hash);
+ crypto_hash_sha512_final (&st,
+ out_hash);
return true;
}
@@ -581,11 +583,14 @@ struct DUEntry
* Small helper function for sorting
*/
static int
-du_amount_desc_cmp (const void *a, const void *b)
+du_amount_desc_cmp (const void *a,
+ const void *b)
{
const struct DUEntry *ea = a;
const struct DUEntry *eb = b;
- int c = TALER_amount_cmp (&ea->value, &eb->value);
+
+ int c = TALER_amount_cmp (&ea->value,
+ &eb->value);
/* Descending */
return (c < 0) ? 1 : (c > 0 ? -1 : 0);
}