diff options
author | Jonathan Larmour <jifl@eCosCentric.com> | 2002-04-29 21:49:56 +0000 |
---|---|---|
committer | Jonathan Larmour <jifl@eCosCentric.com> | 2002-04-29 21:49:56 +0000 |
commit | 822afa537ae4e03136d6262269ee460912ddabb1 (patch) | |
tree | 40167c460b17f2b082f51c6c687a0fbd24dd2b78 /newlib/libc | |
parent | 29798f0d57549a89d7ec6c8717fda26347e6bbf7 (diff) | |
download | newlib-822afa537ae4e03136d6262269ee460912ddabb1.zip newlib-822afa537ae4e03136d6262269ee460912ddabb1.tar.gz newlib-822afa537ae4e03136d6262269ee460912ddabb1.tar.bz2 |
* libc/sys/arm/syscalls.c (_rename): New function. Just a stub.
(_system): New function. Ditto.
* libc/stdlib/system.c (_system_r): Call _system if HAVE_SYSTEM.
* configure.host: define HAVE_SYSTEM and HAVE_RENAME for xscale
targets.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/stdlib/system.c | 5 | ||||
-rw-r--r-- | newlib/libc/sys/arm/syscalls.c | 18 |
2 files changed, 22 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/system.c b/newlib/libc/stdlib/system.c index 73c0540..ad22177 100644 --- a/newlib/libc/stdlib/system.c +++ b/newlib/libc/stdlib/system.c @@ -69,7 +69,10 @@ _system_r (ptr, s) struct _reent *ptr; _CONST char *s; { -#ifdef NO_EXEC +#if defined(HAVE_SYSTEM) + return _system (s); + ptr = ptr; +#elif defined(NO_EXEC) if (s == NULL) return 0; errno = ENOSYS; diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c index 3662a46..a889e92 100644 --- a/newlib/libc/sys/arm/syscalls.c +++ b/newlib/libc/sys/arm/syscalls.c @@ -15,6 +15,8 @@ #include "swi.h" /* Forward prototypes. */ +int _system _PARAMS ((const char *)); +int _rename _PARAMS ((const char *, const char *)); int isatty _PARAMS ((int)); clock_t _times _PARAMS ((struct tms *)); int _gettimeofday _PARAMS ((struct timeval *, struct timezone *)); @@ -609,3 +611,19 @@ isatty (int fd) return 1; fd = fd; } + +int +_system (const char *s) +{ + if (s == NULL) + return 0; + errno = ENOSYS; + return -1; +} + +int +_rename (const char *, const char *) +{ + errno = ENOSYS; + return -1; +} |