mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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
(cherry picked from commit 4dcef0e178
)
This commit is contained in:
parent
d65ea29683
commit
86e52e3c33
8 changed files with 79 additions and 26 deletions
|
@ -1142,7 +1142,7 @@ lock_db_file (crl_cache_t cache, crl_cache_entry_t entry)
|
|||
xfree (fname);
|
||||
return NULL;
|
||||
}
|
||||
fd = open (fname, O_RDONLY | O_BINARY);
|
||||
fd = gnupg_open (fname, O_RDONLY | O_BINARY, 0);
|
||||
if (fd == -1)
|
||||
{
|
||||
log_error (_("error opening cache file '%s': %s\n"),
|
||||
|
@ -2226,7 +2226,7 @@ crl_cache_insert (ctrl_t ctrl, const char *url, ksba_reader_t reader)
|
|||
}
|
||||
}
|
||||
|
||||
fd_cdb = open (fname, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
|
||||
fd_cdb = gnupg_open (fname, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
|
||||
if (fd_cdb == -1)
|
||||
{
|
||||
err = gpg_error_from_errno (errno);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue