[Pkg-gnupg-commit] [libassuan] 374/437: Make assuan portable to NPTH.
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:34:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit e23e6f2bd49f415f4fdca013e4f61e1b17995a51
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date: Mon Sep 26 16:42:50 2011 +0200
Make assuan portable to NPTH.
---
src/assuan.h.in | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/src/assuan.h.in b/src/assuan.h.in
index 5c30a99..2e43c81 100644
--- a/src/assuan.h.in
+++ b/src/assuan.h.in
@@ -510,6 +510,37 @@ int __assuan_connect (assuan_context_t ctx, int sock, struct sockaddr *addr, soc
extern struct assuan_system_hooks _assuan_system_pth;
#define ASSUAN_SYSTEM_PTH &_assuan_system_pth
+#define ASSUAN_SYSTEM_NPTH_IMPL \
+ static void _assuan_npth_usleep (assuan_context_t ctx, unsigned int usec) \
+ { (void) ctx; npth_usleep (usec); } \
+ static ssize_t _assuan_npth_read (assuan_context_t ctx, assuan_fd_t fd, \
+ void *buffer, size_t size) \
+ { (void) ctx; return npth_read (fd, buffer, size); } \
+ static ssize_t _assuan_npth_write (assuan_context_t ctx, assuan_fd_t fd, \
+ const void *buffer, size_t size) \
+ { (void) ctx; return npth_write (fd, buffer, size); } \
+ static int _assuan_npth_recvmsg (assuan_context_t ctx, assuan_fd_t fd, \
+ assuan_msghdr_t msg, int flags) \
+ { (void) ctx; return npth_recvmsg (fd, msg, flags); } \
+ static int _assuan_npth_sendmsg (assuan_context_t ctx, assuan_fd_t fd, \
+ const assuan_msghdr_t msg, int flags) \
+ { (void) ctx; return npth_sendmsg (fd, msg, flags); } \
+ static pid_t _assuan_npth_waitpid (assuan_context_t ctx, pid_t pid, \
+ int nowait, int *status, int options) \
+ { (void) ctx; \
+ if (!nowait) return npth_waitpid (pid, status, options); \
+ else return 0; } \
+ \
+ struct assuan_system_hooks _assuan_system_npth = \
+ { ASSUAN_SYSTEM_HOOKS_VERSION, _assuan_npth_usleep, __assuan_pipe, \
+ __assuan_close, _assuan_npth_read, _assuan_npth_write, \
+ _assuan_npth_recvmsg, _assuan_npth_sendmsg, \
+ __assuan_spawn, _assuan_npth_waitpid, __assuan_socketpair, \
+ __assuan_socket, __assuan_connect }
+
+extern struct assuan_system_hooks _assuan_system_npth;
+#define ASSUAN_SYSTEM_NPTH &_assuan_system_npth
+
@include:w32ce-add@
#ifdef __cplusplus
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list