diff options
Diffstat (limited to 'src/assuan-support.c')
| -rw-r--r-- | src/assuan-support.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/assuan-support.c b/src/assuan-support.c index 86e9b562..a0f60287 100644 --- a/src/assuan-support.c +++ b/src/assuan-support.c @@ -110,8 +110,8 @@ my_pipe (assuan_context_t ctx, assuan_fd_t fds[2], int inherit_idx) res = _gpgme_io_pipe (gfds, inherit_idx); /* For now... */ - fds[0] = (assuan_fd_t) gfds[0]; - fds[1] = (assuan_fd_t) gfds[1]; + fds[0] = (assuan_fd_t)(intptr_t) gfds[0]; + fds[1] = (assuan_fd_t)(intptr_t) gfds[1]; return res; } @@ -123,7 +123,7 @@ static int my_close (assuan_context_t ctx, assuan_fd_t fd) { (void)ctx; - return _gpgme_io_close ((int) fd); + return _gpgme_io_close ((int)(intptr_t) fd); } @@ -131,7 +131,7 @@ static ssize_t my_read (assuan_context_t ctx, assuan_fd_t fd, void *buffer, size_t size) { (void)ctx; - return _gpgme_io_read ((int) fd, buffer, size); + return _gpgme_io_read ((int)(intptr_t) fd, buffer, size); } @@ -139,7 +139,7 @@ static ssize_t my_write (assuan_context_t ctx, assuan_fd_t fd, const void *buffer, size_t size) { (void)ctx; - return _gpgme_io_write ((int) fd, buffer, size); + return _gpgme_io_write ((int)(intptr_t) fd, buffer, size); } @@ -220,20 +220,20 @@ my_spawn (assuan_context_t ctx, assuan_pid_t *r_pid, const char *name, { while (fd_child_list[i] != ASSUAN_INVALID_FD) { - fd_items[i].fd = (int) fd_child_list[i]; + fd_items[i].fd = (int)(intptr_t) fd_child_list[i]; fd_items[i].dup_to = -1; i++; } } if (fd_in != ASSUAN_INVALID_FD) { - fd_items[i].fd = (int) fd_in; + fd_items[i].fd = (int)(intptr_t) fd_in; fd_items[i].dup_to = 0; i++; } if (fd_out != ASSUAN_INVALID_FD) { - fd_items[i].fd = (int) fd_out; + fd_items[i].fd = (int)(intptr_t) fd_out; fd_items[i].dup_to = 1; i++; } @@ -361,8 +361,10 @@ my_socketpair (assuan_context_t ctx, int namespace, int style, static assuan_fd_t my_socket (assuan_context_t ctx, int namespace, int style, int protocol) { + int r = _gpgme_io_socket (namespace, style, protocol); + (void)ctx; - return (assuan_fd_t)_gpgme_io_socket (namespace, style, protocol); + return (assuan_fd_t)(intptr_t)r; } @@ -371,7 +373,7 @@ my_connect (assuan_context_t ctx, assuan_fd_t sock, struct sockaddr *addr, socklen_t length) { (void)ctx; - return _gpgme_io_connect ((int)sock, addr, length); + return _gpgme_io_connect ((int)(intptr_t)sock, addr, length); } #else static int |
