aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-06-06 07:30:26 +0000
committerNIIBE Yutaka <[email protected]>2024-06-06 07:30:26 +0000
commite644311383350ce704611cce69f322a7d9dd548e (patch)
treed3d2fdd51380b3ba5acf518ce57032b3cbe6c4fa /src
parentspawn: Add new GPGRT_PROCESS_NO_CONSOLE for Windows. (diff)
downloadlibgpg-error-e644311383350ce704611cce69f322a7d9dd548e.tar.gz
libgpg-error-e644311383350ce704611cce69f322a7d9dd548e.zip
spawn: Expose gpgrt_spawn_actions functions.
* src/gpg-error.def.in: Update. * src/gpg-error.h.in: Add declarations. * src/gpg-error.vers: Update. * src/visibility.c: Update. * src/visibility.h: Update. -- Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gpg-error.def.in8
-rw-r--r--src/gpg-error.h.in2
-rw-r--r--src/gpg-error.vers2
-rw-r--r--src/gpgrt-int.h2
-rw-r--r--src/visibility.c12
-rw-r--r--src/visibility.h12
6 files changed, 30 insertions, 8 deletions
diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in
index 91ba69a..31a28ef 100644
--- a/src/gpg-error.def.in
+++ b/src/gpg-error.def.in
@@ -249,8 +249,10 @@ EXPORTS
gpgrt_add_post_log_func @190
gpgrt_logv_domain @191
- gpgrt_spawn_actions_set_envvars @192
- gpgrt_spawn_actions_set_redirect @193
- gpgrt_spawn_actions_set_inherit_handles @194
+ gpgrt_spawn_actions_new @192
+ gpgrt_spawn_actions_release @193
+ gpgrt_spawn_actions_set_envvars @194
+ gpgrt_spawn_actions_set_redirect @195
+ gpgrt_spawn_actions_set_inherit_handles @196
;; end of file with public symbols for Windows.
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index 0af8ef5..be44afb 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -1112,6 +1112,8 @@ void _gpgrt_log_assert (const char *expr, const char *file, int line,
typedef struct gpgrt_process *gpgrt_process_t;
typedef struct gpgrt_spawn_actions *gpgrt_spawn_actions_t;
+gpg_err_code_t gpgrt_spawn_actions_new (gpgrt_spawn_actions_t *r_act);
+void gpgrt_spawn_actions_release (gpgrt_spawn_actions_t act);
@define:spawn_actions_functions@
enum gpgrt_process_requests
diff --git a/src/gpg-error.vers b/src/gpg-error.vers
index f5657eb..c4704df 100644
--- a/src/gpg-error.vers
+++ b/src/gpg-error.vers
@@ -215,6 +215,8 @@ GPG_ERROR_1.0 {
gpgrt_add_post_log_func;
gpgrt_logv_domain;
+ gpgrt_spawn_actions_new;
+ gpgrt_spawn_actions_release;
gpgrt_spawn_actions_set_environ;
gpgrt_spawn_actions_set_redirect;
gpgrt_spawn_actions_set_inherit_fds;
diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h
index 2652062..4a37686 100644
--- a/src/gpgrt-int.h
+++ b/src/gpgrt-int.h
@@ -634,7 +634,7 @@ gpg_err_code_t _gpgrt_make_pipe (int filedes[2], estream_t *r_fp,
#define _gpgrt_create_inbound_pipe(a,b,c) _gpgrt_make_pipe ((a), (b), -1, (c))
#define _gpgrt_create_outbound_pipe(a,b,c) _gpgrt_make_pipe ((a), (b), 1, (c))
-/* Actions (at spawning a chile process), which is OS-specific. */
+/* Actions (at spawning a child process), which is OS-specific. */
gpg_err_code_t _gpgrt_spawn_actions_new (gpgrt_spawn_actions_t *r_act);
void _gpgrt_spawn_actions_release (gpgrt_spawn_actions_t act);
#ifdef HAVE_W32_SYSTEM
diff --git a/src/visibility.c b/src/visibility.c
index da12a09..0e8121e 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -1133,6 +1133,18 @@ gpgrt_close_all_fds (int from, int *keep_fds)
}
#endif /*0*/
+gpg_err_code_t
+gpgrt_spawn_actions_new (gpgrt_spawn_actions_t *r_act)
+{
+ return _gpgrt_spawn_actions_new (r_act);
+}
+
+void
+gpgrt_spawn_actions_release (gpgrt_spawn_actions_t act)
+{
+ _gpgrt_spawn_actions_release (act);
+}
+
#ifdef HAVE_W32_SYSTEM
void
gpgrt_spawn_actions_set_envvars (gpgrt_spawn_actions_t act,
diff --git a/src/visibility.h b/src/visibility.h
index 5572c47..29ebaee 100644
--- a/src/visibility.h
+++ b/src/visibility.h
@@ -229,6 +229,8 @@ MARK_VISIBLE (gpgrt_cmp_version)
MARK_VISIBLE (gpgrt_fnameconcat)
MARK_VISIBLE (gpgrt_absfnameconcat)
+MARK_VISIBLE (gpgrt_spawn_actions_new)
+MARK_VISIBLE (gpgrt_spawn_actions_release)
#ifdef HAVE_W32_SYSTEM
MARK_VISIBLE (gpgrt_spawn_actions_set_envvars)
MARK_VISIBLE (gpgrt_spawn_actions_set_redirect)
@@ -419,15 +421,17 @@ MARK_VISIBLE (gpgrt_spawn_actions_set_atfork)
#define gpgrt_process_wait _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_process_release _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_spawn_actions_new _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_spawn_actions_release _gpgrt_USE_UNDERSCORED_FUNCTION
#ifdef HAVE_W32_SYSTEM
#define gpgrt_spawn_actions_set_envvars _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_spawn_actions_set_redirect _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_spawn_actions_set_inherit_handles _gpgrt_USE_UNDERSCORED_FUNCTION
#else
-#define gpgrt_spawn_actions_set_environ _gpgrt_USE_UNDERSCORED_FUNCTION
-#define gpgrt_spawn_actions_set_redirect _gpgrt_USE_UNDERSCORED_FUNCTION
-#define gpgrt_spawn_actions_set_inherit_fds _gpgrt_USE_UNDERSCORED_FUNCTION
-#define gpgrt_spawn_actions_set_atfork _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_spawn_actions_set_environ _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_spawn_actions_set_redirect _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_spawn_actions_set_inherit_fds _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_spawn_actions_set_atfork _gpgrt_USE_UNDERSCORED_FUNCTION
#endif
#define gpgrt_argparse _gpgrt_USE_UNDERSCORED_FUNCTION