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 /tools/gpgconf-comp.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 'tools/gpgconf-comp.c')
| -rw-r--r-- | tools/gpgconf-comp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index 5efe6e50a..26f213666 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -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"); |
