Home GnuPG

w32: Support file names longer than MAX_PATH.

Description

w32: Support file names longer than MAX_PATH.

* 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.

Details

Provenance
wernerAuthored on Mar 4 2022, 1:41 PM
Parents
rE666d64d2bc65: gpg-error.m4: Fix use with older gpgrt-config (< 1.33).
Branches
Unknown
Tags
Unknown