Thanks for looking into it. And yes, your adaption is more generic, although i doubt that are any other compilers beside gcc and clang that are able to cross-compile ;) After i did the patch i also noticed that there is a NATIVE_CC variable used in some Makefiles, but i think these are only used for win32.
Add support for Atari FreeMinT
Better support for cross-compilation
Thats up to you of course, but a single "if" does not look very complex ;) Anyway, i'm fine with any solution that works. In the meantime, i try to fix that also in MiNT.
Yes, you are right, almost forgot that. But you could still do something like if ((pid = Pexec(104), ...)) == -32) Pexec(4,...); else if (pid <0) /* maybe handle other errors here */ else Pwaitpid(pid, 2, NULL, NULL);
Yes, you are right, almost forgot that. But you could still do something like if ((pid = Pexec(104), ...)) == -32) Pexec(4,...); else if (pid <0) / maybe handle other errors here / else Pwaitpid(pid, 2, NULL, NULL);
Another idea (also not tried yet): you could use Pexec(104) instead of Pexec(4). That call does not wait, and should give you also the pid of the started Process, which you can use for Pwaitpid(pid, 2, NULL, NULL)
Yes, Pwait() is identical to Pwait3(2, NULL), or Pwaitpid(-1, 2, NULL, NULL),as you can see here Pwait should report something, The module you started with Pexec(4) already has exited, so there is nothing to report... unless you have loaded other libraries before with Slbopen(). They are handled a bit strange by MiNT: they are started also with Pexec(), but then they get a SIGSTOP signal sent once their init function has been called. That is why Pwait() hangs: it waits for them to exit or change...