From 32dad4e4135f0bdc436ed684da753d4b0cdb0ea1 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 4 Mar 2022 13:41:19 +0100 Subject: 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. --- src/visibility.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/visibility.h') diff --git a/src/visibility.h b/src/visibility.h index f9218b5..3a71ad8 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -411,6 +411,10 @@ MARK_VISIBLE (gpgrt_absfnameconcat); #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 -- cgit v1.2.1