aboutsummaryrefslogtreecommitdiffstats
path: root/src/visibility.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-11-17 16:25:58 +0000
committerWerner Koch <[email protected]>2017-11-17 16:25:58 +0000
commitb5c4a2721d7b4bd54705c53e6f294ab2ef66a6f7 (patch)
treec6cb5174ba5144b6ba289c8a0e8d72960a8c7455 /src/visibility.c
parentcore: New API functions gpgrt_strdup and gpgrt_strconcat. (diff)
downloadlibgpg-error-b5c4a2721d7b4bd54705c53e6f294ab2ef66a6f7.tar.gz
libgpg-error-b5c4a2721d7b4bd54705c53e6f294ab2ef66a6f7.zip
w32: Add new API fucntion gpgrt_w32_reg_query_string.
* src/w32-reg.c: New. * src/w32-add.h: Add gpgrt_w32_reg_query_string. * src/visibility.c (gpgrt_w32_reg_query_string): New wrapper. * src/gpg-error.def.in: Add gpgrt_w32_reg_query_string. * configure.ac (ac_check_funcs): Add stpcpy. * src/Makefile.am (arch_sources): Add w32-reg.c (socklibs): New. (libgpg_error_la_LIBADD): Add socklibs. * src/gpgrt-int.h (xfree, xtrymalloc, xtrycalloc) (xtryrealloc): New internal macros. (_gpgrt_stpcpy, stpcpy): New replacement fucntion and macro. * src/logging.c (_gpgrt_logv_internal): Use new registry query function and add standard registry key. -- This also fixes the build failure on Widnwos for logging.c. The code for gpgrt_w32_reg_query_string has been taken from the function read_w32_registry_string in w32-utils.c in the GPGME package. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/visibility.c')
-rw-r--r--src/visibility.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/visibility.c b/src/visibility.c
index 888492a..01ed2ce 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -975,3 +975,18 @@ _gpgrt_log_assert (const char *expr, const char *file,
_gpgrt__log_assert (expr, file, line);
#endif
}
+
+
+
+
+/* For consistency reasons we use function wrappers also for Windows
+ * specific function despite that they are technically not needed. */
+#ifdef HAVE_W32_SYSTEM
+
+char *
+gpgrt_w32_reg_query_string (const char *root, const char *dir, const char *name)
+{
+ return _gpgrt_w32_reg_query_string (root, dir, name);
+}
+
+#endif /*HAVE_W32_SYSTEM*/