summaryrefslogtreecommitdiffhomepage
path: root/src/output/slbt_output_config.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-09-03 14:50:14 -0400
committermidipix <writeonce@midipix.org>2016-09-03 23:23:49 -0400
commit5221639b3f18e30194c9865d969cfccd0d1a3c1f (patch)
tree123d42f36166cca3edfef2b1eacc134519da9912 /src/output/slbt_output_config.c
parent9c9f287a5fb74927817b69be16fbbf93aaae91de (diff)
downloadslibtool-5221639b3f18e30194c9865d969cfccd0d1a3c1f.tar.bz2
slibtool-5221639b3f18e30194c9865d969cfccd0d1a3c1f.tar.xz
output: added error trace support.
Diffstat (limited to 'src/output/slbt_output_config.c')
-rw-r--r--src/output/slbt_output_config.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/output/slbt_output_config.c b/src/output/slbt_output_config.c
index d10a80e..ea7abae 100644
--- a/src/output/slbt_output_config.c
+++ b/src/output/slbt_output_config.c
@@ -9,6 +9,7 @@
#include <stdbool.h>
#include <slibtool/slibtool.h>
+#include "slibtool_errinfo_impl.h"
#ifndef SLBT_TAB_WIDTH
#define SLBT_TAB_WIDTH 8
@@ -66,31 +67,33 @@ int slbt_output_config(const struct slbt_driver_ctx * dctx)
midwidth &= (~(SLBT_TAB_WIDTH-1));
if (slbt_output_config_line("key","value","annotation",midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("---","-----","----------",midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("compiler",cctx->cargv[0],"",midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("target",cctx->target,"",midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("host",cctx->host.host,cctx->cfgmeta.host,midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("flavor",cctx->host.flavor,cctx->cfgmeta.flavor,midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("ar",cctx->host.ar,cctx->cfgmeta.ar,midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("ranlib",cctx->host.ranlib,cctx->cfgmeta.ranlib,midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
if (slbt_output_config_line("dlltool",cctx->host.dlltool,cctx->cfgmeta.dlltool,midwidth))
- return -1;
+ return SLBT_SYSTEM_ERROR(dctx);
- return fflush(stdout);
+ return fflush(stdout)
+ ? SLBT_SYSTEM_ERROR(dctx)
+ : 0;
}