diff options
author | Werner Koch <[email protected]> | 2020-10-20 12:08:35 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-10-20 12:08:35 +0000 |
commit | 4dcef0e17836e8725c31a3b76f2bf7144345c808 (patch) | |
tree | e75dc82afa98ea964ee65fde05608a6148214ffe /g10/tdbio.c | |
parent | w32: Allow Unicode filenames for dotlock (diff) | |
download | gnupg-4dcef0e17836e8725c31a3b76f2bf7144345c808.tar.gz gnupg-4dcef0e17836e8725c31a3b76f2bf7144345c808.zip |
Replace most calls to open by a new wrapper.
* common/sysutils.c (any8bitchar) [W32]: New.
(gnupg_open): New. Replace most calls to open by this.
* common/iobuf.c (any8bitchar) [W32]: New.
(direct_open) [W32]: Use CreateFileW if needed.
--
This is yet another step for full Unicode support on Windows.
GnuPG-bug-id: 5098
Diffstat (limited to 'g10/tdbio.c')
-rw-r--r-- | g10/tdbio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c index fdb90ec53..193f80dc2 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -753,7 +753,7 @@ tdbio_set_dbname (ctrl_t ctrl, const char *new_dbname, log_fatal (_("can't create '%s': %s\n"), fname, strerror (errno)); es_fclose (fp); - db_fd = open (db_name, O_RDWR | MY_O_BINARY); + db_fd = gnupg_open (db_name, O_RDWR | MY_O_BINARY, 0); if (db_fd == -1) log_fatal (_("can't open '%s': %s\n"), db_name, strerror (errno)); @@ -813,7 +813,7 @@ open_db () (int)prevrc, (int)GetLastError ()); } #else /*!HAVE_W32CE_SYSTEM*/ - db_fd = open (db_name, O_RDWR | MY_O_BINARY ); + db_fd = gnupg_open (db_name, O_RDWR | MY_O_BINARY, 0); if (db_fd == -1 && (errno == EACCES #ifdef EROFS || errno == EROFS @@ -821,7 +821,7 @@ open_db () ) ) { /* Take care of read-only trustdbs. */ - db_fd = open (db_name, O_RDONLY | MY_O_BINARY ); + db_fd = gnupg_open (db_name, O_RDONLY | MY_O_BINARY, 0); if (db_fd != -1 && !opt.quiet) log_info (_("Note: trustdb not writable\n")); } |