From cdc3c6697af08d485e5a56952549b9e94e020396 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 20 Feb 2024 07:14:57 +0000 Subject: slbt_util_create_mapfile(): refactor coff & mach-o detection logic. --- src/util/slbt_create_mapfile.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/util') diff --git a/src/util/slbt_create_mapfile.c b/src/util/slbt_create_mapfile.c index d0f5d95..1a8f8e7 100644 --- a/src/util/slbt_create_mapfile.c +++ b/src/util/slbt_create_mapfile.c @@ -39,12 +39,8 @@ static int slbt_util_output_mapfile_impl( const char ** symv; const char ** symstrv; - fmach = !strcmp(dctx->cctx->host.flavor,"darwin"); - - fcoff = !strcmp(dctx->cctx->host.flavor,"midipix"); - fcoff = fcoff || !strcmp(dctx->cctx->host.flavor,"cygwin"); - fcoff = fcoff || !strcmp(dctx->cctx->host.flavor,"mingw"); - fcoff = fcoff || !strcmp(dctx->cctx->host.flavor,"msys2"); + fcoff = slbt_host_objfmt_is_coff(dctx); + fmach = slbt_host_objfmt_is_macho(dctx); if (fcoff) { if (slbt_dprintf(fdout,"EXPORTS\n") < 0) -- cgit v1.2.3