summaryrefslogtreecommitdiffhomepage
path: root/src/output/slbt_output_features.c
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 /src/output/slbt_output_features.c
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 'src/output/slbt_output_features.c')
-rw-r--r--src/output/slbt_output_features.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/output/slbt_output_features.c b/src/output/slbt_output_features.c
index b0252fa..577ca5a 100644
--- a/src/output/slbt_output_features.c
+++ b/src/output/slbt_output_features.c
@@ -9,6 +9,8 @@
#include <stdbool.h>
#include <slibtool/slibtool.h>
+#include "slibtool_driver_impl.h"
+#include "slibtool_dprintf_impl.h"
#include "slibtool_errinfo_impl.h"
static const char enable[] = "enable";
@@ -16,25 +18,26 @@ static const char disable[] = "disable";
int slbt_output_features(const struct slbt_driver_ctx * dctx)
{
+ int fdout;
const char * shared_option;
const char * static_option;
+ fdout = slbt_driver_fdout(dctx);
+
shared_option = (dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_SHARED)
? disable : enable;
static_option = (dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_STATIC)
? disable : enable;
- if (fprintf(stdout,"host: %s\n",dctx->cctx->host.host) < 0)
+ if (slbt_dprintf(fdout,"host: %s\n",dctx->cctx->host.host) < 0)
return SLBT_SYSTEM_ERROR(dctx);
- if (fprintf(stdout,"%s shared libraries\n",shared_option) < 0)
+ if (slbt_dprintf(fdout,"%s shared libraries\n",shared_option) < 0)
return SLBT_SYSTEM_ERROR(dctx);
- if (fprintf(stdout,"%s static libraries\n",static_option) < 0)
+ if (slbt_dprintf(fdout,"%s static libraries\n",static_option) < 0)
return SLBT_SYSTEM_ERROR(dctx);
- return fflush(stdout)
- ? SLBT_SYSTEM_ERROR(dctx)
- : 0;
+ return 0;
}