mirror of
https://github.com/cahirwpz/libnix.git
synced 2026-09-12 03:30:43 +00:00
Provide pre-V37 compatibility.
This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
#include <dos/dos.h>
|
#include <dos/dos.h>
|
||||||
#include <utility/tagitem.h>
|
#include <utility/tagitem.h>
|
||||||
#include <proto/dos.h>
|
#include <proto/dos.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
int system(const char *string)
|
int system(const char *string)
|
||||||
{ static struct TagItem notags[]={ { TAG_END,0 } };
|
{ static struct TagItem notags[]={ { TAG_END,0 } };
|
||||||
|
|
||||||
if(!string)
|
if(string == NULL) {
|
||||||
return 1;
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((struct Library *)DOSBase)->lib_Version >= 36)
|
||||||
|
return SystemTagList((char *)string, notags);
|
||||||
else
|
else
|
||||||
return SystemTagList((char *)string,notags);
|
return (int)~Execute((STRPTR)string, 0l, Output());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user