From 9ecbd8e60c6904e72f7a22963dffb0016eab69b4 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 11 May 2023 19:09:45 +0900 Subject: Deprecate ASSUAN_SYSTEM_NPTH. * src/assuan.h.in: Introduce new configuration with ASSUAN_REALLY_REQUIRE_OLD_WAY_OF_SYSTEM_NPTH. -- Existing use cases just works with ASSUAN_SYSTEM_NPTH=NULL. Signed-off-by: NIIBE Yutaka --- NEWS | 8 ++++++-- src/assuan.h.in | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index dc04e8f..bbc6ab8 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,12 @@ Noteworthy changes in version 2.5.6 (unreleased) [C8/A8/R_] ------------------------------------------------ - * Use of ASSUAN_SYSTEM_NPTH is deprecated. Instead, please use - the gpgrt_set_syscall_clamp function from gpgrt library. + * Use of ASSUAN_SYSTEM_NPTH is deprecated. Instead, when you use + nPTH, please use the gpgrt_set_syscall_clamp function from gpgrt + library to set npth_unprotect/npth_protect. If it's really needed + (to support running with old versions of libassuan), please define + ASSUAN_REALLY_REQUIRE_OLD_WAY_OF_SYSTEM_NPTH before including + . * No support for WindowsCE, any more. diff --git a/src/assuan.h.in b/src/assuan.h.in index a101344..2f89f10 100644 --- a/src/assuan.h.in +++ b/src/assuan.h.in @@ -551,6 +551,7 @@ int __assuan_sendmsg (assuan_context_t ctx, assuan_fd_t fd, pid_t __assuan_waitpid (assuan_context_t ctx, pid_t pid, int nowait, int *status, int options); +#ifdef ASSUAN_REALLY_REQUIRE_OLD_WAY_OF_SYSTEM_NPTH /* Standard system hooks for nPth. */ #define ASSUAN_SYSTEM_NPTH_IMPL \ static void _assuan_npth_usleep (assuan_context_t ctx, unsigned int usec) \ @@ -601,6 +602,10 @@ pid_t __assuan_waitpid (assuan_context_t ctx, pid_t pid, extern struct assuan_system_hooks _assuan_system_npth; #define ASSUAN_SYSTEM_NPTH &_assuan_system_npth +#else +#define ASSUAN_SYSTEM_NPTH_IMPL /**/ +#define ASSUAN_SYSTEM_NPTH NULL +#endif #ifdef __cplusplus } -- cgit v1.2.1