summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-11-17 17:25:58 +0100
committerWerner Koch <wk@gnupg.org>2017-11-17 17:25:58 +0100
commitb5c4a2721d7b4bd54705c53e6f294ab2ef66a6f7 (patch)
treec6cb5174ba5144b6ba289c8a0e8d72960a8c7455 /src/Makefile.am
parent0d8d46c76a32176be440b062d2501bbb044fb99d (diff)
downloadlibgpg-error-b5c4a2721d7b4bd54705c53e6f294ab2ef66a6f7.tar.gz
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 <wk@gnupg.org>
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3210a65..a95b732 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,7 +113,7 @@ CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
#
if HAVE_W32_SYSTEM
arch_sources = w32-gettext.c w32-lock.c w32-lock-obj.h w32-thread.c \
- w32-iconv.c w32-estream.c
+ w32-iconv.c w32-estream.c w32-reg.c
RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-DLOCALEDIR=\"$(localedir)\" $(AM_CPPFLAGS) $(CPPFLAGS)
LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
@@ -143,6 +143,7 @@ uninstall-def-file:
libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def
intllibs =
+socklibs = -lws2_32
#
# }}} End Windows part
@@ -161,6 +162,7 @@ install-def-file:
uninstall-def-file:
intllibs = @LTLIBINTL@
+socklibs =
endif
#
@@ -197,7 +199,7 @@ nodist_libgpg_error_la_SOURCES = gpg-error.h
# without the extra_cppflags because they may include am -idirafter
# which is not supported by the RC compiler.
libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags)
-libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(LIBTHREAD)
+libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) $(LIBTHREAD)
gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c
gpg_error_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \