summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-03-07 12:21:23 +0100
committerNIIBE Yutaka <gniibe@fsij.org>2017-03-07 12:25:54 +0100
commit70aca95d6816082b289fceca8eabfcf718a6b701 (patch)
tree1b9799ed41869344b5e577f7181f6116b2ca094e /g10
parenttests: Avoid overflowing signed 32 bit time_t. (diff)
downloadgnupg2-70aca95d6816082b289fceca8eabfcf718a6b701.tar.xz
gnupg2-70aca95d6816082b289fceca8eabfcf718a6b701.zip
Remove -I option to common.
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10')
-rw-r--r--g10/Makefile.am2
-rw-r--r--g10/armor.c9
-rw-r--r--g10/build-packet.c10
-rw-r--r--g10/call-agent.c14
-rw-r--r--g10/call-dirmngr.c12
-rw-r--r--g10/card-util.c8
-rw-r--r--g10/cipher.c8
-rw-r--r--g10/compress-bz2.c2
-rw-r--r--g10/compress.c2
-rw-r--r--g10/cpr.c8
-rw-r--r--g10/dearmor.c8
-rw-r--r--g10/decrypt-data.c6
-rw-r--r--g10/decrypt.c10
-rw-r--r--g10/delkey.c11
-rw-r--r--g10/ecdh.c2
-rw-r--r--g10/encrypt.c10
-rw-r--r--g10/exec.c10
-rw-r--r--g10/export.c18
-rw-r--r--g10/filter.h2
-rw-r--r--g10/free-packet.c2
-rw-r--r--g10/getkey.c12
-rw-r--r--g10/gpg.c16
-rw-r--r--g10/gpgsql.c4
-rw-r--r--g10/gpgv.c12
-rw-r--r--g10/helptext.c6
-rw-r--r--g10/import.c11
-rw-r--r--g10/kbnode.c2
-rw-r--r--g10/keydb.c4
-rw-r--r--g10/keydb.h4
-rw-r--r--g10/keyedit.c14
-rw-r--r--g10/keygen.c12
-rw-r--r--g10/keyid.c6
-rw-r--r--g10/keylist.c14
-rw-r--r--g10/keyring.c4
-rw-r--r--g10/keyserver-internal.h2
-rw-r--r--g10/keyserver.c14
-rw-r--r--g10/main.h6
-rw-r--r--g10/mainproc.c10
-rw-r--r--g10/mdfilter.c6
-rw-r--r--g10/migrate.c2
-rw-r--r--g10/misc.c8
-rw-r--r--g10/openfile.c8
-rw-r--r--g10/options.h2
-rw-r--r--g10/packet.h4
-rw-r--r--g10/parse-packet.c8
-rw-r--r--g10/passphrase.c8
-rw-r--r--g10/photoid.c10
-rw-r--r--g10/pkclist.c10
-rw-r--r--g10/pkglue.c2
-rw-r--r--g10/plaintext.c8
-rw-r--r--g10/progress.c6
-rw-r--r--g10/pubkey-enc.c8
-rw-r--r--g10/revoke.c9
-rw-r--r--g10/server.c6
-rw-r--r--g10/seskey.c4
-rw-r--r--g10/sig-check.c6
-rw-r--r--g10/sign.c16
-rw-r--r--g10/skclist.c6
-rw-r--r--g10/t-stutter.c2
-rw-r--r--g10/tdbdump.c8
-rw-r--r--g10/tdbio.c8
-rw-r--r--g10/tdbio.h2
-rw-r--r--g10/test-stubs.c12
-rw-r--r--g10/textfilter.c10
-rw-r--r--g10/tofu.c16
-rw-r--r--g10/trust.c6
-rw-r--r--g10/trustdb.c10
-rw-r--r--g10/verify.c11
68 files changed, 262 insertions, 267 deletions
diff --git a/g10/Makefile.am b/g10/Makefile.am
index 604be93d5..f1d2d1734 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -23,7 +23,7 @@ EXTRA_DIST = options.skel dirmngr-conf.skel distsigkey.gpg \
gpg.w32-manifest.in test.c t-keydb-keyring.kbx \
t-keydb-get-keyblock.gpg t-stutter-data.asc
-AM_CPPFLAGS = -I$(top_srcdir)/common
+AM_CPPFLAGS =
include $(top_srcdir)/am/cmacros.am
diff --git a/g10/armor.c b/g10/armor.c
index 6b7c3f7ab..7fb9a89ee 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -26,15 +26,14 @@
#include <ctype.h>
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
-#include "util.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
+#include "../common/util.h"
#include "filter.h"
#include "packet.h"
#include "options.h"
#include "main.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#define MAX_LINELEN 20000
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 489fadd85..c81c1ab2e 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -25,13 +25,13 @@
#include <ctype.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "status.h"
-#include "iobuf.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
+#include "../common/i18n.h"
#include "options.h"
-#include "host2net.h"
+#include "../common/host2net.h"
static int do_user_id( IOBUF out, int ctb, PKT_user_id *uid );
static int do_key (iobuf_t out, int ctb, PKT_public_key *pk);
diff --git a/g10/call-agent.c b/g10/call-agent.c
index 7c30bdbff..7d627bb36 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -31,16 +31,16 @@
#include "gpg.h"
#include <assuan.h>
-#include "util.h"
-#include "membuf.h"
+#include "../common/util.h"
+#include "../common/membuf.h"
#include "options.h"
-#include "i18n.h"
-#include "asshelp.h"
-#include "sysutils.h"
+#include "../common/i18n.h"
+#include "../common/asshelp.h"
+#include "../common/sysutils.h"
#include "call-agent.h"
-#include "status.h"
+#include "../common/status.h"
#include "../common/shareddefs.h"
-#include "host2net.h"
+#include "../common/host2net.h"
#define CONTROL_D ('D' - 'A' + 1)
diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c
index 2f2ba982e..a33cdc7d7 100644
--- a/g10/call-dirmngr.c
+++ b/g10/call-dirmngr.c
@@ -31,13 +31,13 @@
#include "gpg.h"
#include <assuan.h>
-#include "util.h"
-#include "membuf.h"
+#include "../common/util.h"
+#include "../common/membuf.h"
#include "options.h"
-#include "i18n.h"
-#include "asshelp.h"
-#include "keyserver.h"
-#include "status.h"
+#include "../common/i18n.h"
+#include "../common/asshelp.h"
+#include "../common/keyserver.h"
+#include "../common/status.h"
#include "call-dirmngr.h"
diff --git a/g10/card-util.c b/g10/card-util.c
index 969f6c919..9bc3e25b3 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -31,10 +31,10 @@
#if GNUPG_MAJOR_VERSION != 1
# include "gpg.h"
#endif /*GNUPG_MAJOR_VERSION != 1*/
-#include "util.h"
-#include "i18n.h"
-#include "ttyio.h"
-#include "status.h"
+#include "../common/util.h"
+#include "../common/i18n.h"
+#include "../common/ttyio.h"
+#include "../common/status.h"
#include "options.h"
#include "main.h"
#include "keyserver-internal.h"
diff --git a/g10/cipher.c b/g10/cipher.c
index 98f398e3d..655937f07 100644
--- a/g10/cipher.c
+++ b/g10/cipher.c
@@ -25,14 +25,14 @@
#include <errno.h>
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
-#include "util.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
+#include "../common/util.h"
#include "filter.h"
#include "packet.h"
#include "options.h"
#include "main.h"
-#include "status.h"
+#include "../common/status.h"
#define MIN_PARTIAL_SIZE 512
diff --git a/g10/compress-bz2.c b/g10/compress-bz2.c
index 22cefd99c..4adca9b37 100644
--- a/g10/compress-bz2.c
+++ b/g10/compress-bz2.c
@@ -23,7 +23,7 @@
#include <bzlib.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
#include "filter.h"
#include "main.h"
diff --git a/g10/compress.c b/g10/compress.c
index a14d107ed..61bb756f2 100644
--- a/g10/compress.c
+++ b/g10/compress.c
@@ -38,7 +38,7 @@
#endif
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
#include "filter.h"
#include "main.h"
diff --git a/g10/cpr.c b/g10/cpr.c
index 4984e8903..339107184 100644
--- a/g10/cpr.c
+++ b/g10/cpr.c
@@ -29,12 +29,12 @@
#endif
#include "gpg.h"
-#include "util.h"
-#include "status.h"
-#include "ttyio.h"
+#include "../common/util.h"
+#include "../common/status.h"
+#include "../common/ttyio.h"
#include "options.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#define CONTROL_D ('D' - 'A' + 1)
diff --git a/g10/dearmor.c b/g10/dearmor.c
index 6217ddab5..92239ccfd 100644
--- a/g10/dearmor.c
+++ b/g10/dearmor.c
@@ -24,14 +24,14 @@
#include <errno.h>
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
-#include "util.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
+#include "../common/util.h"
#include "filter.h"
#include "packet.h"
#include "options.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
/****************
* Take an armor file and write it out without armor
diff --git a/g10/decrypt-data.c b/g10/decrypt-data.c
index 585b1507f..11a253ff6 100644
--- a/g10/decrypt-data.c
+++ b/g10/decrypt-data.c
@@ -24,11 +24,11 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
#include "options.h"
-#include "i18n.h"
-#include "status.h"
+#include "../common/i18n.h"
+#include "../common/status.h"
static int mdc_decode_filter ( void *opaque, int control, IOBUF a,
diff --git a/g10/decrypt.c b/g10/decrypt.c
index c99f0640e..4d6734d40 100644
--- a/g10/decrypt.c
+++ b/g10/decrypt.c
@@ -27,13 +27,13 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
/* Assume that the input is an encrypted message and decrypt
* (and if signed, verify the signature on) it.
diff --git a/g10/delkey.c b/g10/delkey.c
index 06aca9e85..547b40dd2 100644
--- a/g10/delkey.c
+++ b/g10/delkey.c
@@ -29,16 +29,15 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "trustdb.h"
#include "filter.h"
-#include "ttyio.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/ttyio.h"
+#include "../common/i18n.h"
#include "call-agent.h"
diff --git a/g10/ecdh.c b/g10/ecdh.c
index 89e8cf1cb..6c2a56b84 100644
--- a/g10/ecdh.c
+++ b/g10/ecdh.c
@@ -24,7 +24,7 @@
#include <errno.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "pkglue.h"
#include "main.h"
#include "options.h"
diff --git a/g10/encrypt.c b/g10/encrypt.c
index 6130ba013..0a892c2e7 100644
--- a/g10/encrypt.c
+++ b/g10/encrypt.c
@@ -28,15 +28,15 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "filter.h"
#include "trustdb.h"
-#include "i18n.h"
-#include "status.h"
+#include "../common/i18n.h"
+#include "../common/status.h"
#include "pkglue.h"
diff --git a/g10/exec.c b/g10/exec.c
index b868a1ff1..74a83970e 100644
--- a/g10/exec.c
+++ b/g10/exec.c
@@ -45,11 +45,11 @@
#include "gpg.h"
#include "options.h"
-#include "i18n.h"
-#include "iobuf.h"
-#include "util.h"
-#include "membuf.h"
-#include "sysutils.h"
+#include "../common/i18n.h"
+#include "../common/iobuf.h"
+#include "../common/util.h"
+#include "../common/membuf.h"
+#include "../common/sysutils.h"
#include "exec.h"
#ifdef NO_EXEC
diff --git a/g10/export.c b/g10/export.c
index 323bf1742..2da5309bd 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -28,17 +28,17 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
+#include "../common/status.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
-#include "i18n.h"
-#include "membuf.h"
-#include "host2net.h"
-#include "zb32.h"
-#include "recsel.h"
-#include "mbox-util.h"
-#include "init.h"
+#include "../common/i18n.h"
+#include "../common/membuf.h"
+#include "../common/host2net.h"
+#include "../common/zb32.h"
+#include "../common/recsel.h"
+#include "../common/mbox-util.h"
+#include "../common/init.h"
#include "trustdb.h"
#include "call-agent.h"
diff --git a/g10/filter.h b/g10/filter.h
index 7accd7d4d..275608d4a 100644
--- a/g10/filter.h
+++ b/g10/filter.h
@@ -20,7 +20,7 @@
#ifndef G10_FILTER_H
#define G10_FILTER_H
-#include "types.h"
+#include "../common/types.h"
#include "dek.h"
typedef struct {
diff --git a/g10/free-packet.c b/g10/free-packet.c
index 6038d262e..01db2a028 100644
--- a/g10/free-packet.c
+++ b/g10/free-packet.c
@@ -24,7 +24,7 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
#include "../common/iobuf.h"
#include "options.h"
diff --git a/g10/getkey.c b/g10/getkey.c
index be7367faf..548f8bf37 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -26,19 +26,19 @@
#include <ctype.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "iobuf.h"
+#include "../common/iobuf.h"
#include "keydb.h"
#include "options.h"
#include "main.h"
#include "trustdb.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "keyserver-internal.h"
#include "call-agent.h"
-#include "host2net.h"
-#include "mbox-util.h"
-#include "status.h"
+#include "../common/host2net.h"
+#include "../common/mbox-util.h"
+#include "../common/status.h"
#define MAX_PK_CACHE_ENTRIES PK_UID_CACHE_SIZE
#define MAX_UID_CACHE_ENTRIES PK_UID_CACHE_SIZE
diff --git a/g10/gpg.c b/g10/gpg.c
index 654dcb99b..eeda60f83 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -41,22 +41,22 @@
#include "gpg.h"
#include <assuan.h>
#include "../common/iobuf.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "membuf.h"
+#include "../common/membuf.h"
#include "main.h"
#include "options.h"
#include "keydb.h"
#include "trustdb.h"
#include "filter.h"
-#include "ttyio.h"
-#include "i18n.h"
-#include "sysutils.h"
-#include "status.h"
+#include "../common/ttyio.h"
+#include "../common/i18n.h"
+#include "../common/sysutils.h"
+#include "../common/status.h"
#include "keyserver-internal.h"
#include "exec.h"
-#include "gc-opt-flags.h"
-#include "asshelp.h"
+#include "../common/gc-opt-flags.h"
+#include "../common/asshelp.h"
#include "call-dirmngr.h"
#include "tofu.h"
#include "../common/init.h"
diff --git a/g10/gpgsql.c b/g10/gpgsql.c
index 661bd3543..5b7556912 100644
--- a/g10/gpgsql.c
+++ b/g10/gpgsql.c
@@ -23,8 +23,8 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
-#include "logging.h"
+#include "../common/util.h"
+#include "../common/logging.h"
#include "gpgsql.h"
diff --git a/g10/gpgv.c b/g10/gpgv.c
index a6d1addd0..5ee26b46c 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -35,18 +35,18 @@
#define INCLUDED_BY_MAIN_MODULE 1
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "iobuf.h"
+#include "../common/iobuf.h"
#include "main.h"
#include "options.h"
#include "keydb.h"
#include "trustdb.h"
#include "filter.h"
-#include "ttyio.h"
-#include "i18n.h"
-#include "sysutils.h"
-#include "status.h"
+#include "../common/ttyio.h"
+#include "../common/i18n.h"
+#include "../common/sysutils.h"
+#include "../common/status.h"
#include "call-agent.h"
#include "../common/init.h"
diff --git a/g10/helptext.c b/g10/helptext.c
index 730f699e3..8b851019a 100644
--- a/g10/helptext.c
+++ b/g10/helptext.c
@@ -24,10 +24,10 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
-#include "ttyio.h"
+#include "../common/util.h"
+#include "../common/ttyio.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
diff --git a/g10/import.c b/g10/import.c
index 6383d7083..640618af6 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -27,15 +27,14 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
+#include "../common/status.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "trustdb.h"
#include "main.h"
-#include "i18n.h"
-#include "ttyio.h"
-#include "status.h"
-#include "recsel.h"
+#include "../common/i18n.h"
+#include "../common/ttyio.h"
+#include "../common/recsel.h"
#include "keyserver-internal.h"
#include "call-agent.h"
#include "../common/membuf.h"
diff --git a/g10/kbnode.c b/g10/kbnode.c
index 6700dc026..153dce2b6 100644
--- a/g10/kbnode.c
+++ b/g10/kbnode.c
@@ -24,7 +24,7 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "../common/init.h"
#include "packet.h"
#include "keydb.h"
diff --git a/g10/keydb.c b/g10/keydb.c
index 4c5149da2..27dacf2d5 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -28,14 +28,14 @@
#include <unistd.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "options.h"
#include "main.h" /*try_make_homedir ()*/
#include "packet.h"
#include "keyring.h"
#include "../kbx/keybox.h"
#include "keydb.h"
-#include "i18n.h"
+#include "../common/i18n.h"
static int active_handles;
diff --git a/g10/keydb.h b/g10/keydb.h
index c9f5b1c4a..6f57583fd 100644
--- a/g10/keydb.h
+++ b/g10/keydb.h
@@ -22,8 +22,8 @@
#ifndef G10_KEYDB_H
#define G10_KEYDB_H
-#include "types.h"
-#include "util.h"
+#include "../common/types.h"
+#include "../common/util.h"
#include "packet.h"
/* What qualifies as a certification (rather than a signature?) */
diff --git a/g10/keyedit.c b/g10/keyedit.c
index c591600a5..c10a011d1 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -33,20 +33,20 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
#include "photoid.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "trustdb.h"
#include "filter.h"
-#include "ttyio.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/ttyio.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
#include "keyserver-internal.h"
#include "call-agent.h"
-#include "host2net.h"
+#include "../common/host2net.h"
#include "tofu.h"
static void show_prefs (PKT_user_id * uid, PKT_signature * selfsig,
diff --git a/g10/keygen.c b/g10/keygen.c
index 201ebaa42..44f139a19 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -29,21 +29,21 @@
#include <unistd.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "packet.h"
-#include "ttyio.h"
+#include "../common/ttyio.h"
#include "options.h"
#include "keydb.h"
#include "trustdb.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
#include "keyserver-internal.h"
#include "call-agent.h"
#include "pkglue.h"
#include "../common/shareddefs.h"
-#include "host2net.h"
-#include "mbox-util.h"
+#include "../common/host2net.h"
+#include "../common/mbox-util.h"
/* The default algorithms. If you change them remember to change them
diff --git a/g10/keyid.c b/g10/keyid.c
index 6e8d97fa2..1d3f46cb4 100644
--- a/g10/keyid.c
+++ b/g10/keyid.c
@@ -28,14 +28,14 @@
#include <time.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "packet.h"
#include "options.h"
#include "keydb.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "rmd160.h"
-#include "host2net.h"
+#include "../common/host2net.h"
#define KEYID_STR_SIZE 19
diff --git a/g10/keylist.c b/g10/keylist.c
index 2684f59db..93b5ee6f6 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -31,18 +31,18 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
+#include "../common/status.h"
#include "keydb.h"
#include "photoid.h"
-#include "util.h"
-#include "ttyio.h"
+#include "../common/util.h"
+#include "../common/ttyio.h"
#include "trustdb.h"
#include "main.h"
-#include "i18n.h"
-#include "status.h"
+#include "../common/i18n.h"
+#include "../common/status.h"
#include "call-agent.h"
-#include "mbox-util.h"
-#include "zb32.h"
+#include "../common/mbox-util.h"
+#include "../common/zb32.h"
#include "tofu.h"
diff --git a/g10/keyring.c b/g10/keyring.c
index 9b7b5fd74..31f60f9fc 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -28,13 +28,13 @@
#include <sys/stat.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "keyring.h"
#include "packet.h"
#include "keydb.h"
#include "options.h"
#include "main.h" /*for check_key_signature()*/
-#include "i18n.h"
+#include "../common/i18n.h"
#include "../kbx/keybox.h"
diff --git a/g10/keyserver-internal.h b/g10/keyserver-internal.h
index 77b362eef..02452e88a 100644
--- a/g10/keyserver-internal.h
+++ b/g10/keyserver-internal.h
@@ -23,7 +23,7 @@
#include <time.h>
#include "../common/keyserver.h"
#include "../common/iobuf.h"
-#include "types.h"
+#include "../common/types.h"
int parse_keyserver_options(char *options);
void free_keyserver_spec(struct keyserver_spec *keyserver);
diff --git a/g10/keyserver.c b/g10/keyserver.c
index c7363c98f..0794527fd 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -27,21 +27,21 @@
#include <errno.h>
#include "gpg.h"
-#include "iobuf.h"
+#include "../common/iobuf.h"
#include "filter.h"
#include "keydb.h"
-#include "status.h"
+#include "../common/status.h"
#include "exec.h"
#include "main.h"
-#include "i18n.h"
-#include "ttyio.h"
+#include "../common/i18n.h"
+#include "../common/ttyio.h"
#include "options.h"
#include "packet.h"
#include "trustdb.h"
#include "keyserver-internal.h"
-#include "util.h"
-#include "membuf.h"
-#include "mbox-util.h"
+#include "../common/util.h"
+#include "../common/membuf.h"
+#include "../common/mbox-util.h"
#include "call-dirmngr.h"
#ifdef HAVE_W32_SYSTEM
diff --git a/g10/main.h b/g10/main.h
index 6837e989e..f58f04162 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -20,10 +20,10 @@
#ifndef G10_MAIN_H
#define G10_MAIN_H
-#include "types.h"
-#include "iobuf.h"
+#include "../common/types.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
/* It could be argued that the default cipher should be 3DES rather
than AES128, and the default compression should be 0
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 4f8d0be3f..2acd51e83 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -25,19 +25,19 @@
#include <time.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "iobuf.h"
+#include "../common/iobuf.h"
#include "options.h"
#include "keydb.h"
#include "filter.h"
#include "main.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
#include "trustdb.h"
#include "keyserver-internal.h"
#include "photoid.h"
-#include "mbox-util.h"
+#include "../common/mbox-util.h"
#include "call-dirmngr.h"
/* Put an upper limit on nested packets. The 32 is an arbitrary
diff --git a/g10/mdfilter.c b/g10/mdfilter.c
index 69b226c3b..f3318f15c 100644
--- a/g10/mdfilter.c
+++ b/g10/mdfilter.c
@@ -24,9 +24,9 @@
#include <errno.h>
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
-#include "util.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
+#include "../common/util.h"
#include "filter.h"
diff --git a/g10/migrate.c b/g10/migrate.c
index 6ff1014e6..c52c67a77 100644
--- a/g10/migrate.c
+++ b/g10/migrate.c
@@ -27,7 +27,7 @@
#include "gpg.h"
#include "options.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "call-agent.h"
diff --git a/g10/misc.c b/g10/misc.c
index ac0000943..c69f9948b 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -59,15 +59,15 @@
#include "gpg.h"
#ifdef HAVE_W32_SYSTEM
-# include "status.h"
+# include "../common/status.h"
#endif /*HAVE_W32_SYSTEM*/
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "photoid.h"
#include "options.h"
#include "call-agent.h"
-#include "i18n.h"
-#include "zb32.h"
+#include "../common/i18n.h"
+#include "../common/zb32.h"
#ifdef ENABLE_SELINUX_HACKS
diff --git a/g10/openfile.c b/g10/openfile.c
index f62deec54..2257107ad 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -29,12 +29,12 @@
#include <unistd.h>
#include "gpg.h"
-#include "util.h"
-#include "ttyio.h"
+#include "../common/util.h"
+#include "../common/ttyio.h"
#include "options.h"
#include "main.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
#ifdef USE_ONLY_8DOT3
#define SKELEXT ".skl"
diff --git a/g10/options.h b/g10/options.h
index 88a8f32bd..def638591 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -22,7 +22,7 @@
#define G10_OPTIONS_H
#include <sys/types.h>
-#include <types.h>
+#include "../common/types.h"
#include <stdint.h>
#include "main.h"
#include "packet.h"
diff --git a/g10/packet.h b/g10/packet.h
index 9780d939e..3457f5398 100644
--- a/g10/packet.h
+++ b/g10/packet.h
@@ -22,14 +22,14 @@
#ifndef G10_PACKET_H
#define G10_PACKET_H
-#include "types.h"
+#include "../common/types.h"
#include "../common/iobuf.h"
#include "../common/strlist.h"
#include "dek.h"
#include "filter.h"
#include "../common/openpgpdefs.h"
#include "../common/userids.h"
-#include "util.h"
+#include "../common/util.h"
#define DEBUG_PARSE_PACKET 1
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 7f44ce532..06b286bd7 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -26,15 +26,15 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "iobuf.h"
+#include "../common/iobuf.h"
#include "filter.h"
#include "photoid.h"
#include "options.h"
#include "main.h"
-#include "i18n.h"
-#include "host2net.h"
+#include "../common/i18n.h"
+#include "../common/host2net.h"
/* Maximum length of packets to avoid excessive memory allocation. */
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 37abc0f1c..02371fe9f 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -33,13 +33,13 @@
#endif
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "options.h"
-#include "ttyio.h"
+#include "../common/ttyio.h"
#include "keydb.h"
#include "main.h"
-#include "i18n.h"
-#include "status.h"
+#include "../common/i18n.h"
+#include "../common/status.h"
#include "call-agent.h"
#include "../common/shareddefs.h"
diff --git a/g10/photoid.c b/g10/photoid.c
index 8b193b3d4..bcea64fbf 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -32,17 +32,17 @@
#endif
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "status.h"
+#include "../common/status.h"
#include "exec.h"
#include "keydb.h"
-#include "i18n.h"
-#include "iobuf.h"
+#include "../common/i18n.h"
+#include "../common/iobuf.h"
#include "options.h"
#include "main.h"
#include "photoid.h"
-#include "ttyio.h"
+#include "../common/ttyio.h"
#include "trustdb.h"
/* Generate a new photo id packet, or return NULL if canceled.
diff --git a/g10/pkclist.c b/g10/pkclist.c
index 012f751cf..698794ebf 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -27,15 +27,15 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
+#include "../common/status.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "trustdb.h"
-#include "ttyio.h"
-#include "status.h"
+#include "../common/ttyio.h"
+#include "../common/status.h"
#include "photoid.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "tofu.h"
#define CONTROL_D ('D' - 'A' + 1)
diff --git a/g10/pkglue.c b/g10/pkglue.c
index ce24a2ed5..8021a94db 100644
--- a/g10/pkglue.c
+++ b/g10/pkglue.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "pkglue.h"
#include "main.h"
#include "options.h"
diff --git a/g10/plaintext.c b/g10/plaintext.c
index 40ce6030a..c5d1ddb7f 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -29,14 +29,14 @@
#endif
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "options.h"
#include "packet.h"
-#include "ttyio.h"
+#include "../common/ttyio.h"
#include "filter.h"
#include "main.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
/* Get the output filename. On success, the actual filename that is
diff --git a/g10/progress.c b/g10/progress.c
index feb639e5f..7e777d4ab 100644
--- a/g10/progress.c
+++ b/g10/progress.c
@@ -21,10 +21,10 @@
#include <stdio.h>
#include "gpg.h"
-#include "iobuf.h"
+#include "../common/iobuf.h"
#include "filter.h"
-#include "status.h"
-#include "util.h"
+#include "../common/status.h"
+#include "../common/util.h"
#include "options.h"
/* Create a new context for use with the progress filter. We need to
diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c
index e037c120d..cc962cfde 100644
--- a/g10/pubkey-enc.c
+++ b/g10/pubkey-enc.c
@@ -24,17 +24,17 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
#include "keydb.h"
#include "trustdb.h"
-#include "status.h"
+#include "../common/status.h"
#include "options.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "pkglue.h"
#include "call-agent.h"
-#include "host2net.h"
+#include "../common/host2net.h"
static gpg_error_t get_it (PKT_pubkey_enc *k,
diff --git a/g10/revoke.c b/g10/revoke.c
index 3a2b068fc..122699f8c 100644
--- a/g10/revoke.c
+++ b/g10/revoke.c
@@ -28,13 +28,12 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
+#include "../common/status.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
-#include "ttyio.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/ttyio.h"
+#include "../common/i18n.h"
#include "call-agent.h"
struct revocation_reason_info {
diff --git a/g10/server.c b/g10/server.c
index e3a3bad22..60b447c41 100644
--- a/g10/server.c
+++ b/g10/server.c
@@ -29,12 +29,12 @@
#include "gpg.h"
#include <assuan.h>
-#include "util.h"
-#include "i18n.h"
+#include "../common/util.h"
+#include "../common/i18n.h"
#include "options.h"
#include "../common/server-help.h"
#include "../common/sysutils.h"
-#include "status.h"
+#include "../common/status.h"
#define set_error(e,t) assuan_set_error (ctx, gpg_error (e), (t))
diff --git a/g10/seskey.c b/g10/seskey.c
index b2f716960..861793858 100644
--- a/g10/seskey.c
+++ b/g10/seskey.c
@@ -24,10 +24,10 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "options.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
/* Generate a new session key in *DEK that is appropriate for the
diff --git a/g10/sig-check.c b/g10/sig-check.c
index 4df29af7f..4e6ca4309 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -25,12 +25,12 @@
#include <string.h>
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
#include "keydb.h"
#include "main.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
#include "options.h"
#include "pkglue.h"
diff --git a/g10/sign.c b/g10/sign.c
index ff099b31c..801c809ad 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -27,20 +27,20 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
#include "filter.h"
-#include "ttyio.h"
+#include "../common/ttyio.h"
#include "trustdb.h"
-#include "status.h"
-#include "i18n.h"
+#include "../common/status.h"
+#include "../common/i18n.h"
#include "pkglue.h"
-#include "sysutils.h"
+#include "../common/sysutils.h"
#include "call-agent.h"
-#include "mbox-util.h"
+#include "../common/mbox-util.h"
#ifdef HAVE_DOSISH_SYSTEM
#define LF "\r\n"
diff --git a/g10/skclist.c b/g10/skclist.c
index cedbce79f..7a791b302 100644
--- a/g10/skclist.c
+++ b/g10/skclist.c
@@ -27,10 +27,10 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
+#include "../common/status.h"
#include "keydb.h"
-#include "util.h"
-#include "i18n.h"
+#include "../common/util.h"
+#include "../common/i18n.h"
/* Return true if Libgcrypt's RNG is in faked mode. */
diff --git a/g10/t-stutter.c b/g10/t-stutter.c
index 359cdf622..f4a9a5988 100644
--- a/g10/t-stutter.c
+++ b/g10/t-stutter.c
@@ -54,7 +54,7 @@
#include "gpg.h"
#include "main.h"
#include "../common/types.h"
-#include "util.h"
+#include "../common/util.h"
#include "dek.h"
#include "../common/logging.h"
diff --git a/g10/tdbdump.c b/g10/tdbdump.c
index ab2f0724d..a5ad32d6c 100644
--- a/g10/tdbdump.c
+++ b/g10/tdbdump.c
@@ -29,15 +29,15 @@
#include <unistd.h>
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "trustdb.h"
#include "options.h"
#include "packet.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "tdbio.h"
diff --git a/g10/tdbio.c b/g10/tdbio.c
index c1cb31211..a7b7412a3 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -29,12 +29,12 @@
#include <unistd.h>
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
-#include "util.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
+#include "../common/util.h"
#include "options.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "trustdb.h"
#include "tdbio.h"
diff --git a/g10/tdbio.h b/g10/tdbio.h
index 1f66b034e..e2cbbff2c 100644
--- a/g10/tdbio.h
+++ b/g10/tdbio.h
@@ -20,7 +20,7 @@
#ifndef G10_TDBIO_H
#define G10_TDBIO_H
-#include "host2net.h"
+#include "../common/host2net.h"
#define TRUST_RECORD_LEN 40
#define SIGS_PER_RECORD ((TRUST_RECORD_LEN-10)/5)
diff --git a/g10/test-stubs.c b/g10/test-stubs.c
index a74df209c..d541e0d86 100644
--- a/g10/test-stubs.c
+++ b/g10/test-stubs.c
@@ -28,18 +28,18 @@
#define INCLUDED_BY_MAIN_MODULE 1
#include "gpg.h"
-#include "util.h"
+#include "../common/util.h"
#include "packet.h"
-#include "iobuf.h"
+#include "../common/iobuf.h"
#include "main.h"
#include "options.h"
#include "keydb.h"
#include "trustdb.h"
#include "filter.h"
-#include "ttyio.h"
-#include "i18n.h"
-#include "sysutils.h"
-#include "status.h"
+#include "../common/ttyio.h"
+#include "../common/i18n.h"
+#include "../common/sysutils.h"
+#include "../common/status.h"
#include "call-agent.h"
int g10_errors_seen;
diff --git a/g10/textfilter.c b/g10/textfilter.c
index cb5d444ba..96666cf17 100644
--- a/g10/textfilter.c
+++ b/g10/textfilter.c
@@ -24,13 +24,13 @@
#include <errno.h>
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
-#include "util.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
+#include "../common/util.h"
#include "filter.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "options.h"
-#include "status.h"
+#include "../common/status.h"
#ifdef HAVE_DOSISH_SYSTEM
#define LF "\r\n"
diff --git a/g10/tofu.c b/g10/tofu.c
index 8c41ad701..9d6a45762 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -31,17 +31,17 @@
#include <time.h>
#include "gpg.h"
-#include "types.h"
-#include "logging.h"
-#include "stringhelp.h"
+#include "../common/types.h"
+#include "../common/logging.h"
+#include "../common/stringhelp.h"
#include "options.h"
-#include "mbox-util.h"
-#include "i18n.h"
-#include "ttyio.h"
+#include "../common/mbox-util.h"
+#include "../common/i18n.h"
+#include "../common/ttyio.h"
#include "trustdb.h"
-#include "mkdir_p.h"
+#include "../common/mkdir_p.h"
#include "gpgsql.h"
-#include "status.h"
+#include "../common/status.h"
#include "sqrtu32.h"
#include "tofu.h"
diff --git a/g10/trust.c b/g10/trust.c
index d0ea77efd..77fde4cf6 100644
--- a/g10/trust.c
+++ b/g10/trust.c
@@ -26,13 +26,13 @@
#include "gpg.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "options.h"
#include "packet.h"
#include "main.h"
-#include "i18n.h"
+#include "../common/i18n.h"
#include "trustdb.h"
-#include "host2net.h"
+#include "../common/host2net.h"
/* Return true if key is disabled. Note that this is usually used via
diff --git a/g10/trustdb.c b/g10/trustdb.c
index 74430510d..a0b9d5f48 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -29,15 +29,15 @@
#endif /* !DISABLE_REGEX */
#include "gpg.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "options.h"
#include "packet.h"
#include "main.h"
-#include "mbox-util.h"
-#include "i18n.h"
+#include "../common/mbox-util.h"
+#include "../common/i18n.h"
#include "tdbio.h"
#include "trustdb.h"
#include "tofu.h"
diff --git a/g10/verify.c b/g10/verify.c
index 7327e855b..4399f7111 100644
--- a/g10/verify.c
+++ b/g10/verify.c
@@ -27,15 +27,14 @@
#include "gpg.h"
#include "options.h"
#include "packet.h"
-#include "status.h"
-#include "iobuf.h"
+#include "../common/status.h"
+#include "../common/iobuf.h"
#include "keydb.h"
-#include "util.h"
+#include "../common/util.h"
#include "main.h"
-#include "status.h"
#include "filter.h"
-#include "ttyio.h"
-#include "i18n.h"
+#include "../common/ttyio.h"
+#include "../common/i18n.h"
/****************