mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-27 05:38:45 +03:00
Compare commits
4 Commits
8372671c9b
...
d16c9200e3
Author | SHA1 | Date | |
---|---|---|---|
|
d16c9200e3 | ||
|
f00c7171e6 | ||
|
d05865a12b | ||
|
7709f98eb6 |
10
qjsc.c
10
qjsc.c
@ -426,10 +426,13 @@ void help(void)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CC) && !defined(_WIN32)
|
#if defined(CONFIG_CC)
|
||||||
|
|
||||||
int exec_cmd(char **argv)
|
int exec_cmd(char **argv)
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
return _spawnvp(_P_WAIT, argv[0], (const char * const *)argv);
|
||||||
|
#else
|
||||||
int pid, status, ret;
|
int pid, status, ret;
|
||||||
|
|
||||||
pid = fork();
|
pid = fork();
|
||||||
@ -444,6 +447,7 @@ int exec_cmd(char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return WEXITSTATUS(status);
|
return WEXITSTATUS(status);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int output_executable(const char *out_filename, const char *cfilename,
|
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 (!out_filename) {
|
||||||
if (output_type == OUTPUT_EXECUTABLE) {
|
if (output_type == OUTPUT_EXECUTABLE) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
out_filename = "a.exe";
|
||||||
|
#else
|
||||||
out_filename = "a.out";
|
out_filename = "a.out";
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
out_filename = "out.c";
|
out_filename = "out.c";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user