aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-12-21 10:37:21 +0000
committerWerner Koch <[email protected]>2015-12-21 10:37:21 +0000
commit98f9e14323bf806f674b3cc259e19ef6219b4378 (patch)
tree620a0731491d8ebbb6f3c46aa12afed8aa99658b /common/util.h
parentbuild: Add required macro for pkg-config (diff)
downloadgnupg-98f9e14323bf806f674b3cc259e19ef6219b4378.tar.gz
gnupg-98f9e14323bf806f674b3cc259e19ef6219b4378.zip
common: New file fwddecl.h.
* common/util.h (server_control_s, ctrl_t): Move to ... * common/fwddecl.h: New file. * common/call-gpg.h: Replace typedef by fwddecl.h. Change include protection macro name. * common/Makefile.am (common_sources): Add fwddecl.h. -- It seems some compilers do not grok a re-declaration. Thus we factor it out into a separate file and use the include protection macro to protect against re-declaration. GnuPG-bug-id: 2200 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/common/util.h b/common/util.h
index e05cbff32..5d94e93c0 100644
--- a/common/util.h
+++ b/common/util.h
@@ -52,6 +52,7 @@
#include "../common/dotlock.h"
#include "../common/utf8conv.h"
#include "../common/dynload.h"
+#include "../common/fwddecl.h"
#include "gettime.h"
@@ -346,11 +347,4 @@ int _gnupg_isatty (int fd);
#define xtoi_2(p) ((xtoi_1(p) * 16) + xtoi_1((p)+1))
#define xtoi_4(p) ((xtoi_2(p) * 256) + xtoi_2((p)+2))
-
-/*-- Forward declaration of the commonly used server control structure. */
-/* (We need it here as it is used by some callback prototypes.) */
-struct server_control_s;
-typedef struct server_control_s *ctrl_t;
-
-
#endif /*GNUPG_COMMON_UTIL_H*/