Commit Graph

13 Commits

Author SHA1 Message Date
Werner Koch 96db487a4d
common,w32: Improve HKCU->HKLM fallback
* common/w32-reg.c (read_w32_registry_string): Add another fallback.
--

We use the same method in gpgme and libgpg-error since 2017 - should
be done here as well.  Thus the fallback also happens if the key
exists but not the actual entry.
2022-01-12 14:48:55 +01:00
Werner Koch 1af559a9a2
common,w32: Sync read_w32_registry_string with the gpgrt version
* common/w32-reg.c (get_root_key): Add short version of the root
classes.
--

The code here is only used by gpgconf's new --show-configs command.
Usually on Windows the code from gpgrt is used for reading the
registry.  This one here is an exception and when backporting it I
missed to add the HKCU etc al string.

Fixes-commit: 6c6c404883
GnuPG-bug-id: 5724
2021-12-13 19:25:48 +01:00
Werner Koch 6c6c404883
common,w32: New function read_w32_reg_string.
* common/w32-reg.c (read_w32_reg_string): New.

* common/t-w32-reg.c (test_read_registry): Add another test.
2021-11-18 21:45:02 +01:00
Werner Koch 55b6c2595a
Clarify text of LGPLv2+/GPLv2+ licensed files.
--
2017-02-24 13:48:28 +01:00
Werner Koch 4d7dc432b5
Change all http://www.gnu.org in license notices to https://
--
2016-11-05 12:02:19 +01:00
Werner Koch 172b619348
common: Remove JNLIB from boiler plate (jnlib merge).
* common/README.jnlib: Remove.
--

This is the final part of merging jnlib into gnupg/common.
2015-04-24 16:42:28 +02:00
Werner Koch 17bcd08708
common: Remove libjnlib-config.h (jnlib merge).
* common/libjnlib-config.h: Remove.
* common/common-defs.h (getenv) [HAVE_GETENV]: New.  From removed
header.
(getpid) [HAVE_W32CE_SYSTEM]: New.  From removed header.
* common/argparse.c: Include util.h and common-defs.h.  Replace
jnlib_ macro names for non-GNUPG builds by x* names.
* common/dotlock.c: Ditto.
* common/logging.c: Include util.h and common-defs.h.  Replace jnlib_
symbol names by x* names.
* common/strlist.c: Ditto.
* common/utf8conv.c: Ditto.
* common/w32-reg.c: Ditto.
* common/mischelp.c: Ditto.  Also remove _jnlib_free.
* common/stringhelp.c: Ditto.
(JNLIB_LOG_WITH_PREFIX): Do not depend on this macro.
* common/logging.h (JNLIB_LOG_WITH_PREFIX): Do not depend on this
macro.
--

This is part 1 of the patches to merge the jnlib files into common/.
It does not make much sense to keep jnlib/ files separate.  They are
not often use elsewhere and maintaining the complex marcos stuff is
too troublesome for the future.

Signed-off-by: Werner Koch <wk@gnupg.org>
2015-04-24 15:19:10 +02:00
Werner Koch cb0dcc3408 w32: Include winsock2.h to silence warnings. 2014-03-07 14:18:43 +01:00
Werner Koch 63b7658a29 w32: Remove unused code.
* jnlib/w32-reg.c (write_w32_registry_string): Remove.
2014-03-07 09:48:28 +01:00
Werner Koch f101f34fff common: Comment out unused code.
* common/w32-reg.c (write_w32_registry_string): Comment out.
2013-07-31 16:25:41 +02:00
Werner Koch cdd152bf49 Change JNLIB license to LGPLv3+ or GPLv2+.
This is to allow the use of this code with code under GPLv2(only).
2011-09-30 12:53:34 +02:00
Werner Koch b008274afd Nuked almost all trailing white space.
We better do this once and for all instead of cluttering all future
commits with diffs of trailing white spaces.  In the majority of cases
blank or single lines are affected and thus this change won't disturb
a git blame too much.  For future commits the pre-commit scripts
checks that this won't happen again.
2011-02-04 12:57:53 +01:00
Werner Koch d8b1099d01 Merged jnlib into common. 2010-03-10 12:24:58 +00:00