Home GnuPG

w32: Fix assuan_socket_connect_fd to be usable.

Description

w32: Fix assuan_socket_connect_fd to be usable.

* src/assuan.h.in (assuan_socket_connect_fd): Second arg assuan_fd_t.
* src/assuan-socket-connect.c (assuan_socket_connect_fd): Second arg
should be an object of type SOCKET.
* src/posix-fd-t.inc.h (assuan_fd_from_posix_fd): Remove.
* src/w32-fd-t.inc.h (assuan_fd_from_posix_fd): Move to...
* src/system-w32.c (assuan_fd_from_posix_fd): ... here.

On Windows, when an application has an already-connected socket, it
must be an object of type SOCKET. In this case, it is wrong to use
_get_osfhandle.

This does not constitute any ABI/API change for POSIX system.

This is an API change for Windows, as assuan_fd_t on Windows is
pointer type, but it's a fix from non-correctly-usable API.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Apr 4 2022, 2:48 AM
Parents
rAa054a0a7cfb0: build: Better cross build support.
Branches
Unknown
Tags
Unknown