diff options
-rwxr-xr-x | build-setup.sh | 2 | ||||
-rw-r--r-- | src/lib/cfuns-c.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/build-setup.sh b/build-setup.sh index 1cae9a91..1ac94081 100755 --- a/build-setup.sh +++ b/build-setup.sh @@ -11,7 +11,7 @@ rm -rf autom4te.cache autoheader || error "could not re-generate config/openaxiom-c-macros.h" aclocal -I config autoconf || error "could not re-generate configure" -automake -a -c --force-missing +automake -a -c #--force-missing rm -rf autom4te.cache # set +x diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c index cac76b6c..c5d5c870 100644 --- a/src/lib/cfuns-c.c +++ b/src/lib/cfuns-c.c @@ -492,8 +492,9 @@ oa_acquire_temporary_pathname() { #if OPENAXIOM_MS_WINDOWS_HOST char buf[MAX_PATH]; const char* tmpdir = oa_get_tmpdir(); - auto n = GetTempFileName(tmpdir, "oa-", rand() % SHORT_MAX, buf); - free(tmpdir); + auto n = GetTempFileName(tmpdir, "oa-", rand() % SHRT_MAX, buf); + /* tmpdir was malloc()ed when OPENAXIOM_MS_WINDOWS_HOST. */ + free(const_cast<void*>(tmpdir)); if (n == 0) { perror("oa_acquire_temporary_pathname"); exit(1); @@ -816,7 +817,7 @@ oa_spawn(Process* proc, SpawnFlags flags) } cmd_line[curpos] = '\0'; - if ((flags & spawn_search_path) == 0) + if ((flags & SpawnFlags::search_path) == 0) path = proc->argv[0]; if(CreateProcess(/* lpApplicationName */ path, @@ -833,7 +834,7 @@ oa_spawn(Process* proc, SpawnFlags flags) return proc->id = -1; } proc->id = proc_info.dwProcessId; - if ((flags & spawn_replace) == 0) + if ((flags & SpawnFlags::replace) == 0) return proc->id; WaitForSingleObject(proc_info.hProcess, INFINITE); GetExitCodeProcess(proc_info.hProcess, &status); |