diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-03-31 10:55:30 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-03-31 10:55:30 +0900 |
commit | eeda9ac0a71951a2894cd92a366216d2f65c5ad1 (patch) | |
tree | 5b0a387e3a1890f5ca2c116e8b4e22703fe518a2 /src | |
parent | 564e0d94f21f9c2cd8cadf2846163871352f1a92 (diff) | |
download | libassuan-eeda9ac0a71951a2894cd92a366216d2f65c5ad1.tar.gz |
Remove GNU Pth support.
* src/posix-sys-pth-impl.h: Remove.
* src/w32-sys-pth-impl.h: Remove.
* src/Makefile.am: Follow the change.
* src/assuan.h.in (ASSUAN_SYSTEM_PTH_IMPL, ASSUAN_SYSTEM_PTH): Remove.
* src/mkheader.c (write_special): Remove Pth support.
--
GnuPG-bug-id: 5911
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/assuan.h.in | 27 | ||||
-rw-r--r-- | src/mkheader.c | 7 | ||||
-rw-r--r-- | src/posix-sys-pth-impl.h | 87 | ||||
-rw-r--r-- | src/w32-sys-pth-impl.h | 40 |
5 files changed, 0 insertions, 162 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 6b9a46d..0edd514 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,7 +52,6 @@ parts_of_assuan_h = \ posix-types.inc.h w32-types.inc.h \ posix-fd-t.inc.h w32-fd-t.inc.h w32ce-fd-t.inc.h \ posix-sock-nonce.inc.h w32-sock-nonce.inc.h \ - posix-sys-pth-impl.h w32-sys-pth-impl.h \ w32ce-add.h common_sources = \ diff --git a/src/assuan.h.in b/src/assuan.h.in index 184a2ba..b727ffb 100644 --- a/src/assuan.h.in +++ b/src/assuan.h.in @@ -540,33 +540,6 @@ int __assuan_recvmsg (assuan_context_t ctx, assuan_fd_t fd, assuan_msghdr_t msg, int __assuan_sendmsg (assuan_context_t ctx, assuan_fd_t fd, const assuan_msghdr_t msg, int flags); pid_t __assuan_waitpid (assuan_context_t ctx, pid_t pid, int nowait, int *status, int options); -/* Standard system hooks for the legacy GNU Pth. */ -#define ASSUAN_SYSTEM_PTH_IMPL \ - static void _assuan_pth_usleep (assuan_context_t ctx, unsigned int usec) \ - { (void) ctx; pth_usleep (usec); } \ - static ssize_t _assuan_pth_read (assuan_context_t ctx, assuan_fd_t fd, \ - void *buffer, size_t size) \ - { (void) ctx; return pth_read (fd, buffer, size); } \ - static ssize_t _assuan_pth_write (assuan_context_t ctx, assuan_fd_t fd, \ - const void *buffer, size_t size) \ - { (void) ctx; return pth_write (fd, buffer, size); } \ -@include:sys-pth-impl@ - static pid_t _assuan_pth_waitpid (assuan_context_t ctx, pid_t pid, \ - int nowait, int *status, int options) \ - { (void) ctx; \ - if (!nowait) return pth_waitpid (pid, status, options); \ - else return 0; } \ - \ - struct assuan_system_hooks _assuan_system_pth = \ - { ASSUAN_SYSTEM_HOOKS_VERSION, _assuan_pth_usleep, __assuan_pipe, \ - __assuan_close, _assuan_pth_read, _assuan_pth_write, \ - _assuan_pth_recvmsg, _assuan_pth_sendmsg, \ - __assuan_spawn, _assuan_pth_waitpid, __assuan_socketpair, \ - __assuan_socket, __assuan_connect } - -extern struct assuan_system_hooks _assuan_system_pth; -#define ASSUAN_SYSTEM_PTH &_assuan_system_pth - /* Standard system hooks for nPth. */ #define ASSUAN_SYSTEM_NPTH_IMPL \ static void _assuan_npth_usleep (assuan_context_t ctx, unsigned int usec) \ diff --git a/src/mkheader.c b/src/mkheader.c index 0ee0944..b151ca0 100644 --- a/src/mkheader.c +++ b/src/mkheader.c @@ -125,13 +125,6 @@ write_special (const char *fname, int lnr, const char *tag) else include_file (fname, lnr, "posix-sock-nonce.inc.h"); } - else if (!strcmp (tag, "include:sys-pth-impl")) - { - if (strstr (host_os, "mingw32")) - include_file (fname, lnr, "w32-sys-pth-impl.h"); - else - include_file (fname, lnr, "posix-sys-pth-impl.h"); - } else if (!strcmp (tag, "include:w32ce-add")) { if (!strcmp (host_os, "mingw32ce")) diff --git a/src/posix-sys-pth-impl.h b/src/posix-sys-pth-impl.h deleted file mode 100644 index 6943359..0000000 --- a/src/posix-sys-pth-impl.h +++ /dev/null @@ -1,87 +0,0 @@ -## posix-sys-pth-impl.h - Include fragment to build assuan.h. -## Copyright (C) 2009, 2010 Free Software Foundation, Inc. -## -## This file is part of Assuan. -## -## Assuan is free software; you can redistribute it and/or modify it -## under the terms of the GNU Lesser General Public License as -## published by the Free Software Foundation; either version 2.1 of -## the License, or (at your option) any later version. -## -## Assuan is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this program; if not, see <http://www.gnu.org/licenses/>. -## SPDX-License-Identifier: LGPL-2.1+ -## -## -## This file is included by the mkheader tool. Lines starting with -## a double hash mark are not copied to the destination file. -## -## Warning: This is a fragment of a macro - no empty lines please. - static int _assuan_pth_recvmsg (assuan_context_t ctx, assuan_fd_t fd, \ - assuan_msghdr_t msg, int flags) \ - { \ - /* Pth does not provide a recvmsg function. We implement it. */ \ - int ret; \ - int fdmode; \ - \ - (void) ctx; \ - fdmode = pth_fdmode (fd, PTH_FDMODE_POLL); \ - if (fdmode == PTH_FDMODE_ERROR) \ - { \ - errno = EBADF; \ - return -1; \ - } \ - if (fdmode == PTH_FDMODE_BLOCK) \ - { \ - fd_set fds; \ - \ - FD_ZERO (&fds); \ - FD_SET (fd, &fds); \ - while ((ret = pth_select (fd + 1, &fds, NULL, NULL, NULL)) < 0 \ - && errno == EINTR) \ - ; \ - if (ret < 0) \ - return -1; \ - } \ - \ - while ((ret = recvmsg (fd, msg, flags)) == -1 && errno == EINTR) \ - ; \ - return ret; \ - } \ - static int _assuan_pth_sendmsg (assuan_context_t ctx, assuan_fd_t fd, \ - const assuan_msghdr_t msg, int flags) \ - { \ - /* Pth does not provide a sendmsg function. We implement it. */ \ - int ret; \ - int fdmode; \ - \ - (void) ctx; \ - fdmode = pth_fdmode (fd, PTH_FDMODE_POLL); \ - if (fdmode == PTH_FDMODE_ERROR) \ - { \ - errno = EBADF; \ - return -1; \ - } \ - if (fdmode == PTH_FDMODE_BLOCK) \ - { \ - fd_set fds; \ - \ - FD_ZERO (&fds); \ - FD_SET (fd, &fds); \ - while ((ret = pth_select (fd + 1, NULL, &fds, NULL, NULL)) < 0 \ - && errno == EINTR) \ - ; \ - if (ret < 0) \ - return -1; \ - } \ - \ - while ((ret = sendmsg (fd, msg, flags)) == -1 && errno == EINTR) \ - ; \ - return ret; \ - } \ -##EOF## Force end-of file. diff --git a/src/w32-sys-pth-impl.h b/src/w32-sys-pth-impl.h deleted file mode 100644 index 0150e6e..0000000 --- a/src/w32-sys-pth-impl.h +++ /dev/null @@ -1,40 +0,0 @@ -## w32-sys-pth-impl.h - Include fragment to build assuan.h. -## Copyright (C) 2009, 2010 Free Software Foundation, Inc. -## -## This file is part of Assuan. -## -## Assuan is free software; you can redistribute it and/or modify it -## under the terms of the GNU Lesser General Public License as -## published by the Free Software Foundation; either version 2.1 of -## the License, or (at your option) any later version. -## -## Assuan is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this program; if not, see <http://www.gnu.org/licenses/>. -## SPDX-License-Identifier: LGPL-2.1+ -## -## -## This file is included by the mkheader tool. Lines starting with -## a double hash mark are not copied to the destination file. -## -## Warning: This is a fragment of a macro - no empty lines please. - static int _assuan_pth_recvmsg (assuan_context_t ctx, assuan_fd_t fd, \ - assuan_msghdr_t msg, int flags) \ - { \ - (void) ctx; \ - gpg_err_set_errno (ENOSYS); \ - return -1; \ - } \ - static int _assuan_pth_sendmsg (assuan_context_t ctx, assuan_fd_t fd, \ - const assuan_msghdr_t msg, int flags) \ - { \ - (void) ctx; \ - gpg_err_set_errno (ENOSYS); \ - return -1; \ - } \ -##EOF## Force end-of file. - |