aboutsummaryrefslogtreecommitdiffstats
path: root/src/visibility.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-10-19 13:21:59 +0000
committerWerner Koch <[email protected]>2020-10-19 13:21:59 +0000
commit4764c5a3a4d704b3b42bafc5eba3996579030703 (patch)
tree44983a7d7b811145c19de90bd01e52c979815a52 /src/visibility.c
parentw32: Support utf8 also for getcwd. (diff)
downloadlibgpg-error-4764c5a3a4d704b3b42bafc5eba3996579030703.tar.gz
libgpg-error-4764c5a3a4d704b3b42bafc5eba3996579030703.zip
New public function gpgrt_access.
* src/gpg-error.h.in (gpgrt_access): New. * src/gpg-error.vers. src/gpg-error.def.in: Add new function. * src/sysutils.c (any8bitchar): New. (_gpgrt_access): New. * src/visibility.c (gpgrt_access): New. * src/spawn-w32.c (_gpgrt_spawn_process_detached): Use it. * src/argparse.c (try_versioned_conffile): Use it. * tests/t-stringutils.c (check_access): New simple test. -- This is basically a wrapper to allow handling of utf8 encoded file names on Windows. This also fixes the case for versioned config files in directories with non-ascii characters. The new test needs to be run manually on Windows using a directory with Unicode characters. GnuPG-bug-id: 5098
Diffstat (limited to 'src/visibility.c')
-rw-r--r--src/visibility.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/visibility.c b/src/visibility.c
index 85caef3..03a6c45 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -847,6 +847,12 @@ gpgrt_getcwd (void)
return _gpgrt_getcwd ();
}
+gpg_err_code_t
+gpgrt_access (const char *fname, int mode)
+{
+ return _gpgrt_access (fname, mode);
+}
+
gpgrt_b64state_t