forked from OctaForge/libostd
more windows fixes
This commit is contained in:
parent
5f12c8f0b9
commit
2bab256b4d
2
build.cc
2
build.cc
|
@ -37,7 +37,7 @@ static std::vector<std::string> EXAMPLES = {
|
|||
"stream1", "stream2", "coroutine1", "coroutine2", "concurrency"
|
||||
};
|
||||
|
||||
static fs::path ASM_SOURCE_DIR = "src/asm";
|
||||
static fs::path ASM_SOURCE_DIR = fs::path{"src"} / "asm";
|
||||
static strvec ASM_SOURCES = {
|
||||
"jump_all_gas", "make_all_gas", "ontop_all_gas"
|
||||
};
|
||||
|
|
|
@ -479,21 +479,22 @@ static std::string concat_args(std::vector<std::string> const &args) {
|
|||
if (*p == '\"') {
|
||||
/* not preceded by \, so it's safe */
|
||||
ret += "\\\"";
|
||||
++p;
|
||||
} else {
|
||||
/* handle any sequence of \ optionally followed by a " */
|
||||
std::size_t nbsl = 0;
|
||||
while (*p++ == '\\') {
|
||||
++nbsl;
|
||||
char const *op = p;
|
||||
while (*p == '\\') {
|
||||
++p;
|
||||
}
|
||||
if (*p == '\"') {
|
||||
/* double all the backslashes plus one for the " */
|
||||
ret.append(nbsl * 2 + 1, '\\');
|
||||
ret.append((p - op) * 2 + 1, '\\');
|
||||
ret += '\"';
|
||||
} else {
|
||||
ret.append(nbsl, '\\');
|
||||
ret.append(p - op, '\\');
|
||||
}
|
||||
}
|
||||
sp = p + 1;
|
||||
sp = p;
|
||||
}
|
||||
ret += '\"';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue