diff options
| author | NIIBE Yutaka <[email protected]> | 2025-11-25 00:23:20 +0000 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2025-11-25 00:29:22 +0000 |
| commit | 68dcfec91b9007884e1c46920647007618d402c8 (patch) | |
| tree | bff7a81ea54dfe77b6bf85d488806ae6a5525a97 | |
| parent | commond:dotlock: Remove support of use with glib. (diff) | |
| download | gnupg-68dcfec91b9007884e1c46920647007618d402c8.tar.gz gnupg-68dcfec91b9007884e1c46920647007618d402c8.zip | |
common:dotlock:w32: Minor fixes for Windows.
* common/dotlock.c (any8bitchar): Define under HAVE_DOSISH_SYSTEM.
(dotlock_create_w32): Add missing call of UNLOCK_all_lockfiles,
even though it's currently not implemented yet.
(dotlock_take_w32): Use my_set_errno, like other places.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
| -rw-r--r-- | common/dotlock.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/dotlock.c b/common/dotlock.c index 247eb9100..7aaaaea07 100644 --- a/common/dotlock.c +++ b/common/dotlock.c @@ -331,7 +331,7 @@ # define xfree(a) free ((a)) #endif -/* Wrapper to set ERRNO (required for W32CE). */ +/* Wrapper to set ERRNO. */ #ifdef GPG_ERROR_VERSION # define my_set_errno(e) gpg_err_set_errno ((e)) #else @@ -460,10 +460,8 @@ map_w32_to_errno (DWORD w32_err) return EIO; } } -#endif /*HAVE_DOSISH_SYSTEM*/ -#ifdef HAVE_W32_SYSTEM static int any8bitchar (const char *string) { @@ -473,7 +471,7 @@ any8bitchar (const char *string) return 1; return 0; } -#endif /*HAVE_W32_SYSTEM*/ +#endif /*HAVE_DOSISH_SYSTEM*/ @@ -982,6 +980,7 @@ dotlock_create_w32 (dotlock_t h, const char *file_to_lock) my_set_errno (saveerrno); return NULL; } + UNLOCK_all_lockfiles (); return h; } #endif /*HAVE_DOSISH_SYSTEM*/ @@ -1501,7 +1500,7 @@ dotlock_take_w32 (dotlock_t h, long timeout) h->info_cb (h, h->info_cb_value, DOTLOCK_FILE_ERROR, _("lock '%s' not made: %s\n"), h->lockname, w32_strerror (w32err)); - _set_errno (map_w32_to_errno (w32err)); + my_set_errno (map_w32_to_errno (w32err)); return -1; } |
