summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-10 07:48:03 +0000
committermidipix <writeonce@midipix.org>2021-06-10 07:53:30 +0000
commite0e31fbb6cf0f9b1feec89893747dd4df30cebf6 (patch)
tree570495c7e24e81b724e2c312b75e9123fa127c97
parentab2f8da0c0521ff706db35f97fe77e44d804c678 (diff)
downloadslibtool-e0e31fbb6cf0f9b1feec89893747dd4df30cebf6.tar.bz2
slibtool-e0e31fbb6cf0f9b1feec89893747dd4df30cebf6.tar.xz
output: added slbt_output_machine().
-rw-r--r--include/slibtool/slibtool.h1
-rw-r--r--project/common.mk1
-rw-r--r--src/output/slbt_output_machine.c24
3 files changed, 26 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index 6b64cd3..9f98726 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -310,6 +310,7 @@ slbt_api int slbt_main (char **, char **,
const struct slbt_fd_ctx *);
slbt_api int slbt_output_config (const struct slbt_driver_ctx *);
+slbt_api int slbt_output_machine (const struct slbt_driver_ctx *);
slbt_api int slbt_output_features (const struct slbt_driver_ctx *);
slbt_api int slbt_output_fdcwd (const struct slbt_driver_ctx *);
slbt_api int slbt_output_exec (const struct slbt_driver_ctx *, const struct slbt_exec_ctx *, const char *);
diff --git a/project/common.mk b/project/common.mk
index e756abe..4893b49 100644
--- a/project/common.mk
+++ b/project/common.mk
@@ -16,6 +16,7 @@ API_SRCS = \
src/output/slbt_output_exec.c \
src/output/slbt_output_fdcwd.c \
src/output/slbt_output_features.c \
+ src/output/slbt_output_machine.c \
src/skin/slbt_skin_default.c \
src/skin/slbt_skin_install.c \
src/skin/slbt_skin_uninstall.c \
diff --git a/src/output/slbt_output_machine.c b/src/output/slbt_output_machine.c
new file mode 100644
index 0000000..800142e
--- /dev/null
+++ b/src/output/slbt_output_machine.c
@@ -0,0 +1,24 @@
+/*******************************************************************/
+/* slibtool: a skinny libtool implementation, written in C */
+/* Copyright (C) 2016--2021 Z. Gilboa */
+/* Released under the Standard MIT License; see COPYING.SLIBTOOL. */
+/*******************************************************************/
+
+#include <slibtool/slibtool.h>
+#include "slibtool_driver_impl.h"
+#include "slibtool_dprintf_impl.h"
+#include "slibtool_errinfo_impl.h"
+
+int slbt_output_machine(const struct slbt_driver_ctx * dctx)
+{
+ const struct slbt_common_ctx * cctx;
+ int fdout;
+
+ cctx = dctx->cctx;
+ fdout = slbt_driver_fdout(dctx);
+
+ if (slbt_dprintf(fdout,"%s\n",cctx->host.host) < 0)
+ return SLBT_SYSTEM_ERROR(dctx,0);
+
+ return 0;
+}