This block of code is essentially converting the incoming argv[0] string from a possibly relative path to an absolute one. This is precisely the function performed by MCS_resolvepath, so you can shorten it to:
```
#if defined(_LINUX_DESKTOP) || defined(_MAC_DESKTOP)
  {
      MCAutoStringRef t_resolved_cmd;
      MCS_resolvepath(MCcmd, &t_resolved_cmd);
      MCValueRelease(MCcmd);
      MCcmd = MCValueRetain(*t_resolved_cmd);
  }
#endif