summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-20 07:08:23 +0000
committermidipix <writeonce@midipix.org>2024-02-20 07:08:23 +0000
commitf248f358ccd4fc8b194a4831a86c4c5b6e3ba446 (patch)
tree6037b0d0fa7e9c7b924a7907844ec24d9f584d5f /src/host
parenta8b6ddb4a10e8c93465de0c28444787a0939a9b9 (diff)
downloadslibtool-f248f358ccd4fc8b194a4831a86c4c5b6e3ba446.tar.bz2
slibtool-f248f358ccd4fc8b194a4831a86c4c5b6e3ba446.tar.xz
host interfaces: added slbt_host_objfmt_is_{coff|macho}() and friends.
Diffstat (limited to 'src/host')
-rw-r--r--src/host/slbt_host_flavor.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/host/slbt_host_flavor.c b/src/host/slbt_host_flavor.c
index b5f6f45..a0b3a3b 100644
--- a/src/host/slbt_host_flavor.c
+++ b/src/host/slbt_host_flavor.c
@@ -173,3 +173,34 @@ int slbt_host_flavor_settings(
return *settings ? 0 : -1;
}
+
+
+int slbt_host_objfmt_is_coff(const struct slbt_driver_ctx * dctx)
+{
+ const char * flavor = dctx->cctx->host.flavor;
+
+ return !strcmp(flavor,"midipix")
+ || !strcmp(flavor,"mingw")
+ || !strcmp(flavor,"cygwin")
+ || !strcmp(flavor,"msys");
+}
+
+
+int slbt_host_objfmt_is_macho(const struct slbt_driver_ctx * dctx)
+{
+ const char * flavor = dctx->cctx->host.flavor;
+
+ return !strcmp(flavor,"darwin");
+}
+
+
+int slbt_host_group_is_winnt(const struct slbt_driver_ctx * dctx)
+{
+ return slbt_host_objfmt_is_coff(dctx);
+}
+
+
+int slbt_host_group_is_darwin(const struct slbt_driver_ctx * dctx)
+{
+ return slbt_host_objfmt_is_macho(dctx);
+}