Provide pre-V37 compatibility.

This commit is contained in:
jshepher 2004-12-04 00:51:39 +00:00
parent c685985dbf
commit 8acaa7445a
1 changed files with 9 additions and 3 deletions

View File

@ -1,12 +1,18 @@
#include <dos/dos.h>
#include <utility/tagitem.h>
#include <proto/dos.h>
#include <errno.h>
int system(const char *string)
{ static struct TagItem notags[]={ { TAG_END,0 } };
if(!string)
return 1;
if(string == NULL) {
errno = EINVAL;
return -1;
}
if (((struct Library *)DOSBase)->lib_Version >= 36)
return SystemTagList((char *)string, notags);
else
return SystemTagList((char *)string,notags);
return (int)~Execute((STRPTR)string, 0l, Output());
}