diff options
author | Werner Koch <wk@gnupg.org> | 2020-02-10 16:37:34 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-02-10 16:50:47 +0100 |
commit | 6aff8a132815a84bab69401c1e7de96ec549fbf2 (patch) | |
tree | 00e313097a522fc1956bed6f45a5361422b561ae /dirmngr | |
parent | gpg: Make really sure that --verify-files always returns an error. (diff) | |
download | gnupg2-6aff8a132815a84bab69401c1e7de96ec549fbf2.tar.xz gnupg2-6aff8a132815a84bab69401c1e7de96ec549fbf2.zip |
build: Always use EXTERN_UNLESS_MAIN_MODULE pattern.
* common/util.h (EXTERN_UNLESS_MAIN_MODULE): Add the definion only
here but now without the Norcroft-C. Change all other places where it
gets defined.
* common/iobuf.h (iobuf_debug_mode): Declare unconditionally as
extern.
* common/iobuf.c (iobuf_debug_mode): Define it here.
* agent/gpg-agent.c (INCLUDED_BY_MAIN_MODULE): Define here and also in
all main modules of all other programs.
* g10/main.h: Put util.h before the local header files.
--
This change is required for use with gcc/ld's LTO feature which does
not allow common blocks. Further gcc 10 will make -fno-common the
default and thus this chnage is always needed. What a pitty.
Co-authored-by: Tomáš Mráz
GnuPG-bug-id: 4831
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 21d9bd8b87a9f793a106095e3838eb71825189d7)
- Applied respective chnages also to gpg-card and keyboxd.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'dirmngr')
-rw-r--r-- | dirmngr/dirmngr.c | 1 | ||||
-rw-r--r-- | dirmngr/dirmngr.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 8f28fa43d..88f0aa430 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -55,6 +55,7 @@ #endif /*HTTP_USE_GNUTLS*/ +#define INCLUDED_BY_MAIN_MODULE 1 #define GNUPG_COMMON_NEED_AFLOCAL #include "dirmngr.h" diff --git a/dirmngr/dirmngr.h b/dirmngr/dirmngr.h index b27b8e6fb..92d9d4b6a 100644 --- a/dirmngr/dirmngr.h +++ b/dirmngr/dirmngr.h @@ -77,6 +77,7 @@ struct fingerprint_list_s /* A large struct named "opt" to keep global flags. */ +EXTERN_UNLESS_MAIN_MODULE struct { unsigned int debug; /* debug flags (DBG_foo_VALUE) */ |