From 43c1e85fe29a52a9debc068d97c5860a4694b821 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 27 Oct 2022 10:53:06 +0900 Subject: spawn: Expose spawn functions. * src/gpg-error.def.in: Update. * src/gpg-error.vers: Update. * src/gpg-error.h.in: Add declarations. * src/visibility.c: Add implementations. * src/visibility.h: Expose them. -- GnuPG-bug-id: 6249 Signed-off-by: NIIBE Yutaka --- src/gpg-error.def.in | 17 ++++++++--------- src/gpg-error.h.in | 8 +------- src/gpg-error.vers | 17 ++++++++--------- src/visibility.c | 2 -- src/visibility.h | 2 -- 5 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in index 28e9ef3..ac8f2f6 100644 --- a/src/gpg-error.def.in +++ b/src/gpg-error.def.in @@ -193,15 +193,14 @@ EXPORTS gpgrt_chdir @150 gpgrt_getcwd @151 -;; API not yet finished for: -;; gpgrt_make_pipe @152 -;; gpgrt_spawn_process @153 -;; gpgrt_spawn_process_fd @154 -;; gpgrt_spawn_process_detached @155 -;; gpgrt_wait_process @156 -;; gpgrt_wait_processes @157 -;; gpgrt_kill_process @158 -;; gpgrt_release_process @159 + gpgrt_make_pipe @152 + gpgrt_spawn_process @153 + gpgrt_spawn_process_fd @154 + gpgrt_spawn_process_detached @155 + gpgrt_wait_process @156 + gpgrt_wait_processes @157 + gpgrt_kill_process @158 + gpgrt_release_process @159 gpgrt_argparse @160 gpgrt_usage @161 diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index aca7243..b7cfdcf 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -1082,7 +1082,7 @@ void _gpgrt_log_assert (const char *expr, const char *file, int line, /* - * Spawn functions (Not yet available) + * Spawn functions */ #define GPGRT_SPAWN_NONBLOCK 16 /* Set the streams to non-blocking. */ #define GPGRT_SPAWN_RUN_ASFW 64 /* Use AllowSetForegroundWindow on W32. */ @@ -1091,8 +1091,6 @@ void _gpgrt_log_assert (const char *expr, const char *file, int line, #define GPGRT_SPAWN_KEEP_STDOUT 512 #define GPGRT_SPAWN_KEEP_STDERR 1024 -#if 0 - /* Function and convenience macros to create pipes. */ gpg_err_code_t gpgrt_make_pipe (int filedes[2], gpgrt_stream_t *r_fp, int direction, int nonblock); @@ -1134,10 +1132,6 @@ void gpgrt_kill_process (pid_t pid); /* Release process resources identified by PID. */ void gpgrt_release_process (pid_t pid); - -#endif /*0*/ - - /* * Option parsing. diff --git a/src/gpg-error.vers b/src/gpg-error.vers index aaea22a..4182da0 100644 --- a/src/gpg-error.vers +++ b/src/gpg-error.vers @@ -171,15 +171,14 @@ GPG_ERROR_1.0 { gpgrt_chdir; gpgrt_getcwd; -## API not yet finished for: -# gpgrt_make_pipe; -# gpgrt_spawn_process; -# gpgrt_spawn_process_fd; -# gpgrt_spawn_process_detached; -# gpgrt_wait_process; -# gpgrt_wait_processes; -# gpgrt_kill_process; -# gpgrt_release_process; + gpgrt_make_pipe; + gpgrt_spawn_process; + gpgrt_spawn_process_fd; + gpgrt_spawn_process_detached; + gpgrt_wait_process; + gpgrt_wait_processes; + gpgrt_kill_process; + gpgrt_release_process; gpgrt_argparse; gpgrt_argparser; diff --git a/src/visibility.c b/src/visibility.c index 831b418..dba48b8 100644 --- a/src/visibility.c +++ b/src/visibility.c @@ -1093,7 +1093,6 @@ _gpgrt_log_assert (const char *expr, const char *file, } -#if 0 gpg_err_code_t gpgrt_make_pipe (int filedes[2], estream_t *r_fp, int direction, int nonblock) { @@ -1152,7 +1151,6 @@ gpgrt_release_process (pid_t pid) { _gpgrt_release_process (pid); } -#endif /*0*/ int diff --git a/src/visibility.h b/src/visibility.h index d0e4516..2819394 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -199,7 +199,6 @@ MARK_VISIBLE (gpgrt_log_clock) MARK_VISIBLE (gpgrt_log_flush) MARK_VISIBLE (_gpgrt_log_assert) -#if 0 MARK_VISIBLE (gpgrt_make_pipe) MARK_VISIBLE (gpgrt_spawn_process) MARK_VISIBLE (gpgrt_spawn_process_fd) @@ -208,7 +207,6 @@ MARK_VISIBLE (gpgrt_wait_process) MARK_VISIBLE (gpgrt_wait_processes) MARK_VISIBLE (gpgrt_kill_process) MARK_VISIBLE (gpgrt_release_process) -#endif MARK_VISIBLE (gpgrt_argparse) MARK_VISIBLE (gpgrt_argparser) -- cgit v1.2.1