Ok, so, as far as I understand, OSG_SYSTEM_SUPPORTED is used only for iOS
related builds, right?
If this is the case we could implement os_utils.cpp just like this:
Code:
#include <osg/os_utils>
#ifndef OSG_SYSTEM_SUPPORTED
#include <spawn.h>
#endif
extern "C" {
int osg_system(const char* command)
{
#ifdef OSG_SYSTEM_SUPPORTED
return system(command);
#else
pid_t pid;
posix_spawn(&pid, command, NULL, NULL, NULL, NULL);
return waitpid(pid, NULL, 0);
#endif
}
}
And, in the future, if other platforms will not support system() and the above
code won't work we can use more defines to handle each case. Do you agree?
Alessandro
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72831#72831
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org