[Pkg-gnupg-commit] [gnupg2] 32/112: common: New file utilproto.c
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Tue Aug 30 17:48:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 3a2421c94015432caa49e166bc5bf5c4f80ab7c7
Author: Werner Koch <wk at gnupg.org>
Date: Wed Aug 3 15:27:03 2016 +0200
common: New file utilproto.c
* common/util.h: Factor prototypes from signal.c out to ...
* common/utilproto.h: new.
* common/Makefile.am (common_sources): Add new file.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
common/Makefile.am | 2 +-
common/fwddecl.h | 2 +-
common/util.h | 6 +-----
common/{fwddecl.h => utilproto.h} | 21 +++++++++++++--------
4 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/common/Makefile.am b/common/Makefile.am
index 759800b..2a24c57 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -42,7 +42,7 @@ include $(top_srcdir)/am/cmacros.am
common_sources = \
common-defs.h \
- util.h fwddecl.h i18n.c i18n.h \
+ util.h utilproto.h fwddecl.h i18n.c i18n.h \
types.h host2net.h dynload.h w32help.h \
mapstrings.c stringhelp.c stringhelp.h \
strlist.c strlist.h \
diff --git a/common/fwddecl.h b/common/fwddecl.h
index 92f0453..f9d7536 100644
--- a/common/fwddecl.h
+++ b/common/fwddecl.h
@@ -1,4 +1,4 @@
-/* fwddecl.h - Formward declarations
+/* fwddecl.h - Forward declarations
* Copyright (C) 2015 Werner Koch
*
* This file is part of GnuPG.
diff --git a/common/util.h b/common/util.h
index eb7a3fd..29e0ec9 100644
--- a/common/util.h
+++ b/common/util.h
@@ -54,6 +54,7 @@
#include "../common/utf8conv.h"
#include "../common/dynload.h"
#include "../common/fwddecl.h"
+#include "../common/utilproto.h"
#include "gettime.h"
@@ -114,11 +115,6 @@ out_of_core (void)
}
-/*-- signal.c --*/
-void gnupg_init_signals (int mode, void (*fast_cleanup)(void));
-void gnupg_block_all_signals (void);
-void gnupg_unblock_all_signals (void);
-
/*-- yesno.c --*/
int answer_is_yes (const char *s);
int answer_is_yes_no_default (const char *s, int def_answer);
diff --git a/common/fwddecl.h b/common/utilproto.h
similarity index 64%
copy from common/fwddecl.h
copy to common/utilproto.h
index 92f0453..5bb9dd1 100644
--- a/common/fwddecl.h
+++ b/common/utilproto.h
@@ -1,5 +1,5 @@
-/* fwddecl.h - Formward declarations
- * Copyright (C) 2015 Werner Koch
+/* utilproto.h - Some prototypes for inclusion by util.h
+ * Copyright (C) 2016 Werner Koch
*
* This file is part of GnuPG.
*
@@ -27,13 +27,18 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GNUPG_COMMON_FWDDECL_H
-#define GNUPG_COMMON_FWDDECL_H
+/* This file is in general included via util.h but sometimes we do not
+ * want all stuff from util.h and instead use this file with its
+ * simple prototypes. */
+#ifndef GNUPG_COMMON_UTILPROTO_H
+#define GNUPG_COMMON_UTILPROTO_H
-/*-- Forward declaration of the commonly used server control structure. */
-struct server_control_s;
-typedef struct server_control_s *ctrl_t;
+/*-- signal.c --*/
+void gnupg_init_signals (int mode, void (*fast_cleanup)(void));
+void gnupg_block_all_signals (void);
+void gnupg_unblock_all_signals (void);
-#endif /*GNUPG_COMMON_FWDDECL_H*/
+
+#endif /*GNUPG_COMMON_UTILPROTO_H*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list