Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libgpg-error for openSUSE:Factory checked in at 2022-04-23 19:44:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgpg-error (Old) and /work/SRC/openSUSE:Factory/.libgpg-error.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgpg-error" Sat Apr 23 19:44:47 2022 rev:69 rq:970591 version:1.45 Changes: -------- --- /work/SRC/openSUSE:Factory/libgpg-error/libgpg-error.changes 2022-02-13 00:15:21.380109523 +0100 +++ /work/SRC/openSUSE:Factory/.libgpg-error.new.1538/libgpg-error.changes 2022-04-23 19:44:48.510900733 +0200 @@ -1,0 +2,7 @@ +Thu Apr 7 12:59:59 UTC 2022 - Andreas Stieger <[email protected]> + +- update to 1.45: + * gpgrt_access and gpgrt_mkdir now support file names longer than + MAX_PATH + +------------------------------------------------------------------- Old: ---- libgpg-error-1.44.tar.bz2 libgpg-error-1.44.tar.bz2.sig New: ---- libgpg-error-1.45.tar.bz2 libgpg-error-1.45.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgpg-error.spec ++++++ --- /var/tmp/diff_new_pack.KrVicY/_old 2022-04-23 19:44:49.114901452 +0200 +++ /var/tmp/diff_new_pack.KrVicY/_new 2022-04-23 19:44:49.122901461 +0200 @@ -17,7 +17,7 @@ Name: libgpg-error -Version: 1.44 +Version: 1.45 Release: 0 Summary: Library That Defines Common Error Values for All GnuPG Components License: GPL-2.0-or-later AND LGPL-2.1-or-later ++++++ libgpg-error-1.44.tar.bz2 -> libgpg-error-1.45.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/ChangeLog new/libgpg-error-1.45/ChangeLog --- old/libgpg-error-1.44/ChangeLog 2022-01-27 09:54:07.000000000 +0100 +++ new/libgpg-error-1.45/ChangeLog 2022-04-07 10:34:50.000000000 +0200 @@ -1,3 +1,49 @@ +2022-04-07 Werner Koch <[email protected]> + + Release 1.45. + + commit dbac537e5e865fb6f3aa8596d213aa8c47a9dea1 + + +2022-03-04 Werner Koch <[email protected]> + + w32: Support file names longer than MAX_PATH. + + commit 32dad4e4135f0bdc436ed684da753d4b0cdb0ea1 + * src/sysutils.c (any8bitchar): Remove. + (_gpgrt_fname_to_wchar): New. + (_gpgrt_mkdir): Use instead of plain utf8 conversion. + (_gpgrt_access): Reimplement using GetFileAttributesW so that long + files names are supported. + * src/estream.c (_gpgrt_w32_get_last_err_code): New. + (func_file_create_w32): New. + (_gpgrt_fopen): Handle the "sysopen" mode flag. Support mapping of + /dev/null. + (_gpgrt_freopen): Support mapping of /dev/null. + * src/w32-gettext.c (load_domain): Allow long file names. + + * src/visibility.c (gpgrt_free_wchar): Make function public. + (gpgrt_fname_to_wchar): Ditto. + (gpgrt_utf8_to_wchar): Ditto. + (gpgrt_wchar_to_utf8): Ditto. + * src/w32-add.h (gpgrt_free_wchar): New prototype. + (gpgrt_fname_to_wchar): Ditto. + (gpgrt_utf8_to_wchar): Ditto. + (gpgrt_wchar_to_utf8): Ditto. + * src/gpg-error.def.in: Add them here too. + +2022-02-17 NIIBE Yutaka <[email protected]> + + gpg-error.m4: Fix use with older gpgrt-config (< 1.33). + + commit 666d64d2bc6539d0ca03dea69abc5a8ccdf37be5 + * src/gpg-error.m4: When gpgrt-config doesn't work expected for + gpg-error.pc, unset GPGRT_CONFIG. + +2022-02-01 NIIBE Yutaka <[email protected]> + + build,tests: Fix detection of have_lock_optimization. + + commit 433aba9e778ebe9500c29ae1ae34999d48e98a19 + * configure.ac: Lock optimization (without sys/single_threaded.h) is + only known to work on GNU system, using weak symbol. + 2022-01-27 Werner Koch <[email protected]> Release 1.44. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/NEWS new/libgpg-error-1.45/NEWS --- old/libgpg-error-1.44/NEWS 2022-01-27 09:50:24.000000000 +0100 +++ new/libgpg-error-1.45/NEWS 2022-04-07 10:28:40.000000000 +0200 @@ -1,3 +1,26 @@ +Noteworthy changes in version 1.45 (2022-04-07) [C33/A33/R0] +----------------------------------------------- + + * Support the "sysopen" mode parameter for gpgrt_fopen so that file + names longer than MAX_PATH can be supported under Windows. + + * gpgrt_access and gpgrt_mkdir now support file names longer than + MAX_PATH. + + * gpgrt_fopen now maps "/dev/null" to "nul" on Windows. + + * Published some internal helper functions for Windows. + + * Interface changes relative to the 1.42 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gpgrt_free_wchar NEW. + gpgrt_fname_to_wchar NEW. + gpgrt_utf8_to_wchar NEW. + gpgrt_wchar_to_utf8 NEW. + + Release-info: https://dev.gnupg.org/T5802 + + Noteworthy changes in version 1.44 (2022-01-27) [C32/A32/R2] ----------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/VERSION new/libgpg-error-1.45/VERSION --- old/libgpg-error-1.44/VERSION 2022-01-27 09:53:54.000000000 +0100 +++ new/libgpg-error-1.45/VERSION 2022-04-07 10:34:36.000000000 +0200 @@ -1 +1 @@ -1.44 +1.45 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/configure new/libgpg-error-1.45/configure --- old/libgpg-error-1.44/configure 2022-01-27 09:53:54.000000000 +0100 +++ new/libgpg-error-1.45/configure 2022-04-07 10:34:37.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libgpg-error 1.44. +# Generated by GNU Autoconf 2.69 for libgpg-error 1.45. # # Report bugs to <https://bugs.gnupg.org>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='libgpg-error' PACKAGE_TARNAME='libgpg-error' -PACKAGE_VERSION='1.44' -PACKAGE_STRING='libgpg-error 1.44' +PACKAGE_VERSION='1.45' +PACKAGE_STRING='libgpg-error 1.45' PACKAGE_BUGREPORT='https://bugs.gnupg.org' PACKAGE_URL='' @@ -1414,7 +1414,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libgpg-error 1.44 to adapt to many kinds of systems. +\`configure' configures libgpg-error 1.45 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1485,7 +1485,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libgpg-error 1.44:";; + short | recursive ) echo "Configuration of libgpg-error 1.45:";; esac cat <<\_ACEOF @@ -1616,7 +1616,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libgpg-error configure 1.44 +libgpg-error configure 1.45 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2268,7 +2268,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libgpg-error $as_me 1.44, which was +It was created by libgpg-error $as_me 1.45, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2624,16 +2624,16 @@ # (Interfaces added: AGE++) # (Interfaces removed: AGE=0) # Note that added error codes don't constitute an interface change. -LIBGPG_ERROR_LT_CURRENT=32 -LIBGPG_ERROR_LT_AGE=32 -LIBGPG_ERROR_LT_REVISION=2 +LIBGPG_ERROR_LT_CURRENT=33 +LIBGPG_ERROR_LT_AGE=33 +LIBGPG_ERROR_LT_REVISION=0 ################################################ -VERSION_NUMBER=0x012c00 +VERSION_NUMBER=0x012d00 ac_aux_dir= @@ -3146,7 +3146,7 @@ # Define the identity of the package. PACKAGE='libgpg-error' - VERSION='1.44' + VERSION='1.45' cat >>confdefs.h <<_ACEOF @@ -18694,9 +18694,9 @@ if test x$ac_cv_header_sys_single_threaded_h = xyes; then have_lock_optimization=yes else - case "$gl_cv_have_weak" in - *yes) have_lock_optimization=yes ;; - * ) ;; + case "${host_os}" in + *-gnu*) have_lock_optimization=yes ;; + * ) ;; esac fi fi @@ -18775,7 +18775,7 @@ # # Provide information about the build. # -BUILD_REVISION="54eff9c" +BUILD_REVISION="dbac537" cat >>confdefs.h <<_ACEOF @@ -18784,7 +18784,7 @@ BUILD_VERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./'` -BUILD_VERSION="${BUILD_VERSION}0.21743" +BUILD_VERSION="${BUILD_VERSION}0.56236" BUILD_FILEVERSION=`echo "${BUILD_VERSION}" | tr . ,` @@ -19461,7 +19461,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libgpg-error $as_me 1.44, which was +This file was extended by libgpg-error $as_me 1.45, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19527,7 +19527,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libgpg-error config.status 1.44 +libgpg-error config.status 1.45 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -21659,7 +21659,7 @@ echo " $PACKAGE_NAME v$PACKAGE_VERSION has been configured as follows: - Revision: 54eff9c (21743) + Revision: dbac537 (56236) Platform: $host$tmp " if test "$gcry_cv_gcc_attribute_aligned" != "yes" ; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/configure.ac new/libgpg-error-1.45/configure.ac --- old/libgpg-error-1.44/configure.ac 2022-01-27 09:50:24.000000000 +0100 +++ new/libgpg-error-1.45/configure.ac 2022-04-07 10:28:15.000000000 +0200 @@ -29,7 +29,7 @@ # See below for the LT versions. m4_define([mym4_package],[libgpg-error]) m4_define([mym4_major], [1]) -m4_define([mym4_minor], [44]) +m4_define([mym4_minor], [45]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag @@ -49,9 +49,9 @@ # (Interfaces added: AGE++) # (Interfaces removed: AGE=0) # Note that added error codes don't constitute an interface change. -LIBGPG_ERROR_LT_CURRENT=32 -LIBGPG_ERROR_LT_AGE=32 -LIBGPG_ERROR_LT_REVISION=2 +LIBGPG_ERROR_LT_CURRENT=33 +LIBGPG_ERROR_LT_AGE=33 +LIBGPG_ERROR_LT_REVISION=0 ################################################ AC_SUBST(LIBGPG_ERROR_LT_CURRENT) @@ -637,9 +637,9 @@ if test x$ac_cv_header_sys_single_threaded_h = xyes; then have_lock_optimization=yes else - case "$gl_cv_have_weak" in - *yes) have_lock_optimization=yes ;; - * ) ;; + case "${host_os}" in + *-gnu*) have_lock_optimization=yes ;; + * ) ;; esac fi fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/doc/gpgrt.info new/libgpg-error-1.45/doc/gpgrt.info --- old/libgpg-error-1.44/doc/gpgrt.info 2022-01-27 09:54:06.000000000 +0100 +++ new/libgpg-error-1.45/doc/gpgrt.info 2022-04-07 10:33:57.000000000 +0200 @@ -1,6 +1,6 @@ This is gpgrt.info, produced by makeinfo version 6.5 from gpgrt.texi. -This manual is for Libgpg-error (version 1.44, 7 December 2018), which +This manual is for Libgpg-error (version 1.45, 7 December 2018), which is a library for code used by all GnuPG related packages. Copyright (C) 2014 g10 Code GmbH @@ -22,7 +22,7 @@ The Libgpg-error Library ************************ -This manual is for Libgpg-error (version 1.44, 7 December 2018), which +This manual is for Libgpg-error (version 1.45, 7 December 2018), which is a library for code used by all GnuPG related packages. Copyright (C) 2014 g10 Code GmbH diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/doc/stamp-vti new/libgpg-error-1.45/doc/stamp-vti --- old/libgpg-error-1.44/doc/stamp-vti 2022-01-27 09:54:06.000000000 +0100 +++ new/libgpg-error-1.45/doc/stamp-vti 2022-04-07 10:34:48.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 7 December 2018 @set UPDATED-MONTH December 2018 -@set EDITION 1.44 -@set VERSION 1.44 +@set EDITION 1.45 +@set VERSION 1.45 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/doc/version.texi new/libgpg-error-1.45/doc/version.texi --- old/libgpg-error-1.44/doc/version.texi 2022-01-27 09:54:06.000000000 +0100 +++ new/libgpg-error-1.45/doc/version.texi 2022-04-07 10:33:57.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 7 December 2018 @set UPDATED-MONTH December 2018 -@set EDITION 1.44 -@set VERSION 1.44 +@set EDITION 1.45 +@set VERSION 1.45 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/lang/cl/gpg-error.asd new/libgpg-error-1.45/lang/cl/gpg-error.asd --- old/libgpg-error-1.44/lang/cl/gpg-error.asd 2022-01-27 09:54:04.000000000 +0100 +++ new/libgpg-error-1.45/lang/cl/gpg-error.asd 2022-04-07 10:34:47.000000000 +0200 @@ -27,7 +27,7 @@ (defsystem gpg-error :description "Common error values for all GnuPG components." :author "g10 Code GmbH" - :version "1.44" + :version "1.45" :licence "LGPL" :depends-on ("cffi") :components ((:file "gpg-error-package") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/libgpg-error.spec new/libgpg-error-1.45/libgpg-error.spec --- old/libgpg-error-1.44/libgpg-error.spec 2022-01-27 09:54:07.000000000 +0100 +++ new/libgpg-error-1.45/libgpg-error.spec 2022-04-07 10:34:50.000000000 +0200 @@ -1,7 +1,7 @@ # This is a template. The dist target uses it to create the real file. Summary: libgpg-error Name: libgpg-error -Version: 1.44 +Version: 1.45 Release: 1 URL: ftp://ftp.gnupg.org/gcrypt/alpha/libgpg-error/ Source: ftp://ftp.gnupg.org/gcrypt/alpha/libgpg-error/%{name}-%{version}.tar.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/cs.po new/libgpg-error-1.45/po/cs.po --- old/libgpg-error-1.44/po/cs.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/cs.po 2022-04-07 10:34:49.000000000 +0200 @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.42\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-10-15 21:07+02:00\n" "Last-Translator: Petr Pisar <[email protected]>\n" "Language-Team: Czech <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/da.po new/libgpg-error-1.45/po/da.po --- old/libgpg-error-1.44/po/da.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/da.po 2022-04-07 10:34:49.000000000 +0200 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.10\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:24+0100\n" "Last-Translator: Joe Hansen <[email protected]>\n" "Language-Team: Danish <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/de.po new/libgpg-error-1.45/po/de.po --- old/libgpg-error-1.44/po/de.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/de.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error-1.19\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:25+0100\n" "Last-Translator: Werner Koch <[email protected]>\n" "Language-Team: none\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/eo.po new/libgpg-error-1.45/po/eo.po --- old/libgpg-error-1.44/po/eo.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/eo.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.7\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:25+0100\n" "Last-Translator: Felipe Castro <[email protected]>\n" "Language-Team: Esperanto <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/es.po new/libgpg-error-1.45/po/es.po --- old/libgpg-error-1.44/po/es.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/es.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.30-beta4\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:25+0100\n" "Last-Translator: Tails translators <[email protected]>\n" "Language-Team: es <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/fr.po new/libgpg-error-1.45/po/fr.po --- old/libgpg-error-1.44/po/fr.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/fr.po 2022-04-07 10:34:49.000000000 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: libgpg-error-1.17\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:26+0100\n" "Last-Translator: David Pr??vot <[email protected]>\n" "Language-Team: French <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/hu.po new/libgpg-error-1.45/po/hu.po --- old/libgpg-error-1.44/po/hu.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/hu.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error-1.7\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:26+0100\n" "Last-Translator: Bal??zs ??r <[email protected]>\n" "Language-Team: Hungarian <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/it.po new/libgpg-error-1.45/po/it.po --- old/libgpg-error-1.44/po/it.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/it.po 2022-04-07 10:34:49.000000000 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: libgpg-error\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:26+0100\n" "Last-Translator: Milo Casagrande <[email protected]>\n" "Language-Team: Italian <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/ja.po new/libgpg-error-1.45/po/ja.po --- old/libgpg-error-1.44/po/ja.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/ja.po 2022-04-07 10:34:49.000000000 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.39\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:26+0100\n" "Last-Translator: NIIBE Yutaka <[email protected]>\n" "Language-Team: none\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/libgpg-error.pot new/libgpg-error-1.45/po/libgpg-error.pot --- old/libgpg-error-1.44/po/libgpg-error.pot 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/libgpg-error.pot 2022-04-07 10:34:49.000000000 +0200 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: libgpg-error 1.44\n" +"Project-Id-Version: libgpg-error 1.45\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/nl.po new/libgpg-error-1.45/po/nl.po --- old/libgpg-error-1.44/po/nl.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/nl.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.10\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:27+0100\n" "Last-Translator: Freek de Kruijf <[email protected]>\n" "Language-Team: Dutch <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/pl.po new/libgpg-error-1.45/po/pl.po --- old/libgpg-error-1.44/po/pl.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/pl.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.38\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:42+0100\n" "Last-Translator: Jakub Bogusz <[email protected]>\n" "Language-Team: Polish <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/pt.po new/libgpg-error-1.45/po/pt.po --- old/libgpg-error-1.44/po/pt.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/pt.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.17\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:42+0100\n" "Last-Translator: Paulo Tom?? <[email protected]>\n" "Language-Team: Portuguese <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/ro.po new/libgpg-error-1.45/po/ro.po --- old/libgpg-error-1.44/po/ro.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/ro.po 2022-04-07 10:34:49.000000000 +0200 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.1\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:42+0100\n" "Last-Translator: Laurentiu Buzdugan <[email protected]>\n" "Language-Team: Romanian <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/ru.po new/libgpg-error-1.45/po/ru.po --- old/libgpg-error-1.44/po/ru.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/ru.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-10-12 10:43+0100\n" "Last-Translator: Ineiev <[email protected]>\n" "Language-Team: Russian <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/sr.po new/libgpg-error-1.45/po/sr.po --- old/libgpg-error-1.44/po/sr.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/sr.po 2022-04-07 10:34:49.000000000 +0200 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: libgpg-error-1.7\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:43+0100\n" "Last-Translator: ???????????????? ?????????????? <[email protected]>\n" "Language-Team: Serbian <(nothing)>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/sv.po new/libgpg-error-1.45/po/sv.po --- old/libgpg-error-1.44/po/sv.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/sv.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.7\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:43+0100\n" "Last-Translator: Daniel Nylander <[email protected]>\n" "Language-Team: Swedish <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/tr.po new/libgpg-error-1.45/po/tr.po --- old/libgpg-error-1.44/po/tr.po 2022-01-27 09:54:07.000000000 +0100 +++ new/libgpg-error-1.45/po/tr.po 2022-04-07 10:34:49.000000000 +0200 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: libgpg-error\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2022-01-13 20:00+0100\n" "Last-Translator: Emir SARI <[email protected]>\n" "Language-Team: Turkish\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/uk.po new/libgpg-error-1.45/po/uk.po --- old/libgpg-error-1.44/po/uk.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/uk.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.7\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:44+0100\n" "Last-Translator: Yuri Chornoivan <[email protected]>\n" "Language-Team: Ukrainian <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/vi.po new/libgpg-error-1.45/po/vi.po --- old/libgpg-error-1.44/po/vi.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/vi.po 2022-04-07 10:34:49.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.7\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:44+0100\n" "Last-Translator: Clytie Siddall <[email protected]>\n" "Language-Team: Vietnamese <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/zh_CN.po new/libgpg-error-1.45/po/zh_CN.po --- old/libgpg-error-1.44/po/zh_CN.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/zh_CN.po 2022-04-07 10:34:49.000000000 +0200 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.39\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:44+0100\n" "Last-Translator: bobwxc <[email protected]>\n" "Language-Team: none\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/po/zh_TW.po new/libgpg-error-1.45/po/zh_TW.po --- old/libgpg-error-1.44/po/zh_TW.po 2022-01-27 09:43:46.000000000 +0100 +++ new/libgpg-error-1.45/po/zh_TW.po 2022-04-07 10:34:49.000000000 +0200 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.39\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2022-01-27 09:43+0100\n" +"POT-Creation-Date: 2022-04-07 10:34+0200\n" "PO-Revision-Date: 2021-03-22 10:45+0100\n" "Last-Translator: bobwxc <[email protected]>\n" "Language-Team: None\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/estream.c new/libgpg-error-1.45/src/estream.c --- old/libgpg-error-1.44/src/estream.c 2022-01-25 18:56:13.000000000 +0100 +++ new/libgpg-error-1.45/src/estream.c 2022-03-04 13:58:01.000000000 +0100 @@ -362,6 +362,15 @@ } +gpg_err_code_t +_gpgrt_w32_get_last_err_code (void) +{ + int ec = GetLastError (); + errno = map_w32_to_errno (ec); + return _gpg_err_code_from_errno (errno); +} + + #endif /*HAVE_W32_SYSTEM*/ /* @@ -1742,6 +1751,100 @@ } +/* Create function for objects identified by a file name. Windows + * version to use CreateFile. */ +#ifdef HAVE_W32_SYSTEM +static int +func_file_create_w32 (void **cookie, HANDLE *rethd, const char *path, + unsigned int modeflags, unsigned int cmode) +{ + estream_cookie_w32_t hd_cookie; + wchar_t *wpath = NULL; + int err = 0; + HANDLE hd; + DWORD desired_access; + DWORD share_mode; + DWORD creation_distribution; + + (void)cmode; + + hd_cookie = mem_alloc (sizeof *hd_cookie); + if (!hd_cookie) + { + err = -1; + goto leave; + } + + wpath = _gpgrt_fname_to_wchar (path); + if (!wpath) + { + err = -1; + goto leave; + } + + if ((modeflags & O_WRONLY)) + { + desired_access = GENERIC_WRITE; + share_mode = FILE_SHARE_WRITE; + } + else if ((modeflags & O_RDWR)) + { + desired_access = GENERIC_READ | GENERIC_WRITE; + share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE; + } + else + { + desired_access = GENERIC_READ; + share_mode = FILE_SHARE_READ; + } + + + creation_distribution = 0; + if ((modeflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) + creation_distribution |= CREATE_NEW; + else if ((modeflags & O_TRUNC) == O_TRUNC) + { + if ((modeflags & O_CREAT) == O_CREAT) + creation_distribution |= CREATE_ALWAYS; + else if ((modeflags & O_RDONLY) != O_RDONLY) + creation_distribution |= TRUNCATE_EXISTING; + } + else if ((modeflags & O_APPEND) == O_APPEND) + creation_distribution |= OPEN_EXISTING; + else if ((modeflags & O_CREAT) == O_CREAT) + creation_distribution |= OPEN_ALWAYS; + else + creation_distribution |= OPEN_EXISTING; + + hd = CreateFileW (wpath, + desired_access, + share_mode, + NULL, /* security attributes */ + creation_distribution, + 0, /* flags and attributes */ + NULL); /* template file */ + if (hd == INVALID_HANDLE_VALUE) + { + _set_errno (map_w32_to_errno (GetLastError ())); + err = -1; + goto leave; + } + + hd_cookie->hd = hd; + hd_cookie->no_close = 0; + hd_cookie->no_syscall_clamp = 0; + *cookie = hd_cookie; + *rethd = hd; + + leave: + _gpgrt_free_wchar (wpath); + if (err) + mem_free (hd_cookie); + return err; +} +#endif /*HAVE_W32_SYSTEM*/ + + /* Flags used by parse_mode and friends. */ #define X_SAMETHREAD (1 << 0) @@ -1780,10 +1883,11 @@ * * sysopen * - * The object is opened in sysmode. On POSIX this is a NOP but - * under Windows the direct W32 API functions (HANDLE) are used - * instead of their libc counterparts (fd). - * FIXME: The functionality is not yet implemented. + * The object is opened in GPGRT_SYSHD_HANDLE mode. On POSIX this + * is a NOP but under Windows the direct W32 API functions (HANDLE) + * are used instead of their libc counterparts (fd). This flag + * also allows to use file names longer than MAXPATH. Note that + * gpgrt_fileno does not not work for such a stream under Windows. * * pollable * @@ -2181,7 +2285,7 @@ /* * Create a new stream and initialize it. On success the new stream - * handle is tsored at R_STREAM. On failure NULL is stored at + * handle is stored at R_STREAM. On failure NULL is stored at * R_STREAM. */ static int @@ -3210,40 +3314,57 @@ const char *_GPGRT__RESTRICT mode) { unsigned int modeflags, cmode, xmode; - int create_called; - estream_t stream; - void *cookie; + int create_called = 0; + estream_t stream = NULL; + void *cookie = NULL; int err; - int fd; + struct cookie_io_functions_s *functions; es_syshd_t syshd; - - stream = NULL; - cookie = NULL; - create_called = 0; + int kind; err = parse_mode (mode, &modeflags, &xmode, &cmode); if (err) - goto out; + goto leave; + + /* Convenience hack so that we can use /dev/null on Windows. */ +#ifdef HAVE_W32_SYSTEM + if (path && !strcmp (path, "/dev/null")) + path = "nul"; +#endif - err = func_file_create (&cookie, &fd, path, modeflags, cmode); +#ifdef HAVE_W32_SYSTEM + if ((xmode & X_SYSOPEN)) + { + kind = BACKEND_W32; + functions = &estream_functions_w32; + syshd.type = ES_SYSHD_HANDLE; + err = func_file_create_w32 (&cookie, &syshd.u.handle, + path, modeflags, cmode); + } + else +#endif /* W32 */ + { + kind = BACKEND_FD; + functions = &estream_functions_fd; + syshd.type = ES_SYSHD_FD; + err = func_file_create (&cookie, &syshd.u.fd, + path, modeflags, cmode); + } if (err) - goto out; + goto leave; - syshd.type = ES_SYSHD_FD; - syshd.u.fd = fd; create_called = 1; - err = create_stream (&stream, cookie, &syshd, BACKEND_FD, - estream_functions_fd, modeflags, xmode, 0); + err = create_stream (&stream, cookie, &syshd, kind, + *functions, modeflags, xmode, 0); if (err) - goto out; + goto leave; if (stream && path) fname_set_internal (stream, path, 1); - out: - + leave: if (err && create_called) - (*estream_functions_fd.public.func_close) (cookie); + functions->public.func_close (cookie); return stream; } @@ -3542,7 +3663,7 @@ /* If we are pollable we create the function cookie with syscall * clamp disabled. This is because functions are called from - * separatre reader and writer threads in w32-stream. */ + * separate reader and writer threads in w32-stream. */ err = func_w32_create (&cookie, hd, modeflags, no_close, !!(xmode & X_POLLABLE)); if (err) @@ -3715,6 +3836,12 @@ cookie = NULL; create_called = 0; + /* Convenience hack so that we can use /dev/null on Windows. */ +#ifdef HAVE_W32_SYSTEM + if (!strcmp (path, "/dev/null")) + path = "nul"; +#endif + xmode = stream->intern->samethread ? X_SAMETHREAD : 0; lock_stream (stream); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/gpg-error.def.in new/libgpg-error-1.45/src/gpg-error.def.in --- old/libgpg-error-1.44/src/gpg-error.def.in 2021-03-04 10:49:37.000000000 +0100 +++ new/libgpg-error-1.45/src/gpg-error.def.in 2022-03-04 13:44:26.000000000 +0100 @@ -242,4 +242,9 @@ gpgrt_access @183 + gpgrt_free_wchar @184 + gpgrt_fname_to_wchar @185 + gpgrt_utf8_to_wchar @186 + gpgrt_wchar_to_utf8 @187 + ;; end of file with public symbols for Windows. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/gpg-error.m4 new/libgpg-error-1.45/src/gpg-error.m4 --- old/libgpg-error-1.44/src/gpg-error.m4 2021-05-20 09:19:36.000000000 +0200 +++ new/libgpg-error-1.45/src/gpg-error.m4 2022-03-04 13:44:26.000000000 +0100 @@ -10,7 +10,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2021-03-31 +# Last-changed: 2022-02-15 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -139,6 +139,7 @@ fi elif test "$GPG_ERROR_CONFIG" != "no"; then gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + unset GPGRT_CONFIG fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/gpgrt-int.h new/libgpg-error-1.45/src/gpgrt-int.h --- old/libgpg-error-1.44/src/gpgrt-int.h 2021-10-22 17:17:05.000000000 +0200 +++ new/libgpg-error-1.45/src/gpgrt-int.h 2022-03-04 13:44:26.000000000 +0100 @@ -822,6 +822,8 @@ const char *name); char *_gpgrt_w32_reg_get_string (const char *key); +wchar_t *_gpgrt_fname_to_wchar (const char *fname); + #endif /*HAVE_W32_SYSTEM*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/protos.h new/libgpg-error-1.45/src/protos.h --- old/libgpg-error-1.44/src/protos.h 2021-03-05 16:03:30.000000000 +0100 +++ new/libgpg-error-1.45/src/protos.h 2022-03-04 13:44:26.000000000 +0100 @@ -25,7 +25,10 @@ wchar_t *_gpgrt_utf8_to_wchar (const char *string); void _gpgrt_free_wchar (wchar_t *wstring); char *_gpgrt_wchar_to_utf8 (const wchar_t *string, size_t length); + +/*-- estream.c --*/ void _gpgrt_w32_set_errno (int ec); +gpg_err_code_t _gpgrt_w32_get_last_err_code (void); #endif /*_GPGRT_PROTOS_H*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/sysutils.c new/libgpg-error-1.45/src/sysutils.c --- old/libgpg-error-1.44/src/sysutils.c 2020-12-21 10:31:02.000000000 +0100 +++ new/libgpg-error-1.45/src/sysutils.c 2022-03-04 13:44:26.000000000 +0100 @@ -39,20 +39,6 @@ #include "gpgrt-int.h" -#ifdef HAVE_W32_SYSTEM -/* Return true if STRING has any 8 bit character. */ -static int -any8bitchar (const char *string) -{ - if (string) - for ( ; *string; string++) - if ((*string & 0x80)) - return 1; - return 0; -} -#endif /*HAVE_W32_SYSTEM*/ - - /* Return true if FD is valid. */ int _gpgrt_fd_valid_p (int fd) @@ -238,6 +224,94 @@ } +#ifdef HAVE_W32_SYSTEM +/* Convert an UTF-8 encode file name to wchar. If the file name is + * close to the limit of MAXPATH the API functions will fail. The + * method to overcome this API limitation is to use a prefix which + * bypasses the checking by CreateFile. This also required to first + * convert the name to an absolute file name. */ +wchar_t * +_gpgrt_fname_to_wchar (const char *fname) +{ + wchar_t *wname; + wchar_t *wfullpath = NULL; + int success = 0; + + wname = _gpgrt_utf8_to_wchar (fname); + if (!wname) + return NULL; + + if (!strncmp (fname, "\\\\?\\", 4)) + success = 1; /* Already translated. */ + else if (wcslen (wname) > 230) + { + int wlen = 1024; + int extralen; + DWORD res; + wchar_t *w; + + try_again: + wfullpath = xtrymalloc (wlen * sizeof *wfullpath); + if (!wfullpath) + goto leave; + + if (*fname == '\\' && fname[1] == '\\' && fname[2]) + { + wcscpy (wfullpath, L"\\\\?\\UNC\\"); + extralen = 8; + } + else + { + wcscpy (wfullpath, L"\\\\?\\"); + extralen = 4; + } + res = GetFullPathNameW (wname, wlen-extralen, wfullpath+extralen, NULL); + if (!res) + { + _gpgrt_w32_set_errno (-1); + goto leave; + } + else if (res >= wlen - extralen) + { + /* Truncated - increase to the desired length. */ + if (wlen > 1024) + { + /* We should never get to here. */ + errno = ENAMETOOLONG; + goto leave; + } + /* GetFullPathNameW indicated the required buffer length. */ + _gpgrt_free_wchar (wfullpath); + wfullpath = NULL; + wlen = res + extralen; + goto try_again; + } + _gpgrt_free_wchar (wname); + wname = wfullpath; + wfullpath = NULL; + /* Need to make sure that all slashes are mapped. */ + for (w = wname; *w; w++) + if (*w == L'/') + *w = L'\\'; + success = 1; + } + else + success = 1; + + leave: + _gpgrt_free_wchar (wfullpath); + if (!success) + { + _gpgrt_free_wchar (wname); + wname = NULL; + } + return wname; +} + +#endif /*HAVE_W32_SYSTEM*/ + + + #ifndef HAVE_W32_SYSTEM static mode_t modestr_to_mode (const char *modestr) @@ -296,9 +370,10 @@ (void)modestr; /* Note: Fixme: We should set appropriate permissions. */ - wname = _gpgrt_utf8_to_wchar (name); + wname = _gpgrt_fname_to_wchar (name); if (!wname) return _gpg_err_code_from_syserror (); + if (!CreateDirectoryW (wname, NULL)) { _gpgrt_w32_set_errno (-1); @@ -306,8 +381,10 @@ } else ec = 0; + _gpgrt_free_wchar (wname); return ec; + #elif MKDIR_TAKES_ONE_ARG (void)modestr; if (mkdir (name)) @@ -322,9 +399,8 @@ /* A simple wrapper around chdir. NAME is expected to be utf8 - * encoded. - * Note that in addition to returning an gpg-error error code ERRNO is - * also set by this function. */ + * encoded. Note that in addition to returning an gpg-error error + * code ERRNO is also set by this function. */ gpg_err_code_t _gpgrt_chdir (const char *name) { @@ -332,6 +408,8 @@ wchar_t *wname; gpg_err_code_t ec; + /* Note that the \\?\ trick does not work with SetCurrentDirectoryW + * Thus we use the plain conversion function. */ wname = _gpgrt_utf8_to_wchar (name); if (!wname) return _gpg_err_code_from_syserror (); @@ -376,6 +454,8 @@ } else if (wlen > MAX_PATH) { + /* FWIW: I tried to use GetFullPathNameW (L".") but found no way + * to execute a test program at a too long cwd. */ _gpg_err_set_errno (ENAMETOOLONG); return NULL; } @@ -417,28 +497,35 @@ gpg_err_code_t ec; #ifdef HAVE_W32_SYSTEM - if (any8bitchar (fname)) - { - wchar_t *wfname; + wchar_t *wfname; + DWORD attribs; - wfname = _gpgrt_utf8_to_wchar (fname); - if (!wfname) - ec = _gpg_err_code_from_syserror (); - else + wfname = _gpgrt_fname_to_wchar (fname); + if (!wfname) + return _gpg_err_code_from_syserror (); + + attribs = GetFileAttributesW (wfname); + if (attribs == (DWORD)(-1)) + ec = _gpgrt_w32_get_last_err_code (); + else + { + if ((mode & W_OK) && (attribs & FILE_ATTRIBUTE_READONLY)) { - ec = _waccess (wfname, mode)? _gpg_err_code_from_syserror () : 0; - _gpgrt_free_wchar (wfname); + _gpg_err_set_errno (EACCES); + ec = _gpg_err_code_from_syserror (); } + else + ec = 0; } - else -#endif /*HAVE_W32_SYSTEM*/ - ec = access (fname, mode)? _gpg_err_code_from_syserror () : 0; + _gpgrt_free_wchar (wfname); +#else /* Unix */ + ec = access (fname, mode)? _gpg_err_code_from_syserror () : 0; +#endif /* Unix */ return ec; } - /* Get the standard home directory for user NAME. If NAME is NULL the * directory for the current user is returned. Caller must release * the returned string. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/visibility.c new/libgpg-error-1.45/src/visibility.c --- old/libgpg-error-1.44/src/visibility.c 2021-03-04 10:49:37.000000000 +0100 +++ new/libgpg-error-1.45/src/visibility.c 2022-03-04 13:44:26.000000000 +0100 @@ -1241,6 +1241,31 @@ * specific function despite that they are technically not needed. */ #ifdef HAVE_W32_SYSTEM +void +gpgrt_free_wchar (wchar_t *wstring) +{ + if (wstring) + _gpgrt_free_wchar (wstring); +} + +wchar_t * +gpgrt_fname_to_wchar (const char *fname) +{ + return _gpgrt_fname_to_wchar (fname); +} + +wchar_t * +gpgrt_utf8_to_wchar (const char *string) +{ + return _gpgrt_utf8_to_wchar (string); +} + +char * +gpgrt_wchar_to_utf8 (const wchar_t *string) +{ + return _gpgrt_wchar_to_utf8 (string, (size_t)(-1)); +} + char * gpgrt_w32_reg_query_string (const char *root, const char *dir, const char *name) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/visibility.h new/libgpg-error-1.45/src/visibility.h --- old/libgpg-error-1.44/src/visibility.h 2021-03-04 10:49:37.000000000 +0100 +++ new/libgpg-error-1.45/src/visibility.h 2022-03-04 13:44:26.000000000 +0100 @@ -411,6 +411,10 @@ #define gpgrt_absfnameconcat _gpgrt_USE_UNDERSCORED_FUNCTION /* Windows specific functions. */ +#define gpgrt_free_wchar _gpgrt_USE_UNDERSCORED_FUNCTION +#define gpgrt_utf8_to_wchar _gpgrt_USE_UNDERSCORED_FUNCTION +#define gpgrt_wchar_to_utf8 _gpgrt_USE_UNDERSCORED_FUNCTION +#define gpgrt_fname_to_wchar _gpgrt_USE_UNDERSCORED_FUNCTION #define gpgrt_w32_reg_query_string _gpgrt_USE_UNDERSCORED_FUNCTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/w32-add.h new/libgpg-error-1.45/src/w32-add.h --- old/libgpg-error-1.44/src/w32-add.h 2021-03-04 10:49:37.000000000 +0100 +++ new/libgpg-error-1.45/src/w32-add.h 2022-03-04 13:44:26.000000000 +0100 @@ -61,6 +61,22 @@ # define iconv(a,b,c,d,e) gpgrt_w32_iconv ((a),(b),(c),(d),(e)) #endif /*GPGRT_ENABLE_W32_ICONV_MACROS*/ +/* Release a wchar_t * buffer. */ +void gpgrt_free_wchar (wchar_t *wstring); + +/* Convert an UTF-8 encoded file name to wchar. + * Prepend a '\\?\' prefix if needed. */ +wchar_t *gpgrt_fname_to_wchar (const char *fname); + +/* Convert an UTF8 string to a WCHAR string. Caller should use + * gpgrt_free_wchar to release the result. + * Returns NULL on error and sets ERRNO. */ +wchar_t *gpgrt_utf8_to_wchar (const char *string); + +/* Convert a WCHAR string to UTF-8. Caller should use gpgrt_free to + * release the result. Returns NULL on error and sets ERRNO. */ +char *gpgrt_wchar_to_utf8 (const wchar_t *wstring); + /* Query a string in the registry. */ char *gpgrt_w32_reg_query_string (const char *root, const char *dir, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpg-error-1.44/src/w32-gettext.c new/libgpg-error-1.45/src/w32-gettext.c --- old/libgpg-error-1.44/src/w32-gettext.c 2021-03-05 16:18:00.000000000 +0100 +++ new/libgpg-error-1.45/src/w32-gettext.c 2022-03-04 13:44:26.000000000 +0100 @@ -1211,7 +1211,7 @@ char *read_ptr; { - wchar_t *wfilename = _gpgrt_utf8_to_wchar (filename); + wchar_t *wfilename = _gpgrt_fname_to_wchar (filename); if (!wfilename) fh = INVALID_HANDLE_VALUE; @@ -1322,7 +1322,7 @@ /* Return a malloced wide char string from an UTF-8 encoded input string STRING. Caller must free this value. On failure returns NULL. The result of calling this function with STRING set to NULL - is not defined. If LENGTH is zero and RETLEN NULL the fucntion + is not defined. If LENGTH is zero and RETLEN NULL the function assumes that STRING is a nul-terminated string and returns a (wchar_t)0-terminated string. */ static wchar_t *
