* configure.ac: Do nor require libiconv for W32.
* common/utf8conv.c [W32]: Do not incluce iconv.h. Request
libgpg-error iconv macros.
(jnlib_iconv): Use ICONV_CONST macro.
* build-aux/speedo/w32/inst.nsi [!WITH_GUI]: Do not install libiconv.
* build-aux/speedo.mk (speedo_spkgs) [!WITH_GUI]: Likewise.
Signed-off-by: Werner Koch <wk@gnupg.org>
* common/utf8conv.c (wchar_to_utf8): Factor code out to ...
(wchar_to_cp): new.
(utf8_to_wchar): Factor code out to ...
(cp_to_wchar): new.
(wchar_to_native): New.
(native_to_wchar): New.
* tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar.
(scan_directory): Use wchar_to_native.
--
Gpgtar needs to handle filenames in the local 8 bit encoding on
Windows as it uses the 8 bit file io functions.
GnuPG-bug-id: 1624, 1746
Patch from bug 1624 modified to fit into GnuPG 2.1 by wk.
Signed-off-by: Werner Koch <wk@gnupg.org>
* 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>
* common/utf8conv.c: Remove dynload.h.
(load_libiconv): Remove. Remove all calls to it.
--
The iconv functions are standard feature on most systems and in any
case libiconv can be used to provide the functions. The old code used
to dlopen iconv.dll on Windows. This goes back to GnuPG-1 which was
designed as a one-binary program without any hard dependencies.
GnuPG2 however demands a lot of libraries anyway and thus there is no
more need for the fragile code to load a possible wrong version of
iconv.dll at runtime.
* common/utf8conv.c [HAVE_ANDROID_SYSTEM]: Do not include iconv.h.
(iconv_open, iconv_close, load_libiconv) [HAVE_ANDROID_SYSTEM]: New
dummy functions.
(set_native_charset) [HAVE_ANDROID_SYSTEM]: Force use of "utf-8".
(jnlib_iconv_open) [HAVE_ANDROID_SYSTEM]: Act the same as under W32.
(jnlib_iconv) [HAVE_ANDROID_SYSTEM]: Ditto.
(jnlib_iconv_close) [HAVE_ANDROID_SYSTEM]: Ditto.
--
Co-authored-by: Hans of Guardian <hans@guardianproject.info>
The asymmetric quotes used by GNU in the past (`...') don't render
nicely on modern systems. We now use two \x27 characters ('...').
The proper solution would be to use the correct Unicode symmetric
quotes here. However this has the disadvantage that the system
requires Unicode support. We don't want that today. If Unicode is
available a generated po file can be used to output proper quotes. A
simple sed script like the one used for en@quote is sufficient to
change them.
The changes have been done by applying
sed -i "s/\`\([^'\`]*\)'/'\1'/g"
to most files and fixing obvious problems by hand. The msgid strings in
the po files were fixed with a similar command.
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.