summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-01-28 19:57:22 +0100
committerWerner Koch <wk@gnupg.org>2015-01-28 19:57:22 +0100
commit0c2bfd9d5a49a6134188f8f7820f6ccdebd9f181 (patch)
tree15c64db121e54ac1fa076be8ced08ee1ceffcf70 /common
parentgpg: Allow predefined names as answer to the keygen.algo prompt. (diff)
downloadgnupg2-0c2bfd9d5a49a6134188f8f7820f6ccdebd9f181.tar.xz
gnupg2-0c2bfd9d5a49a6134188f8f7820f6ccdebd9f181.zip
Add a hook to be called right after main.
* common/init.c (early_system_init): New stub function. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common')
-rw-r--r--common/init.c7
-rw-r--r--common/init.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/common/init.c b/common/init.c
index 2d5d6301c..c68a4e631 100644
--- a/common/init.c
+++ b/common/init.c
@@ -133,6 +133,13 @@ writestring_via_estream (int mode, const char *string)
}
+/* This function should be the first called after main. */
+void
+early_system_init (void)
+{
+}
+
+
/* This function is to be used early at program startup to make sure
that some subsystems are initialized. This is in particular
important for W32 to initialize the sockets so that our socket
diff --git a/common/init.h b/common/init.h
index eea2eb167..530a4797c 100644
--- a/common/init.h
+++ b/common/init.h
@@ -38,6 +38,7 @@
void register_mem_cleanup_func (void (*func)(void));
+void early_system_init (void);
void _init_common_subsystems (gpg_err_source_t errsource,
int *argcp, char ***argvp);
#define init_common_subsystems(a,b) \