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
This commit is contained in:
parent
b47c355b18
commit
4dcef0e178
8 changed files with 79 additions and 26 deletions
|
@ -2226,8 +2226,9 @@ change_options_program (gc_component_id_t component,
|
|||
*dest_filenamep = dest_filename;
|
||||
*orig_filenamep = orig_filename;
|
||||
|
||||
/* Use open() so that we can use O_EXCL. */
|
||||
fd = open (src_filename, O_CREAT | O_EXCL | O_WRONLY, 0644);
|
||||
/* Use open() so that we can use O_EXCL.
|
||||
* FIXME: gpgrt has an x flag for quite some time now - use that. */
|
||||
fd = gnupg_open (src_filename, O_CREAT | O_EXCL | O_WRONLY, 0644);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
src_file = gpgrt_fdopen (fd, "w");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue