summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-06-27 03:51:35 +0000
committermidipix <writeonce@midipix.org>2018-06-27 07:30:01 -0400
commita82cc2f34bddae9b79e582a3bcc6b2c9cbb5009b (patch)
tree1d0de0094b350cf323b6ea8ee44f571918048789 /include
parent6088476d902b8bcbf688ce7cb6055a4c47c2d0b7 (diff)
downloadslibtool-a82cc2f34bddae9b79e582a3bcc6b2c9cbb5009b.tar.bz2
slibtool-a82cc2f34bddae9b79e582a3bcc6b2c9cbb5009b.tar.xz
driver, library interfaces: support alternate fd's for input/output/error/log.
Diffstat (limited to 'include')
-rw-r--r--include/slibtool/slibtool.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index c34bf99..54b3e4d 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -122,6 +122,13 @@ struct slbt_source_version {
const char * commit;
};
+struct slbt_fd_ctx {
+ int fdin;
+ int fdout;
+ int fderr;
+ int fdlog;
+};
+
struct slbt_exec_ctx {
char * program;
char * compiler;
@@ -247,10 +254,15 @@ struct slbt_driver_ctx {
slbt_api const struct slbt_source_version * slbt_source_version(void);
/* driver api */
-slbt_api int slbt_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, struct slbt_driver_ctx **);
-slbt_api int slbt_create_driver_ctx (const struct slbt_common_ctx *, struct slbt_driver_ctx **);
+slbt_api int slbt_get_driver_ctx (char ** argv, char ** envp, uint32_t flags,
+ const struct slbt_fd_ctx *, struct slbt_driver_ctx **);
+slbt_api int slbt_create_driver_ctx (const struct slbt_common_ctx *,
+ const struct slbt_fd_ctx *, struct slbt_driver_ctx **);
slbt_api void slbt_free_driver_ctx (struct slbt_driver_ctx *);
+slbt_api int slbt_get_driver_fdctx (const struct slbt_driver_ctx *, struct slbt_fd_ctx *);
+slbt_api int slbt_set_driver_fdctx (struct slbt_driver_ctx *, const struct slbt_fd_ctx *);
+
/* execution context api */
slbt_api int slbt_get_exec_ctx (const struct slbt_driver_ctx *, struct slbt_exec_ctx **);
slbt_api void slbt_free_exec_ctx (struct slbt_exec_ctx *);
@@ -276,7 +288,8 @@ slbt_api int slbt_copy_file (const struct slbt_driver_ctx *, struct slbt_exec_
slbt_api int slbt_dump_machine (const char * compiler, char * machine, size_t bufsize);
/* utility api */
-slbt_api int slbt_main (int, char **, char **);
+slbt_api int slbt_main (int, char **, char **,
+ const struct slbt_fd_ctx *);
slbt_api int slbt_output_config (const struct slbt_driver_ctx *);
slbt_api int slbt_output_features (const struct slbt_driver_ctx *);
slbt_api int slbt_output_exec (const struct slbt_driver_ctx *, const struct slbt_exec_ctx *, const char *);