Compare commits

...

4 Commits

Author SHA1 Message Date
mattn
d16c9200e3
Merge f00c7171e6f315c2164e1857e6b67c2d9f788848 into 2d99c323a27ca9013230cfd6fb56ab37f2a0f1d4 2025-09-21 00:58:12 +08:00
Yasuhiro Matsumoto
f00c7171e6
cosmetic changes 2025-04-17 16:51:01 +09:00
Yasuhiro Matsumoto
d05865a12b
use name "a.exe" for Windows 2025-04-17 16:42:08 +09:00
Yasuhiro Matsumoto
7709f98eb6
fix qjsc for Windows 2025-04-17 16:39:37 +09:00

10
qjsc.c
View File

@ -426,10 +426,13 @@ void help(void)
exit(1);
}
#if defined(CONFIG_CC) && !defined(_WIN32)
#if defined(CONFIG_CC)
int exec_cmd(char **argv)
{
#ifdef _WIN32
return _spawnvp(_P_WAIT, argv[0], (const char * const *)argv);
#else
int pid, status, ret;
pid = fork();
@ -444,6 +447,7 @@ int exec_cmd(char **argv)
break;
}
return WEXITSTATUS(status);
#endif
}
static int output_executable(const char *out_filename, const char *cfilename,
@ -731,7 +735,11 @@ int main(int argc, char **argv)
if (!out_filename) {
if (output_type == OUTPUT_EXECUTABLE) {
#ifdef _WIN32
out_filename = "a.exe";
#else
out_filename = "a.out";
#endif
} else {
out_filename = "out.c";
}