mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Use gpgrt's new option parser to provide a global conf file.
* common/util.h: Remove argparse.h. * common/argparse.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS. * configure.ac (GPGRT_ENABLE_ARGPARSE_MACROS): Define. * agent/gpg-agent.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS and include argparse.h. Do this also for all main modules which use our option parser except for gpg. Replace calls to strusage by calls to gpgrt_strusage everywhere. * g10/gpg.c (opts): Change type to gpgrt_opt_t. Flag oOptions and oNoOptions with ARGPARSE_conffile and ARGPARSE_no_conffile. (main): Change type of pargs to gpgrt_argparse_t. Rework the option parser to make use of the new gpgrt_argparser. -- This is not yet finished but a make check works. gpg has the most complex and oldest option handling and thus this is the first migration target. SE-Linux checks and version-ed config files are missing and will be added later. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
ccdf988b40
commit
0e8f6e2aa9
32 changed files with 268 additions and 166 deletions
|
@ -522,7 +522,7 @@ AH_BOTTOM([
|
|||
#define GNUPG_CACHE_DIR "cache.d"
|
||||
|
||||
#define GNUPG_DEF_COPYRIGHT_LINE \
|
||||
"Copyright (C) 2018 Free Software Foundation, Inc."
|
||||
"Copyright (C) 2020 Free Software Foundation, Inc."
|
||||
|
||||
/* For some systems (DOS currently), we hardcode the path here. For
|
||||
POSIX systems the values are constructed by the Makefiles, so that
|
||||
|
@ -580,6 +580,9 @@ AH_BOTTOM([
|
|||
/* Enable the log_ macros from gpgrt. */
|
||||
#define GPGRT_ENABLE_LOG_MACROS 1
|
||||
|
||||
/* We want the argparse macros from gpgrt. */
|
||||
#define GPGRT_ENABLE_ARGPARSE_MACROS 1
|
||||
|
||||
/* Tell libgcrypt not to use its own libgpg-error implementation. */
|
||||
#define USE_LIBGPG_ERROR 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue