[hackers] [scc] [driver] switch per tool in settool || Quentin Rameau

From: <git_AT_suckless.org>
Date: Mon, 30 May 2016 11:43:32 +0200 (CEST)

commit 9d2db0a3e18ba554613c2531d18f93cc5c54086c
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Mon May 30 11:41:59 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Mon May 30 11:41:59 2016 +0200

    [driver] switch per tool in settool
    
    We will need that later with the introduction of as and ld.

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index a5d8ef6..ad058da 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -57,7 +57,9 @@ settool(int tool, int pipeout)
         int fds[2], n;
         static int fdin;
 
- if (tool != QBE) {
+ switch (tool) {
+ case CC1:
+ case CC2:
                 n = snprintf(tools[tool].bin, sizeof(tools[tool].bin),
                              arch ? "%s-%s" : "%s", tools[tool].name, arch);
                 if (n < 0 || n >= sizeof(tools[tool].bin))
_AT_@ -67,6 +69,9 @@ settool(int tool, int pipeout)
                              "%s/libexec/scc/%s", PREFIX, tools[tool].bin);
                 if (n < 0 || n >= sizeof(tools[tool].cmd))
                         die("scc: target tool path too long");
+ break;
+ default:
+ break;
         }
 
         tools[tool].args[0] = tools[tool].bin;
Received on Mon May 30 2016 - 11:43:32 CEST

This archive was generated by hypermail 2.3.0 : Mon May 30 2016 - 11:48:13 CEST