summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-03-31 10:55:30 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-03-31 10:55:30 +0900
commiteeda9ac0a71951a2894cd92a366216d2f65c5ad1 (patch)
tree5b0a387e3a1890f5ca2c116e8b4e22703fe518a2
parent564e0d94f21f9c2cd8cadf2846163871352f1a92 (diff)
downloadlibassuan-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>
-rw-r--r--doc/assuan.texi6
-rw-r--r--src/Makefile.am1
-rw-r--r--src/assuan.h.in27
-rw-r--r--src/mkheader.c7
-rw-r--r--src/posix-sys-pth-impl.h87
-rw-r--r--src/w32-sys-pth-impl.h40
6 files changed, 0 insertions, 168 deletions
diff --git a/doc/assuan.texi b/doc/assuan.texi
index 5c423d0..2e0d5c7 100644
--- a/doc/assuan.texi
+++ b/doc/assuan.texi
@@ -1017,12 +1017,6 @@ System hooks suitable for use with the nPth library.
The implementation of system hooks for use with the nPth library.
This must be invoked once somewhere in the application, and defines
the structure that is referenced by @code{ASSUAN_SYSTEM_NPTH}.
-@item ASSUAN_SYSTEM_PTH
-System hooks suitable for use with the GNU Pth library.
-@item ASSUAN_SYSTEM_PTH_IMPL
-The implementation of system hooks for use with the GNU Pth library.
-This must be invoked once somewhere in the application, and defines
-the structure that is referenced by @code{ASSUAN_SYSTEM_PTH}.
@end table
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.
-